diff options
525 files changed, 2103 insertions, 8146 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: */ diff --git a/dbaccess/source/ext/macromigration/dbmm_module.cxx b/dbaccess/source/ext/macromigration/dbmm_module.cxx index 0dbda35fe84a..826e945ae167 100644 --- a/dbaccess/source/ext/macromigration/dbmm_module.cxx +++ b/dbaccess/source/ext/macromigration/dbmm_module.cxx @@ -17,20 +17,15 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbmm_module.hxx" #include <rtl/instance.hxx> -//........................................................................ namespace dbmm { -//........................................................................ IMPLEMENT_MODULE( MacroMigrationModule, "dbmm" ); -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/dbmm_module.hxx b/dbaccess/source/ext/macromigration/dbmm_module.hxx index 1831c8175a45..bc725a09c8d4 100644 --- a/dbaccess/source/ext/macromigration/dbmm_module.hxx +++ b/dbaccess/source/ext/macromigration/dbmm_module.hxx @@ -22,16 +22,12 @@ #include <unotools/componentresmodule.hxx> -//........................................................................ namespace dbmm { -//........................................................................ DEFINE_MODULE( MacroMigrationModule, MacroMigrationModuleClient, MacroMigrationResId ) -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_MACROMIGRATION_MODULE_HXX diff --git a/dbaccess/source/ext/macromigration/dbmm_services.cxx b/dbaccess/source/ext/macromigration/dbmm_services.cxx index 42178799bbe3..e73b33451ca3 100644 --- a/dbaccess/source/ext/macromigration/dbmm_services.cxx +++ b/dbaccess/source/ext/macromigration/dbmm_services.cxx @@ -17,15 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbmm_module.hxx" -//........................................................................ namespace dbmm { -//........................................................................ - //-------------------------------------------------------------------- extern void createRegistryInfo_MacroMigrationDialogService(); static void initializeModule() @@ -34,9 +30,7 @@ namespace dbmm createRegistryInfo_MacroMigrationDialogService(); } -//........................................................................ } // namespace dbmm -//........................................................................ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbmm_component_getFactory( const sal_Char* pImplementationName, SAL_UNUSED_PARAMETER void*, diff --git a/dbaccess/source/ext/macromigration/dbmm_types.cxx b/dbaccess/source/ext/macromigration/dbmm_types.cxx index e275de6e1552..87f7311ec952 100644 --- a/dbaccess/source/ext/macromigration/dbmm_types.cxx +++ b/dbaccess/source/ext/macromigration/dbmm_types.cxx @@ -17,21 +17,15 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbmm_types.hxx" #include "dbmm_global.hrc" #include "dbmm_module.hxx" -//........................................................................ namespace dbmm { -//........................................................................ - //==================================================================== - //= helper - //==================================================================== - //-------------------------------------------------------------------- + // helper OUString getScriptTypeDisplayName( const ScriptType _eType ) { sal_uInt16 nResId( 0 ); @@ -49,8 +43,6 @@ namespace dbmm return nResId ? OUString( MacroMigrationResId( nResId ) ) : OUString(); } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/dbmm_types.hxx b/dbaccess/source/ext/macromigration/dbmm_types.hxx index a8d0027916f5..7ae52e987935 100644 --- a/dbaccess/source/ext/macromigration/dbmm_types.hxx +++ b/dbaccess/source/ext/macromigration/dbmm_types.hxx @@ -22,14 +22,10 @@ #include <tools/string.hxx> -//........................................................................ namespace dbmm { -//........................................................................ - //==================================================================== - //= ScriptType - //==================================================================== + // ScriptType enum ScriptType { eBasic, @@ -40,23 +36,17 @@ namespace dbmm eDialog }; - //==================================================================== - //= SubDocumentType - //==================================================================== + // SubDocumentType enum SubDocumentType { eForm, eReport }; - //==================================================================== - //= helper - //==================================================================== + // helper OUString getScriptTypeDisplayName( const ScriptType _eType ); -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_DBMM_TYPES_HXX diff --git a/dbaccess/source/ext/macromigration/docinteraction.cxx b/dbaccess/source/ext/macromigration/docinteraction.cxx index c811340f7df1..c5a9766999af 100644 --- a/dbaccess/source/ext/macromigration/docinteraction.cxx +++ b/dbaccess/source/ext/macromigration/docinteraction.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "docinteraction.hxx" #include <com/sun/star/frame/XModel.hpp> @@ -29,10 +28,8 @@ #include <rtl/ref.hxx> #include <tools/diagnose_ex.h> -//........................................................................ namespace dbmm { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -51,9 +48,7 @@ namespace dbmm using ::com::sun::star::task::PasswordRequestMode_PASSWORD_ENTER; using ::com::sun::star::task::PasswordRequestMode_PASSWORD_REENTER; - //==================================================================== - //= InteractionHandler_Data - //==================================================================== + // InteractionHandler_Data struct InteractionHandler_Data { Reference< XInteractionHandler > xHandler; @@ -69,10 +64,7 @@ namespace dbmm } }; - //==================================================================== - //= InteractionHandler - //==================================================================== - //-------------------------------------------------------------------- + // InteractionHandler InteractionHandler::InteractionHandler( const Reference<XComponentContext>& _rContext, const Reference< XModel >& _rxDocument ) :m_pData( new InteractionHandler_Data( _rContext ) ) { @@ -81,12 +73,10 @@ namespace dbmm m_pData->xHandler = aDocArgs.getOrDefault( "InteractionHandler", m_pData->xHandler ); } - //-------------------------------------------------------------------- InteractionHandler::~InteractionHandler() { } - //-------------------------------------------------------------------- bool InteractionHandler::requestDocumentPassword( const OUString& _rDocumentName, OUString& _io_rPassword ) { // create request @@ -114,7 +104,6 @@ namespace dbmm return true; } - //-------------------------------------------------------------------- void InteractionHandler::reportError( const Any& _rError ) { ::rtl::Reference< ::comphelper::OInteractionRequest > pRequest( new ::comphelper::OInteractionRequest( _rError ) ); @@ -124,8 +113,6 @@ namespace dbmm m_pData->xHandler->handle( pRequest.get() ); } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/docinteraction.hxx b/dbaccess/source/ext/macromigration/docinteraction.hxx index 895bf0e785de..b67d95676823 100644 --- a/dbaccess/source/ext/macromigration/docinteraction.hxx +++ b/dbaccess/source/ext/macromigration/docinteraction.hxx @@ -26,14 +26,10 @@ #include <memory> -//........................................................................ namespace dbmm { -//........................................................................ - //==================================================================== - //= DocumentErrorHandling - //==================================================================== + // DocumentErrorHandling struct InteractionHandler_Data; /** wraps common operations with an interaction handler. */ @@ -77,9 +73,7 @@ namespace dbmm ::std::auto_ptr< InteractionHandler_Data > m_pData; }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_DOCERRORHANDLING_HXX diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx index 93a1bdf8294c..e14f0baf7204 100644 --- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbmm_global.hrc" #include "dbmm_module.hxx" #include "docinteraction.hxx" @@ -48,10 +47,8 @@ #include <list> -//........................................................................ namespace dbmm { -//........................................................................ #define STATE_CLOSE_SUB_DOCS 0 #define STATE_BACKUP_DBDOC 1 @@ -92,10 +89,7 @@ namespace dbmm using ::com::sun::star::ucb::XContent; using ::com::sun::star::ucb::XContentIdentifier; - //==================================================================== - //= helper - //==================================================================== - //-------------------------------------------------------------------- + // helper static void lcl_getControllers_throw(const Reference< XModel2 >& _rxDocument, ::std::list< Reference< XController2 > >& _out_rControllers ) { @@ -105,9 +99,7 @@ namespace dbmm _out_rControllers.push_back( Reference< XController2 >( xControllerEnum->nextElement(), UNO_QUERY_THROW ) ); } - //==================================================================== - //= MacroMigrationDialog_Data - //==================================================================== + // MacroMigrationDialog_Data struct MacroMigrationDialog_Data { Reference<XComponentContext> aContext; @@ -133,10 +125,7 @@ namespace dbmm } }; - //==================================================================== - //= MacroMigrationDialog - //==================================================================== - //-------------------------------------------------------------------- + // MacroMigrationDialog MacroMigrationDialog::MacroMigrationDialog( Window* _pParent, const Reference<XComponentContext>& _rContext, const Reference< XOfficeDatabaseDocument >& _rxDocument ) :MacroMigrationDialog_Base( _pParent, MacroMigrationResId( DLG_MACRO_MIGRATION ) ) @@ -166,24 +155,20 @@ namespace dbmm OSL_PRECOND( m_pData->xDocumentModel.is(), "MacroMigrationDialog::MacroMigrationDialog: illegal document!" ); } - //-------------------------------------------------------------------- MacroMigrationDialog::~MacroMigrationDialog() { } - //-------------------------------------------------------------------- const Reference<XComponentContext>& MacroMigrationDialog::getComponentContext() const { return m_pData->aContext; } - //-------------------------------------------------------------------- const Reference< XOfficeDatabaseDocument >& MacroMigrationDialog::getDocument() const { return m_pData->xDocument; } - //-------------------------------------------------------------------- short MacroMigrationDialog::Execute() { short nResult = MacroMigrationDialog_Base::Execute(); @@ -198,7 +183,6 @@ namespace dbmm return nResult; } - //-------------------------------------------------------------------- sal_Bool MacroMigrationDialog::Close() { if ( m_pData->bMigrationIsRunning ) @@ -206,7 +190,6 @@ namespace dbmm return MacroMigrationDialog_Base::Close(); } - //-------------------------------------------------------------------- void MacroMigrationDialog::enterState( WizardState _nState ) { MacroMigrationDialog_Base::enterState( _nState ); @@ -260,7 +243,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- sal_Bool MacroMigrationDialog::prepareLeaveCurrentState( CommitPageReason _eReason ) { if ( !MacroMigrationDialog_Base::prepareLeaveCurrentState( _eReason ) ) @@ -287,25 +269,21 @@ namespace dbmm return sal_True; } - //-------------------------------------------------------------------- sal_Bool MacroMigrationDialog::leaveState( WizardState _nState ) { return MacroMigrationDialog_Base::leaveState( _nState ); } - //-------------------------------------------------------------------- MacroMigrationDialog::WizardState MacroMigrationDialog::determineNextState( WizardState _nCurrentState ) const { return MacroMigrationDialog_Base::determineNextState( _nCurrentState ); } - //-------------------------------------------------------------------- sal_Bool MacroMigrationDialog::onFinish() { return MacroMigrationDialog_Base::onFinish(); } - //-------------------------------------------------------------------- IMPL_LINK( MacroMigrationDialog, OnStartMigration, void*, /*_pNotInterestedIn*/ ) { // prevent closing @@ -340,7 +318,6 @@ namespace dbmm return 0L; } - //-------------------------------------------------------------------- void MacroMigrationDialog::impl_showCloseDocsError( bool _bShow ) { PreparationPage* pPreparationPage = dynamic_cast< PreparationPage* >( GetPage( STATE_CLOSE_SUB_DOCS ) ); @@ -349,7 +326,6 @@ namespace dbmm pPreparationPage->showCloseDocsError( _bShow ); } - //-------------------------------------------------------------------- bool MacroMigrationDialog::impl_closeSubDocs_nothrow() { OSL_PRECOND( m_pData->xDocument.is(), "MacroMigrationDialog::impl_closeSubDocs_nothrow: no document!" ); @@ -391,7 +367,6 @@ namespace dbmm return bSuccess; } - //-------------------------------------------------------------------- namespace { bool lcl_equalURLs_nothrow( @@ -422,7 +397,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- bool MacroMigrationDialog::impl_backupDocument_nothrow() const { if ( !m_pData->xDocumentModel.is() ) @@ -473,7 +447,6 @@ namespace dbmm return false; } - //-------------------------------------------------------------------- void MacroMigrationDialog::impl_reloadDocument_nothrow( bool _bMigrationSuccess ) { typedef ::std::pair< Reference< XFrame >, OUString > ViewDescriptor; @@ -607,8 +580,6 @@ namespace dbmm } } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.hxx b/dbaccess/source/ext/macromigration/macromigrationdialog.hxx index 51e04e4204c2..b8090606d12c 100644 --- a/dbaccess/source/ext/macromigration/macromigrationdialog.hxx +++ b/dbaccess/source/ext/macromigration/macromigrationdialog.hxx @@ -26,14 +26,10 @@ #include <memory> -//........................................................................ namespace dbmm { -//........................................................................ - //==================================================================== - //= MacroMigrationDialog - //==================================================================== + // MacroMigrationDialog struct MacroMigrationDialog_Data; typedef ::svt::RoadmapWizard MacroMigrationDialog_Base; class MacroMigrationDialog : public MacroMigrationDialog_Base @@ -76,9 +72,7 @@ namespace dbmm ::std::auto_ptr< MacroMigrationDialog_Data > m_pData; }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_MACROMIGRATIONDIALOG_HXX diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx b/dbaccess/source/ext/macromigration/macromigrationpages.cxx index f95cdd7e7458..d76ade61dbcc 100644 --- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbaccess_helpid.hrc" #include "dbmm_module.hxx" #include "dbmm_global.hrc" @@ -31,10 +30,8 @@ #include <tools/diagnose_ex.h> #include <vcl/metric.hxx> -//........................................................................ namespace dbmm { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -48,10 +45,7 @@ namespace dbmm using ::com::sun::star::uno::Sequence; using ::com::sun::star::frame::XModel; - //==================================================================== - //= MacroMigrationPage - //==================================================================== - //-------------------------------------------------------------------- + // MacroMigrationPage MacroMigrationPage::MacroMigrationPage( MacroMigrationDialog& _rParentDialog, const ResId& _rRes ) :MacroMigrationPage_Base( &_rParentDialog, _rRes ) ,m_aHeader( this, MacroMigrationResId( FT_HEADER ) ) @@ -61,27 +55,21 @@ namespace dbmm m_aHeader.SetFont( aFont ); } - //-------------------------------------------------------------------- MacroMigrationPage::~MacroMigrationPage() { } - //-------------------------------------------------------------------- const MacroMigrationDialog& MacroMigrationPage::getDialog() const { return *dynamic_cast< const MacroMigrationDialog* >( GetParentDialog() ); } - //-------------------------------------------------------------------- MacroMigrationDialog& MacroMigrationPage::getDialog() { return *dynamic_cast< MacroMigrationDialog* >( GetParentDialog() ); } - //==================================================================== - //= PreparationPage - //==================================================================== - //-------------------------------------------------------------------- + // PreparationPage PreparationPage::PreparationPage( MacroMigrationDialog& _rParentDialog ) :MacroMigrationPage( _rParentDialog, MacroMigrationResId( TP_PREPARE ) ) ,m_aIntroduction ( this, MacroMigrationResId( FT_INTRODUCTION ) ) @@ -90,22 +78,17 @@ namespace dbmm FreeResource(); } - //-------------------------------------------------------------------- void PreparationPage::showCloseDocsError( bool _bShow ) { m_aCloseDocError.Show( _bShow ); } - //-------------------------------------------------------------------- TabPage* PreparationPage::Create( ::svt::RoadmapWizard& _rParentDialog ) { return new PreparationPage( dynamic_cast< MacroMigrationDialog& >( _rParentDialog ) ); } - //==================================================================== - //= SaveDBDocPage - //==================================================================== - //-------------------------------------------------------------------- + // SaveDBDocPage SaveDBDocPage::SaveDBDocPage( MacroMigrationDialog& _rParentDialog ) :MacroMigrationPage( _rParentDialog, MacroMigrationResId( TP_SAVE_DBDOC_AS ) ) ,m_aExplanation ( this, MacroMigrationResId( FT_EXPLANATION ) ) @@ -125,21 +108,18 @@ namespace dbmm impl_updateLocationDependentItems(); } - //-------------------------------------------------------------------- void SaveDBDocPage::impl_updateLocationDependentItems() { updateDialogTravelUI(); m_aStartMigration.Show( !m_aSaveAsLocation.GetText().isEmpty() ); } - //-------------------------------------------------------------------- IMPL_LINK( SaveDBDocPage, OnLocationModified, Edit*, /**/ ) { impl_updateLocationDependentItems(); return 0L; } - //-------------------------------------------------------------------- void SaveDBDocPage::initializePage() { OWizardPage::initializePage(); @@ -164,7 +144,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- bool SaveDBDocPage::canAdvance() const { if ( !MacroMigrationPage::canAdvance() ) @@ -173,7 +152,6 @@ namespace dbmm return !m_aSaveAsLocation.GetText().isEmpty(); } - //-------------------------------------------------------------------- sal_Bool SaveDBDocPage::commitPage( ::svt::WizardTypes::CommitPageReason _eReason ) { if ( !MacroMigrationPage::commitPage( _eReason ) ) @@ -188,16 +166,12 @@ namespace dbmm return sal_True; } - //-------------------------------------------------------------------- TabPage* SaveDBDocPage::Create( ::svt::RoadmapWizard& _rParentDialog ) { return new SaveDBDocPage( dynamic_cast< MacroMigrationDialog& >( _rParentDialog ) ); } - //==================================================================== - //= ProgressPage - //==================================================================== - //-------------------------------------------------------------------- + // ProgressPage ProgressPage::ProgressPage( MacroMigrationDialog& _rParentDialog ) :MacroMigrationPage( _rParentDialog, MacroMigrationResId( TP_MIGRATE ) ) ,m_aObjectCount ( this, MacroMigrationResId( FT_OBJECT_COUNT ) ) @@ -214,13 +188,11 @@ namespace dbmm FreeResource(); } - //-------------------------------------------------------------------- TabPage* ProgressPage::Create( ::svt::RoadmapWizard& _rParentDialog ) { return new ProgressPage( dynamic_cast< MacroMigrationDialog& >( _rParentDialog ) ); } - //-------------------------------------------------------------------- void ProgressPage::setDocumentCounts( const sal_Int32 _nForms, const sal_Int32 _nReports ) { OUString sText( m_aObjectCount.GetText() ); @@ -229,13 +201,11 @@ namespace dbmm m_aObjectCount.SetText( sText ); } - //-------------------------------------------------------------------- void ProgressPage::onFinishedSuccessfully() { m_aMigrationDone.Show(); } - //-------------------------------------------------------------------- void ProgressPage::startObject( const OUString& _rObjectName, const OUString& _rCurrentAction, const sal_uInt32 _nRange ) { m_aCurrentObject.SetText( _rObjectName ); @@ -250,7 +220,6 @@ namespace dbmm Update(); } - //-------------------------------------------------------------------- void ProgressPage::setObjectProgressText( const OUString& _rText ) { m_aCurrentAction.SetText( _rText ); @@ -258,14 +227,12 @@ namespace dbmm Update(); } - //-------------------------------------------------------------------- void ProgressPage::setObjectProgressValue( const sal_uInt32 _nValue ) { m_aCurrentProgress.SetValue( _nValue ); Update(); } - //-------------------------------------------------------------------- void ProgressPage::endObject() { m_aCurrentAction.SetText( OUString() ); @@ -274,31 +241,25 @@ namespace dbmm Update(); } - //-------------------------------------------------------------------- void ProgressPage::start( const sal_uInt32 _nOverallRange ) { m_aAllProgress.SetRange( _nOverallRange ); Update(); } - //-------------------------------------------------------------------- void ProgressPage::setOverallProgressText( const OUString& _rText ) { m_aAllProgressText.SetText( _rText ); Update(); } - //-------------------------------------------------------------------- void ProgressPage::setOverallProgressValue( const sal_uInt32 _nValue ) { m_aAllProgress.SetValue( _nValue ); Update(); } - //==================================================================== - //= ResultPage - //==================================================================== - //-------------------------------------------------------------------- + // ResultPage ResultPage::ResultPage( MacroMigrationDialog& _rParentDialog ) :MacroMigrationPage( _rParentDialog, MacroMigrationResId( TP_SUMMARY ) ) ,m_aChangesLabel( this, MacroMigrationResId( FT_CHANGES_LABEL ) ) @@ -309,13 +270,11 @@ namespace dbmm FreeResource(); } - //-------------------------------------------------------------------- TabPage* ResultPage::Create( ::svt::RoadmapWizard& _rParentDialog ) { return new ResultPage( dynamic_cast< MacroMigrationDialog& >( _rParentDialog ) ); } - //-------------------------------------------------------------------- void ResultPage::displayMigrationLog( const bool _bSuccessful, const OUString& _rSummary ) { m_aChangesLabel.SetText( _bSuccessful ? m_aSuccessful : m_aUnsuccessful ); @@ -342,8 +301,6 @@ namespace dbmm m_aChanges.SetPosPixel( aChangesPos ); } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.hxx b/dbaccess/source/ext/macromigration/macromigrationpages.hxx index 0bb8c589ae12..082c49d733ad 100644 --- a/dbaccess/source/ext/macromigration/macromigrationpages.hxx +++ b/dbaccess/source/ext/macromigration/macromigrationpages.hxx @@ -35,16 +35,12 @@ namespace svt class RoadmapWizard; } -//........................................................................ namespace dbmm { -//........................................................................ class MacroMigrationDialog; - //==================================================================== - //= MacroMigrationPage - //==================================================================== + // MacroMigrationPage typedef ::svt::OWizardPage MacroMigrationPage_Base; class MacroMigrationPage : public MacroMigrationPage_Base { @@ -60,9 +56,7 @@ namespace dbmm FixedText m_aHeader; }; - //==================================================================== - //= PreparationPage - //==================================================================== + // PreparationPage class PreparationPage : public MacroMigrationPage { public: @@ -78,9 +72,7 @@ namespace dbmm FixedText m_aCloseDocError; }; - //==================================================================== - //= SaveDBDocPage - //==================================================================== + // SaveDBDocPage class SaveDBDocPage : public MacroMigrationPage { public: @@ -111,9 +103,7 @@ namespace dbmm void impl_updateLocationDependentItems(); }; - //==================================================================== - //= ProgressPage - //==================================================================== + // ProgressPage class ProgressPage : public MacroMigrationPage, public IMigrationProgress { public: @@ -147,9 +137,7 @@ namespace dbmm FixedText m_aMigrationDone; }; - //==================================================================== - //= ResultPage - //==================================================================== + // ResultPage class ResultPage : public MacroMigrationPage { public: @@ -166,9 +154,7 @@ namespace dbmm OUString m_aUnsuccessful; }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_MACROMIGRATIONPAGES_HXX diff --git a/dbaccess/source/ext/macromigration/macromigrationwizard.cxx b/dbaccess/source/ext/macromigration/macromigrationwizard.cxx index 0485a1293f32..4c2212271779 100644 --- a/dbaccess/source/ext/macromigration/macromigrationwizard.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationwizard.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbmm_module.hxx" #include "dbmm_global.hrc" #include "macromigrationdialog.hxx" @@ -28,10 +27,8 @@ #include <svtools/genericunodialog.hxx> -//........................................................................ namespace dbmm { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -51,9 +48,7 @@ namespace dbmm using ::com::sun::star::lang::IllegalArgumentException; using ::com::sun::star::frame::XStorable; - //==================================================================== - //= MacroMigrationDialogService - //==================================================================== + // MacroMigrationDialogService class MacroMigrationDialogService; typedef ::svt::OGenericUnoDialog MacroMigrationDialogService_Base; typedef ::comphelper::OPropertyArrayUsageHelper< MacroMigrationDialogService > MacroMigrationDialogService_PBase; @@ -100,10 +95,7 @@ namespace dbmm Reference< XOfficeDatabaseDocument > m_xDocument; }; - //==================================================================== - //= MacroMigrationDialogService - //==================================================================== - //-------------------------------------------------------------------- + // MacroMigrationDialogService MacroMigrationDialogService::MacroMigrationDialogService( const Reference< XComponentContext >& _rxContext ) :MacroMigrationDialogService_Base( _rxContext ) ,m_aContext( _rxContext ) @@ -111,7 +103,6 @@ namespace dbmm m_bNeedInitialization = true; } - //-------------------------------------------------------------------- MacroMigrationDialogService::~MacroMigrationDialogService() { // we do this here cause the base class' call to destroyDialog won't reach us anymore : we're within an dtor, @@ -124,25 +115,21 @@ namespace dbmm } } - //-------------------------------------------------------------------- Reference< XInterface > SAL_CALL MacroMigrationDialogService::Create( const Reference< XComponentContext >& _rxContext ) { return *(new MacroMigrationDialogService( _rxContext ) ); } - //-------------------------------------------------------------------- Dialog* MacroMigrationDialogService::createDialog( Window* _pParent ) { return new MacroMigrationDialog( _pParent, m_aContext, m_xDocument ); } - //-------------------------------------------------------------------- void MacroMigrationDialogService::destroyDialog() { MacroMigrationDialogService_Base::destroyDialog(); } - //-------------------------------------------------------------------- Sequence< sal_Int8 > SAL_CALL MacroMigrationDialogService::getImplementationId() throw(RuntimeException) { static ::cppu::OImplementationId* pId = NULL; @@ -158,13 +145,11 @@ namespace dbmm return pId->getImplementationId(); } - //-------------------------------------------------------------------- OUString SAL_CALL MacroMigrationDialogService::getImplementationName_static() throw(RuntimeException) { return OUString( "com.sun.star.comp.dbaccess.macromigration.MacroMigrationDialogService" ); } - //-------------------------------------------------------------------- Sequence< OUString > SAL_CALL MacroMigrationDialogService::getSupportedServiceNames_static() throw(RuntimeException) { Sequence< OUString > aServices(1); @@ -172,19 +157,16 @@ namespace dbmm return aServices; } - //-------------------------------------------------------------------- OUString SAL_CALL MacroMigrationDialogService::getImplementationName() throw(RuntimeException) { return getImplementationName_static(); } - //-------------------------------------------------------------------- Sequence< OUString > SAL_CALL MacroMigrationDialogService::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_static(); } - //-------------------------------------------------------------------- void SAL_CALL MacroMigrationDialogService::initialize( const Sequence< Any >& _rArguments ) throw(Exception, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -217,19 +199,16 @@ namespace dbmm m_bInitialized = true; } - //-------------------------------------------------------------------- Reference< XPropertySetInfo > SAL_CALL MacroMigrationDialogService::getPropertySetInfo() throw(RuntimeException) { return createPropertySetInfo( getInfoHelper() ); } - //-------------------------------------------------------------------- ::cppu::IPropertyArrayHelper& SAL_CALL MacroMigrationDialogService::getInfoHelper() { return *const_cast< MacroMigrationDialogService* >( this )->getArrayHelper(); } - //-------------------------------------------------------------------- ::cppu::IPropertyArrayHelper* MacroMigrationDialogService::createArrayHelper( ) const { Sequence< Property > aProps; @@ -237,14 +216,11 @@ namespace dbmm return new ::cppu::OPropertyArrayHelper( aProps ); } - //-------------------------------------------------------------------- void createRegistryInfo_MacroMigrationDialogService() { static OAutoRegistration< MacroMigrationDialogService > aAutoRegistration; } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx index b9a12d11362d..34040d6cc205 100644 --- a/dbaccess/source/ext/macromigration/migrationengine.cxx +++ b/dbaccess/source/ext/macromigration/migrationengine.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbmm_global.hrc" #include "dbmm_module.hxx" #include "dbmm_types.hxx" @@ -75,10 +74,8 @@ #define DEFAULT_DOC_PROGRESS_RANGE 100000 -//........................................................................ namespace dbmm { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -144,9 +141,7 @@ namespace dbmm #define PHASE_BASIC 5 #define PHASE_DIALOGS 6 - //==================================================================== - //= SubDocument - //==================================================================== + // SubDocument struct SubDocument { Reference< XCommandProcessor > xCommandProcessor; @@ -168,22 +163,17 @@ namespace dbmm typedef ::std::vector< SubDocument > SubDocuments; - //==================================================================== - //= helper - //==================================================================== - //-------------------------------------------------------------------- + // helper typedef ::utl::SharedUNOComponent< XStorage > SharedStorage; namespace { - //---------------------------------------------------------------- static const OUString& lcl_getScriptsStorageName() { static const OUString s_sScriptsStorageName( "Scripts" ); return s_sScriptsStorageName; } - //---------------------------------------------------------------- static const OUString& lcl_getScriptsSubStorageName( const ScriptType _eType ) { static const OUString s_sBeanShell ( "beanshell" ); @@ -206,7 +196,6 @@ namespace dbmm return s_sEmpty; } - //---------------------------------------------------------------- static bool lcl_getScriptTypeFromLanguage( const OUString& _rLanguage, ScriptType& _out_rScriptType ) { struct LanguageMapping @@ -240,7 +229,6 @@ namespace dbmm return false; } - //---------------------------------------------------------------- OUString lcl_getSubDocumentDescription( const SubDocument& _rDocument ) { OUString sObjectName( @@ -250,7 +238,6 @@ namespace dbmm return sObjectName; } - //---------------------------------------------------------------- static Any lcl_executeCommand_throw( const Reference< XCommandProcessor >& _rxCommandProc, const sal_Char* _pAsciiCommand ) { @@ -264,7 +251,6 @@ namespace dbmm aCommand, _rxCommandProc->createCommandIdentifier(), NULL ); } - //---------------------------------------------------------------- OUString lcl_getMimeType_nothrow( const Reference< XCommandProcessor >& _rxContent ) { OUString sMimeType; @@ -280,7 +266,6 @@ namespace dbmm return sMimeType; } - //---------------------------------------------------------------- enum OpenDocResult { eOpenedDoc, @@ -288,7 +273,6 @@ namespace dbmm eFailure }; - //---------------------------------------------------------------- static OpenDocResult lcl_loadSubDocument_nothrow( SubDocument& _rDocument, const Reference< XStatusIndicator >& _rxProgress, MigrationLog& _rLogger ) { @@ -343,7 +327,6 @@ namespace dbmm return _rDocument.xDocument.is() ? eOpenedDoc : eFailure; } - //---------------------------------------------------------------- static bool lcl_unloadSubDocument_nothrow( SubDocument& _rDocument, MigrationLog& _rLogger ) { bool bSuccess = false; @@ -371,7 +354,6 @@ namespace dbmm return bSuccess; } - //---------------------------------------------------------------- bool lcl_commitStorage_nothrow( const Reference< XStorage >& _rxStorage ) { try @@ -386,7 +368,6 @@ namespace dbmm return true; } - //---------------------------------------------------------------- bool lcl_commitDocumentStorage_nothrow( const Reference< XModel >& _rxDocument, MigrationLog& _rLogger ) { bool bSuccess = false; @@ -414,7 +395,6 @@ namespace dbmm return bSuccess; } - //---------------------------------------------------------------- bool lcl_storeDocument_nothrow( const Reference< XModel >& _rxDocument, MigrationLog& _rLogger ) { bool bSuccess = false; @@ -441,7 +421,6 @@ namespace dbmm return bSuccess; } - //---------------------------------------------------------------- bool lcl_storeEmbeddedDocument_nothrow( const SubDocument& _rDocument ) { try @@ -457,9 +436,7 @@ namespace dbmm } } - //==================================================================== - //= DrawPageIterator - //==================================================================== + // DrawPageIterator class DrawPageIterator { public: @@ -511,9 +488,7 @@ namespace dbmm sal_Int32 m_nCurrentPage; }; - //==================================================================== - //= FormComponentScripts - //==================================================================== + // FormComponentScripts class FormComponentScripts { public: @@ -549,9 +524,7 @@ namespace dbmm const sal_Int32 m_nIndex; }; - //==================================================================== - //= FormComponentIterator - //==================================================================== + // FormComponentIterator class FormComponentIterator { public: @@ -587,9 +560,7 @@ namespace dbmm }; - //==================================================================== - //= ScriptsStorage - declaration - //==================================================================== + // ScriptsStorage - declaration /** a helper class which encapsulates access to the storages for Java/Script, BeanShell, and Python scripts, i.e. all script types which can be manipulated on storage level. */ @@ -646,17 +617,13 @@ namespace dbmm SharedStorage m_xScriptsStorage; }; - //==================================================================== - //= ScriptsStorage - implementation - //==================================================================== - //-------------------------------------------------------------------- + // ScriptsStorage - implementation ScriptsStorage::ScriptsStorage( MigrationLog& _rLogger ) :m_rLogger( _rLogger ) ,m_xScriptsStorage() { } - //-------------------------------------------------------------------- ScriptsStorage::ScriptsStorage( const Reference< XModel >& _rxDocument, MigrationLog& _rLogger ) :m_rLogger( _rLogger ) ,m_xScriptsStorage() @@ -664,18 +631,15 @@ namespace dbmm bind( _rxDocument ); } - //-------------------------------------------------------------------- ScriptsStorage::~ScriptsStorage() { } - //-------------------------------------------------------------------- bool ScriptsStorage::commit() { return lcl_commitStorage_nothrow( m_xScriptsStorage ); } - //-------------------------------------------------------------------- void ScriptsStorage::bind( const Reference< XModel >& _rxDocument ) { OSL_PRECOND( !isValid(), "ScriptsStorage:bind: did not bother, yet, to check whether this is allowed!" ); @@ -710,7 +674,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- bool ScriptsStorage::hasScripts( const ScriptType _eType ) const { OSL_PRECOND( isValid(), "ScriptsStorage::hasScripts: illegal call!" ); @@ -722,7 +685,6 @@ namespace dbmm && m_xScriptsStorage->isStorageElement( rSubStorageName ); } - //-------------------------------------------------------------------- SharedStorage ScriptsStorage::getScriptsRoot( const ScriptType _eType ) const { SharedStorage xStorage; @@ -735,7 +697,6 @@ namespace dbmm return xStorage; } - //-------------------------------------------------------------------- ::std::set< OUString > ScriptsStorage::getElementNames() const { Sequence< OUString > aElementNames; @@ -751,7 +712,6 @@ namespace dbmm return aNames; } - //-------------------------------------------------------------------- void ScriptsStorage::removeScriptTypeStorage( const ScriptType _eType ) const { OUString sSubStorageName( lcl_getScriptsSubStorageName( _eType ) ); @@ -759,7 +719,6 @@ namespace dbmm m_xScriptsStorage->removeElement( sSubStorageName ); } - //-------------------------------------------------------------------- bool ScriptsStorage::removeFromDocument( const Reference< XModel >& _rxDocument, MigrationLog& _rLogger ) { try @@ -780,9 +739,7 @@ namespace dbmm return true; } - //==================================================================== - //= ProgressDelegator - //==================================================================== + // ProgressDelegator class ProgressDelegator : public IProgressConsumer { public: @@ -819,9 +776,7 @@ namespace dbmm OUString m_sAction; }; - //==================================================================== - //= PhaseGuard - //==================================================================== + // PhaseGuard class PhaseGuard { public: @@ -850,9 +805,7 @@ namespace dbmm ProgressMixer& m_rMixer; }; - //==================================================================== - //= MigrationEngine_Impl - declaration - //==================================================================== + // MigrationEngine_Impl - declaration class MigrationEngine_Impl { public: @@ -979,10 +932,7 @@ namespace dbmm ) const; }; - //==================================================================== - //= MigrationEngine_Impl - implementation - //==================================================================== - //-------------------------------------------------------------------- + // MigrationEngine_Impl - implementation MigrationEngine_Impl::MigrationEngine_Impl( const Reference<XComponentContext>& _rContext, const Reference< XOfficeDatabaseDocument >& _rxDocument, IMigrationProgress& _rProgress, MigrationLog& _rLogger ) :m_aContext( _rContext ) @@ -998,12 +948,10 @@ namespace dbmm OSL_VERIFY( impl_collectSubDocuments_nothrow() ); } - //-------------------------------------------------------------------- MigrationEngine_Impl::~MigrationEngine_Impl() { } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::migrateAll() { if ( m_aSubDocs.empty() ) @@ -1053,7 +1001,6 @@ namespace dbmm return true; } - //-------------------------------------------------------------------- namespace { void lcl_collectHierarchicalElementNames_throw( @@ -1091,7 +1038,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_collectSubDocuments_nothrow() { OSL_PRECOND( m_xDocument.is(), "MigrationEngine_Impl::impl_collectSubDocuments_nothrow: invalid document!" ); @@ -1119,7 +1065,6 @@ namespace dbmm return true; } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_handleDocument_nothrow( const SubDocument& _rDocument ) const { OSL_ENSURE( m_nCurrentDocumentID == -1, @@ -1130,7 +1075,6 @@ namespace dbmm OUString sObjectName( lcl_getSubDocumentDescription( _rDocument ) ); m_rProgress.startObject( sObjectName, OUString(), DEFAULT_DOC_PROGRESS_RANGE ); - // ----------------- // load the document Reference< ProgressCapture > pStatusIndicator( new ProgressCapture( sObjectName, m_rProgress ) ); SubDocument aSubDocument( _rDocument ); @@ -1144,7 +1088,6 @@ namespace dbmm return ( eResult == eIgnoreDoc ); } - // ----------------- // migrate the libraries ProgressDelegator aDelegator(m_rProgress, sObjectName, MacroMigrationResId(STR_MIGRATING_LIBS).toString()); ProgressMixer aProgressMixer( aDelegator ); @@ -1181,7 +1124,6 @@ namespace dbmm impl_adjustFormComponentEvents_nothrow( aSubDocument ); } - // ----------------- // clean up // store the sub document, including removal of the (now obsolete) "Scripts" sub folder if ( m_rLogger.movedAnyLibrary( m_nCurrentDocumentID ) ) @@ -1206,7 +1148,6 @@ namespace dbmm return bSuccess; } - //-------------------------------------------------------------------- namespace { static OUString lcl_createTargetLibName( const SubDocument& _rDocument, @@ -1266,7 +1207,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_checkScriptStorageStructure_nothrow( const SubDocument& _rDocument ) const { OSL_PRECOND( _rDocument.xDocument.is(), "MigrationEngine_Impl::impl_checkScriptStorageStructure_nothrow: invalid document!" ); @@ -1311,7 +1251,6 @@ namespace dbmm return true; } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_migrateScriptStorage_nothrow( const SubDocument& _rDocument, const ScriptType _eScriptType, ProgressMixer& _rProgress, const PhaseID _nPhaseID ) const { @@ -1441,7 +1380,6 @@ namespace dbmm return bSuccess; } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_migrateContainerLibraries_nothrow( const SubDocument& _rDocument, const ScriptType _eScriptType, ProgressMixer& _rProgress, const PhaseID _nPhaseID ) const { @@ -1603,7 +1541,6 @@ namespace dbmm return bSuccess; } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow( const OUString& _rScriptType, OUString& _inout_rScriptCode ) const { @@ -1696,7 +1633,6 @@ namespace dbmm return bSuccess; } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow( ScriptEventDescriptor& _inout_rScriptEvent ) const { if ( !(_inout_rScriptEvent.ScriptType.isEmpty() || _inout_rScriptEvent.ScriptCode.isEmpty()) ) @@ -1704,7 +1640,6 @@ namespace dbmm return false; } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow( Any& _inout_rScriptDescriptor ) const { ::comphelper::NamedValueCollection aScriptDesc( _inout_rScriptDescriptor ); @@ -1733,7 +1668,6 @@ namespace dbmm return true; } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_adjustDocumentEvents_nothrow( const SubDocument& _rDocument ) const { try @@ -1776,7 +1710,6 @@ namespace dbmm return true; } - //-------------------------------------------------------------------- void MigrationEngine_Impl::impl_adjustDialogElementEvents_throw( const Reference< XInterface >& _rxElement ) const { Reference< XScriptEventsSupplier > xEventsSupplier( _rxElement, UNO_QUERY_THROW ); @@ -1798,7 +1731,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_adjustDialogEvents_nothrow( Any& _inout_rDialogLibraryElement, const OUString& _rDocName, const OUString& _rDialogLibName, const OUString& _rDialogName ) const { @@ -1841,7 +1773,6 @@ namespace dbmm return true; } - //-------------------------------------------------------------------- void MigrationEngine_Impl::impl_adjustFormComponentEvents_throw( const Reference< XIndexAccess >& _rxComponentContainer ) const { FormComponentIterator aCompIter( _rxComponentContainer ); @@ -1873,7 +1804,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_adjustFormComponentEvents_nothrow( const SubDocument& _rDocument ) const { try @@ -1898,7 +1828,6 @@ namespace dbmm return true; } - //-------------------------------------------------------------------- bool MigrationEngine_Impl::impl_unprotectPasswordLibrary_throw( const Reference< XLibraryContainerPassword >& _rxPasswordManager, const ScriptType _eScriptType, const OUString& _rLibraryName ) const { @@ -1927,10 +1856,7 @@ namespace dbmm } - //==================================================================== - //= MigrationEngine - //==================================================================== - //-------------------------------------------------------------------- + // MigrationEngine MigrationEngine::MigrationEngine( const Reference<XComponentContext>& _rContext, const Reference< XOfficeDatabaseDocument >& _rxDocument, IMigrationProgress& _rProgress, MigrationLog& _rLogger ) @@ -1938,31 +1864,25 @@ namespace dbmm { } - //-------------------------------------------------------------------- MigrationEngine::~MigrationEngine() { } - //-------------------------------------------------------------------- sal_Int32 MigrationEngine::getFormCount() const { return m_pImpl->getFormCount(); } - //-------------------------------------------------------------------- sal_Int32 MigrationEngine::getReportCount() const { return m_pImpl->getReportCount(); } - //-------------------------------------------------------------------- bool MigrationEngine::migrateAll() { return m_pImpl->migrateAll(); } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/migrationengine.hxx b/dbaccess/source/ext/macromigration/migrationengine.hxx index 01f1116b699a..c4428939a283 100644 --- a/dbaccess/source/ext/macromigration/migrationengine.hxx +++ b/dbaccess/source/ext/macromigration/migrationengine.hxx @@ -24,17 +24,13 @@ #include <memory> -//........................................................................ namespace dbmm { -//........................................................................ class IMigrationProgress; class MigrationLog; - //==================================================================== - //= MigrationEngine - //==================================================================== + // MigrationEngine class MigrationEngine_Impl; class MigrationEngine { @@ -77,9 +73,7 @@ namespace dbmm ::std::auto_ptr< MigrationEngine_Impl > m_pImpl; }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_MIGRATIONENGINE_HXX diff --git a/dbaccess/source/ext/macromigration/migrationerror.hxx b/dbaccess/source/ext/macromigration/migrationerror.hxx index 0feca29d89b6..1c5b175d2d5f 100644 --- a/dbaccess/source/ext/macromigration/migrationerror.hxx +++ b/dbaccess/source/ext/macromigration/migrationerror.hxx @@ -24,10 +24,8 @@ #include <vector> -//........................................................................ namespace dbmm { -//........................................................................ enum MigrationErrorType { @@ -58,9 +56,7 @@ namespace dbmm ERR_NEW_STYLE_REPORT }; - //==================================================================== - //= MigrationError - //==================================================================== + // MigrationError /** encapsulates information about an error which happened during the migration */ struct MigrationError @@ -156,9 +152,7 @@ namespace dbmm } }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_MIGRATIONERROR_HXX diff --git a/dbaccess/source/ext/macromigration/migrationlog.cxx b/dbaccess/source/ext/macromigration/migrationlog.cxx index f4c1ac9068f5..6f45ad73d072 100644 --- a/dbaccess/source/ext/macromigration/migrationlog.cxx +++ b/dbaccess/source/ext/macromigration/migrationlog.cxx @@ -17,13 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbmm_module.hxx" #include "dbmm_global.hrc" #include "migrationerror.hxx" #include "migrationlog.hxx" - #include <comphelper/anytostring.hxx> #include <tools/string.hxx> #include <rtl/ustrbuf.hxx> @@ -32,12 +30,9 @@ #include <map> #include <list> -//........................................................................ namespace dbmm { - //==================================================================== - //= LibraryEntry - //==================================================================== + // LibraryEntry struct LibraryEntry { ScriptType eType; @@ -59,9 +54,7 @@ namespace dbmm } }; - //==================================================================== - //= DocumentEntry - //==================================================================== + // DocumentEntry struct DocumentEntry { SubDocumentType eType; @@ -82,19 +75,13 @@ namespace dbmm } }; - //==================================================================== - //= DocumentLogs - //==================================================================== + // DocumentLogs typedef ::std::map< DocumentID, DocumentEntry > DocumentLogs; - //==================================================================== - //= ErrorLog - //==================================================================== + // ErrorLog typedef ::std::list< MigrationError > ErrorLog; - //==================================================================== - //= MigrationLog_Data - //==================================================================== + // MigrationLog_Data struct MigrationLog_Data { OUString sBackupLocation; @@ -103,45 +90,36 @@ namespace dbmm ErrorLog aWarnings; }; - //==================================================================== - //= MigrationLog - //==================================================================== - //-------------------------------------------------------------------- + // MigrationLog MigrationLog::MigrationLog() :m_pData( new MigrationLog_Data ) { } - //-------------------------------------------------------------------- MigrationLog::~MigrationLog() { } - //-------------------------------------------------------------------- void MigrationLog::logFailure( const MigrationError& _rError ) { m_pData->aFailures.push_back( _rError ); } - //-------------------------------------------------------------------- void MigrationLog::logRecoverable( const MigrationError& _rError ) { m_pData->aWarnings.push_back( _rError ); } - //-------------------------------------------------------------------- bool MigrationLog::hadFailure() const { return !m_pData->aFailures.empty(); } - //-------------------------------------------------------------------- void MigrationLog::backedUpDocument( const OUString& _rNewDocumentLocation ) { m_pData->sBackupLocation = _rNewDocumentLocation; } - //-------------------------------------------------------------------- DocumentID MigrationLog::startedDocument( const SubDocumentType _eType, const OUString& _rName ) { #if OSL_DEBUG_LEVEL > 0 @@ -165,7 +143,6 @@ namespace dbmm return nID; } - //-------------------------------------------------------------------- void MigrationLog::movedLibrary( const DocumentID _nDocID, const ScriptType _eScriptType, const OUString& _rOriginalLibName, const OUString& _rNewLibName ) { @@ -176,7 +153,6 @@ namespace dbmm rDocEntry.aMovedLibraries.push_back( LibraryEntry( _eScriptType, _rOriginalLibName, _rNewLibName ) ); } - //-------------------------------------------------------------------- void MigrationLog::finishedDocument( const DocumentID _nDocID ) { OSL_ENSURE( m_pData->aDocumentLogs.find( _nDocID ) != m_pData->aDocumentLogs.end(), @@ -187,7 +163,6 @@ namespace dbmm // nothing to do here } - //-------------------------------------------------------------------- const OUString& MigrationLog::getNewLibraryName( DocumentID _nDocID, ScriptType _eScriptType, const OUString& _rOriginalLibName ) const { @@ -216,10 +191,8 @@ namespace dbmm return s_sEmptyString; } - //-------------------------------------------------------------------- namespace { - //---------------------------------------------------------------- static void lcl_appendErrorDescription( OUStringBuffer& _inout_rBuffer, const MigrationError& _rError ) { const sal_Char* pAsciiErrorDescription( NULL ); @@ -378,7 +351,6 @@ namespace dbmm } } - //---------------------------------------------------------------- void lcl_describeErrors( OUStringBuffer& _rBuffer, const ErrorLog& _rErrors, const sal_uInt16 _nHeadingResId ) { _rBuffer.appendAscii( "=== " ); @@ -408,7 +380,6 @@ namespace dbmm } } - //-------------------------------------------------------------------- bool MigrationLog::movedAnyLibrary( const DocumentID _nDocID ) { DocumentLogs::const_iterator docPos = m_pData->aDocumentLogs.find( _nDocID ); @@ -420,7 +391,6 @@ namespace dbmm return !docPos->second.aMovedLibraries.empty(); } - //-------------------------------------------------------------------- OUString MigrationLog::getCompleteLog() const { OUStringBuffer aBuffer; @@ -483,8 +453,6 @@ namespace dbmm return aBuffer.makeStringAndClear(); } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/migrationlog.hxx b/dbaccess/source/ext/macromigration/migrationlog.hxx index 5264505ffd1d..498739f2de6b 100644 --- a/dbaccess/source/ext/macromigration/migrationlog.hxx +++ b/dbaccess/source/ext/macromigration/migrationlog.hxx @@ -26,17 +26,13 @@ #include <memory> -//........................................................................ namespace dbmm { -//........................................................................ typedef sal_Int16 DocumentID; struct MigrationError; - //==================================================================== - //= MigrationLog - //==================================================================== + // MigrationLog struct MigrationLog_Data; class MigrationLog { @@ -44,7 +40,6 @@ namespace dbmm MigrationLog(); ~MigrationLog(); - //---------------------------------------------------------------- //- event logging /** logs an unrecoverable error during the migration process @@ -80,7 +75,6 @@ namespace dbmm */ void finishedDocument( const DocumentID _nDocID ); - //---------------------------------------------------------------- //- information retrieval /** retrieves the new name of a library @@ -110,9 +104,7 @@ namespace dbmm ::std::auto_ptr< MigrationLog_Data > m_pData; }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_MIGRATIONLOG_HXX diff --git a/dbaccess/source/ext/macromigration/migrationprogress.hxx b/dbaccess/source/ext/macromigration/migrationprogress.hxx index bf9943c7538a..804f2c24cb8d 100644 --- a/dbaccess/source/ext/macromigration/migrationprogress.hxx +++ b/dbaccess/source/ext/macromigration/migrationprogress.hxx @@ -20,14 +20,10 @@ #ifndef DBACCESS_MIGRATIONPROGRESS_HXX #define DBACCESS_MIGRATIONPROGRESS_HXX -//........................................................................ namespace dbmm { -//........................................................................ - //==================================================================== - //= IMigrationProgress - //==================================================================== + // IMigrationProgress class SAL_NO_VTABLE IMigrationProgress { public: @@ -43,9 +39,7 @@ namespace dbmm ~IMigrationProgress() {} }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_MIGRATIONPROGRESS_HXX diff --git a/dbaccess/source/ext/macromigration/progresscapture.cxx b/dbaccess/source/ext/macromigration/progresscapture.cxx index efdb8af3c3d4..14cb911aeac7 100644 --- a/dbaccess/source/ext/macromigration/progresscapture.cxx +++ b/dbaccess/source/ext/macromigration/progresscapture.cxx @@ -23,10 +23,8 @@ #include <vcl/svapp.hxx> #include <osl/mutex.hxx> -//........................................................................ namespace dbmm { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -38,9 +36,7 @@ namespace dbmm using ::com::sun::star::uno::Any; using ::com::sun::star::uno::makeAny; - //==================================================================== - //= ProgressCapture_Data - //==================================================================== + // ProgressCapture_Data struct ProgressCapture_Data { ProgressCapture_Data( const OUString& _rObjectName, IMigrationProgress& _rMasterProgress ) @@ -55,28 +51,22 @@ namespace dbmm bool bDisposed; }; - //==================================================================== - //= ProgressCapture - //==================================================================== - //-------------------------------------------------------------------- + // ProgressCapture ProgressCapture::ProgressCapture( const OUString& _rObjectName, IMigrationProgress& _rMasterProgress ) :m_pData( new ProgressCapture_Data( _rObjectName, _rMasterProgress ) ) { } - //-------------------------------------------------------------------- ProgressCapture::~ProgressCapture() { } - //-------------------------------------------------------------------- void ProgressCapture::dispose() { SolarMutexGuard aGuard; m_pData->bDisposed = true; } - //-------------------------------------------------------------------- void SAL_CALL ProgressCapture::start( const OUString& _rText, ::sal_Int32 _nRange ) throw (RuntimeException) { SolarMutexGuard aGuard; @@ -84,7 +74,6 @@ namespace dbmm m_pData->rMasterProgress.startObject( m_pData->sObjectName, _rText, _nRange ); } - //-------------------------------------------------------------------- void SAL_CALL ProgressCapture::end( ) throw (RuntimeException) { SolarMutexGuard aGuard; @@ -92,7 +81,6 @@ namespace dbmm m_pData->rMasterProgress.endObject(); } - //-------------------------------------------------------------------- void SAL_CALL ProgressCapture::setText( const OUString& _rText ) throw (RuntimeException) { SolarMutexGuard aGuard; @@ -100,7 +88,6 @@ namespace dbmm m_pData->rMasterProgress.setObjectProgressText( _rText ); } - //-------------------------------------------------------------------- void SAL_CALL ProgressCapture::setValue( ::sal_Int32 _nValue ) throw (RuntimeException) { SolarMutexGuard aGuard; @@ -108,14 +95,11 @@ namespace dbmm m_pData->rMasterProgress.setObjectProgressValue( _nValue ); } - //-------------------------------------------------------------------- void SAL_CALL ProgressCapture::reset( ) throw (RuntimeException) { OSL_FAIL( "ProgressCapture::reset: not implemented!" ); } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/progresscapture.hxx b/dbaccess/source/ext/macromigration/progresscapture.hxx index c3a5b3a1b29a..f060d1147d59 100644 --- a/dbaccess/source/ext/macromigration/progresscapture.hxx +++ b/dbaccess/source/ext/macromigration/progresscapture.hxx @@ -26,16 +26,12 @@ #include <memory> -//........................................................................ namespace dbmm { -//........................................................................ class IMigrationProgress; - //==================================================================== - //= ProgressCapture - //==================================================================== + // ProgressCapture typedef ::cppu::WeakImplHelper1 < ::com::sun::star::task::XStatusIndicator > ProgressCapture_Base; @@ -62,9 +58,7 @@ namespace dbmm ::std::auto_ptr< ProgressCapture_Data > m_pData; }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_PROGRESSCAPTURE_HXX diff --git a/dbaccess/source/ext/macromigration/progressmixer.cxx b/dbaccess/source/ext/macromigration/progressmixer.cxx index 5f883d38f7bb..87c7d84579d1 100644 --- a/dbaccess/source/ext/macromigration/progressmixer.cxx +++ b/dbaccess/source/ext/macromigration/progressmixer.cxx @@ -23,14 +23,11 @@ #include <map> -//........................................................................ namespace dbmm { #define OVERALL_RANGE 100000 - //==================================================================== - //= misc types - //==================================================================== + // misc types struct PhaseData { // the weight of the phase, relative to all other phases @@ -63,9 +60,7 @@ namespace dbmm typedef ::std::map< PhaseID, PhaseData > Phases; - //==================================================================== - //= ProgressMixer_Data - //==================================================================== + // ProgressMixer_Data struct ProgressMixer_Data { Phases aPhases; @@ -84,17 +79,14 @@ namespace dbmm } }; - //-------------------------------------------------------------------- namespace { #if OSL_DEBUG_LEVEL > 0 - //---------------------------------------------------------------- bool lcl_isRunning( const ProgressMixer_Data& _rData ) { return _rData.pCurrentPhase != _rData.aPhases.end(); } #endif - //---------------------------------------------------------------- void lcl_ensureInitialized( ProgressMixer_Data& _rData ) { OSL_PRECOND( _rData.nWeightSum, "lcl_ensureInitialized: we have no phases, this will crash!" ); @@ -122,21 +114,16 @@ namespace dbmm } } - //==================================================================== - //= ProgressMixer - //==================================================================== - //-------------------------------------------------------------------- + // ProgressMixer ProgressMixer::ProgressMixer( IProgressConsumer& _rConsumer ) :m_pData( new ProgressMixer_Data( _rConsumer ) ) { } - //-------------------------------------------------------------------- ProgressMixer::~ProgressMixer() { } - //-------------------------------------------------------------------- void ProgressMixer::registerPhase( const PhaseID _nID, const PhaseWeight _nWeight ) { OSL_PRECOND( !lcl_isRunning( *m_pData ), "ProgressMixer::registerPhase: already running!" ); @@ -146,7 +133,6 @@ namespace dbmm m_pData->nWeightSum += _nWeight; } - //-------------------------------------------------------------------- void ProgressMixer::startPhase( const PhaseID _nID, const sal_uInt32 _nPhaseRange ) { OSL_ENSURE( m_pData->aPhases.find( _nID ) != m_pData->aPhases.end(), @@ -156,7 +142,6 @@ namespace dbmm m_pData->pCurrentPhase = m_pData->aPhases.find( _nID ); } - //-------------------------------------------------------------------- void ProgressMixer::advancePhase( const sal_uInt32 _nPhaseProgress ) { OSL_PRECOND( lcl_isRunning( *m_pData ), "ProgresMixer::advancePhase: not running!" ); @@ -174,7 +159,6 @@ namespace dbmm m_pData->rConsumer.advance( nOverallProgress ); } - //-------------------------------------------------------------------- void ProgressMixer::endPhase() { OSL_PRECOND( lcl_isRunning( *m_pData ), "ProgresMixer::endPhase: not running!" ); @@ -193,8 +177,6 @@ namespace dbmm m_pData->rConsumer.end(); } -//........................................................................ } // namespace dbmm -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ext/macromigration/progressmixer.hxx b/dbaccess/source/ext/macromigration/progressmixer.hxx index 39d6ccd32135..5155d06d8563 100644 --- a/dbaccess/source/ext/macromigration/progressmixer.hxx +++ b/dbaccess/source/ext/macromigration/progressmixer.hxx @@ -24,17 +24,13 @@ #include <memory> -//........................................................................ namespace dbmm { -//........................................................................ typedef sal_uInt32 PhaseID; typedef sal_uInt32 PhaseWeight; - //==================================================================== - //= IProgressConsumer - //==================================================================== + // IProgressConsumer class SAL_NO_VTABLE IProgressConsumer { public: @@ -46,9 +42,7 @@ namespace dbmm ~IProgressConsumer() {} }; - //==================================================================== - //= ProgressMixer - //==================================================================== + // ProgressMixer struct ProgressMixer_Data; /** a class which mixes (i.e. concatenates) progress values from different sources/phases, with different weight @@ -86,9 +80,7 @@ namespace dbmm ::std::auto_ptr< ProgressMixer_Data > m_pData; }; -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_PROGRESSMIXER_HXX diff --git a/dbaccess/source/ext/macromigration/rangeprogressbar.hxx b/dbaccess/source/ext/macromigration/rangeprogressbar.hxx index de9341636718..5e5614a7f498 100644 --- a/dbaccess/source/ext/macromigration/rangeprogressbar.hxx +++ b/dbaccess/source/ext/macromigration/rangeprogressbar.hxx @@ -22,14 +22,10 @@ #include <vcl/prgsbar.hxx> -//........................................................................ namespace dbmm { -//........................................................................ - //==================================================================== - //= RangeProgressBar - //==================================================================== + // RangeProgressBar /** a slight extension of the usual progress bar, which is able to remember a range */ class RangeProgressBar : public ProgressBar @@ -59,7 +55,6 @@ namespace dbmm using ProgressBar::GetValue; }; - //-------------------------------------------------------------------- inline void RangeProgressBar::SetRange( sal_uInt32 _nRange ) { m_nRange = _nRange; @@ -67,28 +62,22 @@ namespace dbmm m_nRange = 100; } - //-------------------------------------------------------------------- inline sal_uInt32 RangeProgressBar::GetRange() const { return m_nRange; } - //-------------------------------------------------------------------- inline void RangeProgressBar::SetValue( sal_uInt32 _nValue ) { ProgressBar::SetValue( (sal_uInt16)( 100.0 * _nValue / m_nRange ) ); } - //-------------------------------------------------------------------- inline sal_uInt32 RangeProgressBar::GetValue() const { return (sal_uInt32)( ProgressBar::GetValue() / 100.0 * m_nRange ); } - -//........................................................................ } // namespace dbmm -//........................................................................ #endif // DBACCESS_RANGEPROGRESSBAR_HXX diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx index ccd37872ff50..871b461c767a 100644 --- a/dbaccess/source/filter/xml/dbloader2.cxx +++ b/dbaccess/source/filter/xml/dbloader2.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "flt_reghelper.hxx" #include "xmlstrings.hrc" @@ -89,7 +88,6 @@ using namespace ::com::sun::star::ui::dialogs; using ::com::sun::star::awt::XWindow; using ::com::sun::star::sdb::application::NamedDatabaseObject; -// ------------------------------------------------------------------------- namespace dbaxml { @@ -116,12 +114,12 @@ public: virtual OUString SAL_CALL detect( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Descriptor ) throw (::com::sun::star::uno::RuntimeException); }; -// ------------------------------------------------------------------------- + DBTypeDetection::DBTypeDetection(const Reference< XComponentContext >& _rxContext) :m_aContext( _rxContext ) { } -// ------------------------------------------------------------------------- + OUString SAL_CALL DBTypeDetection::detect( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Descriptor ) throw (::com::sun::star::uno::RuntimeException) { try @@ -182,18 +180,17 @@ OUString SAL_CALL DBTypeDetection::detect( ::com::sun::star::uno::Sequence< ::co } catch(Exception&){} return OUString(); } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL DBTypeDetection::Create( const Reference< XMultiServiceFactory > & rSMgr ) { return *(new DBTypeDetection( comphelper::getComponentContext(rSMgr) )); } -// ------------------------------------------------------------------------- + // XServiceInfo OUString SAL_CALL DBTypeDetection::getImplementationName() throw( ) { return getImplementationName_Static(); } -// ------------------------------------------------------------------------- // XServiceInfo sal_Bool SAL_CALL DBTypeDetection::supportsService(const OUString& ServiceName) throw( ) @@ -206,13 +203,13 @@ sal_Bool SAL_CALL DBTypeDetection::supportsService(const OUString& ServiceName) return sal_True; return sal_False; } -// ------------------------------------------------------------------------- + // XServiceInfo Sequence< OUString > SAL_CALL DBTypeDetection::getSupportedServiceNames(void) throw( ) { return getSupportedServiceNames_Static(); } -// ------------------------------------------------------------------------- + // ORegistryServiceManager_Static Sequence< OUString > DBTypeDetection::getSupportedServiceNames_Static(void) throw( ) { @@ -220,12 +217,11 @@ Sequence< OUString > DBTypeDetection::getSupportedServiceNames_Static(void) thro aSNS.getArray()[0] = OUString("com.sun.star.document.ExtendedTypeDetection"); return aSNS; } -// ------------------------------------------------------------------------- + extern "C" void SAL_CALL createRegistryInfo_DBTypeDetection() { static ::dbaxml::OMultiInstanceAutoRegistration< ::dbaxml::DBTypeDetection > aAutoRegistration; } -// ----------------------------------------------------------------------------- class DBContentLoader : public ::cppu::WeakImplHelper2< XFrameLoader, XServiceInfo> { @@ -263,6 +259,7 @@ public: private: sal_Bool impl_executeNewDatabaseWizard( Reference< XModel >& _rxModel, sal_Bool& _bShouldStartTableWizard ); }; + DBG_NAME(DBContentLoader) DBContentLoader::DBContentLoader(const Reference< XComponentContext >& _rxFactory) @@ -272,27 +269,23 @@ DBContentLoader::DBContentLoader(const Reference< XComponentContext >& _rxFactor DBG_CTOR(DBContentLoader,NULL); } -// ------------------------------------------------------------------------- DBContentLoader::~DBContentLoader() { DBG_DTOR(DBContentLoader,NULL); } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- Reference< XInterface > SAL_CALL DBContentLoader::Create( const Reference< XMultiServiceFactory > & rSMgr ) { return *(new DBContentLoader( comphelper::getComponentContext(rSMgr) )); } -// ------------------------------------------------------------------------- + // XServiceInfo OUString SAL_CALL DBContentLoader::getImplementationName() throw( ) { return getImplementationName_Static(); } -// ------------------------------------------------------------------------- // XServiceInfo sal_Bool SAL_CALL DBContentLoader::supportsService(const OUString& ServiceName) throw( ) @@ -305,13 +298,13 @@ sal_Bool SAL_CALL DBContentLoader::supportsService(const OUString& ServiceName) return sal_True; return sal_False; } -// ------------------------------------------------------------------------- + // XServiceInfo Sequence< OUString > SAL_CALL DBContentLoader::getSupportedServiceNames(void) throw( ) { return getSupportedServiceNames_Static(); } -// ------------------------------------------------------------------------- + // ORegistryServiceManager_Static Sequence< OUString > DBContentLoader::getSupportedServiceNames_Static(void) throw( ) { @@ -320,10 +313,8 @@ Sequence< OUString > DBContentLoader::getSupportedServiceNames_Static(void) thro return aSNS; } -// ----------------------------------------------------------------------- namespace { - // ................................................................... sal_Bool lcl_urlAllowsInteraction( const Reference<XComponentContext> & _rContext, const OUString& _rURL ) { bool bDoesAllow = sal_False; @@ -342,7 +333,6 @@ namespace return bDoesAllow; } - // ................................................................... Reference< XWindow > lcl_getTopMostWindow( const Reference<XComponentContext> & _rxContext ) { Reference< XWindow > xWindow; @@ -363,7 +353,6 @@ namespace } } -// ----------------------------------------------------------------------- sal_Bool DBContentLoader::impl_executeNewDatabaseWizard( Reference< XModel >& _rxModel, sal_Bool& _bShouldStartTableWizard ) { Sequence< Any > aWizardArgs(2); @@ -393,7 +382,6 @@ sal_Bool DBContentLoader::impl_executeNewDatabaseWizard( Reference< XModel >& _r return bSuccess; } -// ----------------------------------------------------------------------- void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OUString& _rURL, const Sequence< PropertyValue >& rArgs, const Reference< XLoadEventListener > & rListener) throw(::com::sun::star::uno::RuntimeException) @@ -579,11 +567,10 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU ::comphelper::disposeComponent(xModel); } -// ----------------------------------------------------------------------- void DBContentLoader::cancel(void) throw() { } -// ----------------------------------------------------------------------------- + IMPL_LINK( DBContentLoader, OnStartTableWizard, void*, /*NOTINTERESTEDIN*/ ) { m_nStartWizard = 0; @@ -607,13 +594,14 @@ IMPL_LINK( DBContentLoader, OnStartTableWizard, void*, /*NOTINTERESTEDIN*/ ) m_xMySelf = NULL; return 0L; } + } -// ------------------------------------------------------------------------- + extern "C" void SAL_CALL createRegistryInfo_DBContentLoader2() { static ::dbaxml::OMultiInstanceAutoRegistration< ::dbaxml::DBContentLoader > aAutoRegistration; } -// ------------------------------------------------------------------------- + extern "C" void SAL_CALL writeDBLoaderInfo2(void* pRegistryKey) { Reference< XRegistryKey> xKey(reinterpret_cast< XRegistryKey*>(pRegistryKey)); @@ -629,6 +617,5 @@ extern "C" void SAL_CALL writeDBLoaderInfo2(void* pRegistryKey) xNewKey = xLoaderKey->createKey( OUString("Pattern") ); xNewKey->setAsciiValue( OUString("private:factory/sdatabase") ); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlAutoStyle.cxx b/dbaccess/source/filter/xml/xmlAutoStyle.cxx index 98d4cd8273b7..c8faf141dd9d 100644 --- a/dbaccess/source/filter/xml/xmlAutoStyle.cxx +++ b/dbaccess/source/filter/xml/xmlAutoStyle.cxx @@ -67,8 +67,8 @@ void OXMLAutoStylePoolP::exportStyleAttributes( } } } + DBG_NAME(OXMLAutoStylePoolP) -// ----------------------------------------------------------------------------- OXMLAutoStylePoolP::OXMLAutoStylePoolP(ODBExport& rTempODBExport): SvXMLAutoStylePoolP(rTempODBExport), rODBExport(rTempODBExport) @@ -76,16 +76,13 @@ OXMLAutoStylePoolP::OXMLAutoStylePoolP(ODBExport& rTempODBExport): DBG_CTOR(OXMLAutoStylePoolP,NULL); } -// ----------------------------------------------------------------------------- + OXMLAutoStylePoolP::~OXMLAutoStylePoolP() { DBG_DTOR(OXMLAutoStylePoolP,NULL); } -// ----------------------------------------------------------------------------- -//---------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlAutoStyle.hxx b/dbaccess/source/filter/xml/xmlAutoStyle.hxx index 0082a46c33e2..f55a25f2de73 100644 --- a/dbaccess/source/filter/xml/xmlAutoStyle.hxx +++ b/dbaccess/source/filter/xml/xmlAutoStyle.hxx @@ -43,9 +43,7 @@ namespace dbaxml OXMLAutoStylePoolP(ODBExport& rXMLExport); virtual ~OXMLAutoStylePoolP(); }; -// ----------------------------------------------------------------------------- } // dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLAUTOSTYLE_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlColumn.cxx b/dbaccess/source/filter/xml/xmlColumn.cxx index c99b451751b2..b541b019ba32 100644 --- a/dbaccess/source/filter/xml/xmlColumn.cxx +++ b/dbaccess/source/filter/xml/xmlColumn.cxx @@ -100,14 +100,13 @@ OXMLColumn::OXMLColumn( ODBFilter& rImport } } } -// ----------------------------------------------------------------------------- OXMLColumn::~OXMLColumn() { DBG_DTOR(OXMLColumn,NULL); } -// ----------------------------------------------------------------------------- + void OXMLColumn::EndElement() { Reference<XDataDescriptorFactory> xFac(m_xParentContainer,UNO_QUERY); @@ -172,13 +171,12 @@ void OXMLColumn::EndElement() } } } -// ----------------------------------------------------------------------------- + ODBFilter& OXMLColumn::GetOwnImport() { return static_cast<ODBFilter&>(GetImport()); } -//---------------------------------------------------------------------------- + } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlColumn.hxx b/dbaccess/source/filter/xml/xmlColumn.hxx index 95cd7266aa44..e19c8a5b6ef1 100644 --- a/dbaccess/source/filter/xml/xmlColumn.hxx +++ b/dbaccess/source/filter/xml/xmlColumn.hxx @@ -51,9 +51,7 @@ namespace dbaxml virtual ~OXMLColumn(); virtual void EndElement(); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLCOLUMN_HXX diff --git a/dbaccess/source/filter/xml/xmlComponent.cxx b/dbaccess/source/filter/xml/xmlComponent.cxx index e6626ff9d362..7bb13c554eb1 100644 --- a/dbaccess/source/filter/xml/xmlComponent.cxx +++ b/dbaccess/source/filter/xml/xmlComponent.cxx @@ -110,16 +110,13 @@ OXMLComponent::OXMLComponent( ODBFilter& rImport } } } -// ----------------------------------------------------------------------------- OXMLComponent::~OXMLComponent() { DBG_DTOR(OXMLComponent,NULL); } -// ----------------------------------------------------------------------------- -//---------------------------------------------------------------------------- + } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlComponent.hxx b/dbaccess/source/filter/xml/xmlComponent.hxx index 55c69d8178a9..a0cb924a8ae0 100644 --- a/dbaccess/source/filter/xml/xmlComponent.hxx +++ b/dbaccess/source/filter/xml/xmlComponent.hxx @@ -22,7 +22,6 @@ #include <xmloff/xmlictxt.hxx> #include <com/sun/star/container/XNameAccess.hpp> - namespace dbaxml { class ODBFilter; @@ -45,9 +44,7 @@ namespace dbaxml ); virtual ~OXMLComponent(); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLCOMPONENT_HXX diff --git a/dbaccess/source/filter/xml/xmlConnectionData.cxx b/dbaccess/source/filter/xml/xmlConnectionData.cxx index cc8fbdba4791..8bd009670569 100644 --- a/dbaccess/source/filter/xml/xmlConnectionData.cxx +++ b/dbaccess/source/filter/xml/xmlConnectionData.cxx @@ -45,14 +45,12 @@ OXMLConnectionData::OXMLConnectionData( ODBFilter& rImport, rImport.setNewFormat(true); DBG_CTOR(OXMLConnectionData,NULL); } -// ----------------------------------------------------------------------------- OXMLConnectionData::~OXMLConnectionData() { DBG_DTOR(OXMLConnectionData,NULL); } -// ----------------------------------------------------------------------------- SvXMLImportContext* OXMLConnectionData::CreateChildContext( sal_uInt16 nPrefix, @@ -98,14 +96,12 @@ SvXMLImportContext* OXMLConnectionData::CreateChildContext( return pContext; } -// ----------------------------------------------------------------------------- + ODBFilter& OXMLConnectionData::GetOwnImport() { return static_cast<ODBFilter&>(GetImport()); } -// ----------------------------------------------------------------------------- -//---------------------------------------------------------------------------- + } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlConnectionData.hxx b/dbaccess/source/filter/xml/xmlConnectionData.hxx index 8bd938d43503..4666cc442dd8 100644 --- a/dbaccess/source/filter/xml/xmlConnectionData.hxx +++ b/dbaccess/source/filter/xml/xmlConnectionData.hxx @@ -41,9 +41,7 @@ namespace dbaxml const OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLCONNECTIONDATA_HXX_INCLUDED diff --git a/dbaccess/source/filter/xml/xmlConnectionResource.cxx b/dbaccess/source/filter/xml/xmlConnectionResource.cxx index 6eb80095828d..f2fb02a3d515 100644 --- a/dbaccess/source/filter/xml/xmlConnectionResource.cxx +++ b/dbaccess/source/filter/xml/xmlConnectionResource.cxx @@ -89,16 +89,13 @@ OXMLConnectionResource::OXMLConnectionResource( ODBFilter& rImport, } } } -// ----------------------------------------------------------------------------- OXMLConnectionResource::~OXMLConnectionResource() { DBG_DTOR(OXMLConnectionResource,NULL); } -// ----------------------------------------------------------------------------- -//---------------------------------------------------------------------------- + } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlConnectionResource.hxx b/dbaccess/source/filter/xml/xmlConnectionResource.hxx index b371a3e6d86f..6b3267068cb3 100644 --- a/dbaccess/source/filter/xml/xmlConnectionResource.hxx +++ b/dbaccess/source/filter/xml/xmlConnectionResource.hxx @@ -35,9 +35,7 @@ namespace dbaxml const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList); virtual ~OXMLConnectionResource(); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLCONNECTIONRESOURCE_HXX_INCLUDED diff --git a/dbaccess/source/filter/xml/xmlDataSource.cxx b/dbaccess/source/filter/xml/xmlDataSource.cxx index 9b62d4d02beb..530b49e19136 100644 --- a/dbaccess/source/filter/xml/xmlDataSource.cxx +++ b/dbaccess/source/filter/xml/xmlDataSource.cxx @@ -199,14 +199,12 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport, } } } -// ----------------------------------------------------------------------------- OXMLDataSource::~OXMLDataSource() { DBG_DTOR(OXMLDataSource,NULL); } -// ----------------------------------------------------------------------------- SvXMLImportContext* OXMLDataSource::CreateChildContext( sal_uInt16 nPrefix, @@ -259,15 +257,12 @@ SvXMLImportContext* OXMLDataSource::CreateChildContext( return pContext; } -// ----------------------------------------------------------------------------- + ODBFilter& OXMLDataSource::GetOwnImport() { return static_cast<ODBFilter&>(GetImport()); } -// ----------------------------------------------------------------------------- -//---------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlDataSource.hxx b/dbaccess/source/filter/xml/xmlDataSource.hxx index d1a763cbf04a..715ef33199b8 100644 --- a/dbaccess/source/filter/xml/xmlDataSource.hxx +++ b/dbaccess/source/filter/xml/xmlDataSource.hxx @@ -47,9 +47,7 @@ namespace dbaxml const OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLDATASOURCE_HXX diff --git a/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx b/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx index 1a0704b237c1..e59f26757499 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx +++ b/dbaccess/source/filter/xml/xmlDataSourceInfo.cxx @@ -130,16 +130,13 @@ OXMLDataSourceInfo::OXMLDataSourceInfo( ODBFilter& rImport } } } -// ----------------------------------------------------------------------------- OXMLDataSourceInfo::~OXMLDataSourceInfo() { DBG_DTOR(OXMLDataSourceInfo,NULL); } -// ----------------------------------------------------------------------------- -//---------------------------------------------------------------------------- + } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlDataSourceInfo.hxx b/dbaccess/source/filter/xml/xmlDataSourceInfo.hxx index b7bc57506574..875cc612af56 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceInfo.hxx +++ b/dbaccess/source/filter/xml/xmlDataSourceInfo.hxx @@ -35,9 +35,7 @@ namespace dbaxml ,const sal_uInt16 _nToken); virtual ~OXMLDataSourceInfo(); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLDATASOURCEINFO_HXX diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx index 031690515fae..8d9460ec9bd1 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx @@ -97,13 +97,12 @@ OXMLDataSourceSetting::OXMLDataSourceSetting( ODBFilter& rImport } } -// ----------------------------------------------------------------------------- OXMLDataSourceSetting::~OXMLDataSourceSetting() { DBG_DTOR(OXMLDataSourceSetting,NULL); } -// ----------------------------------------------------------------------------- + SvXMLImportContext* OXMLDataSourceSetting::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, @@ -129,7 +128,7 @@ SvXMLImportContext* OXMLDataSourceSetting::CreateChildContext( return pContext; } -// ----------------------------------------------------------------------------- + void OXMLDataSourceSetting::EndElement() { if ( !m_aSetting.Name.isEmpty() ) @@ -145,13 +144,13 @@ void OXMLDataSourceSetting::EndElement() GetOwnImport().addInfo(m_aSetting); } } -// ----------------------------------------------------------------------------- + void OXMLDataSourceSetting::Characters( const OUString& rChars ) { if ( m_pContainer ) m_pContainer->addValue(rChars); } -// ----------------------------------------------------------------------------- + void OXMLDataSourceSetting::addValue(const OUString& _sValue) { Any aValue; @@ -167,12 +166,12 @@ void OXMLDataSourceSetting::addValue(const OUString& _sValue) m_aInfoSequence[nPos] = aValue; } } -// ----------------------------------------------------------------------------- + ODBFilter& OXMLDataSourceSetting::GetOwnImport() { return static_cast<ODBFilter&>(GetImport()); } -// ----------------------------------------------------------------------------- + Any OXMLDataSourceSetting::convertString(const ::com::sun::star::uno::Type& _rExpectedType, const OUString& _rReadCharacters) { Any aReturn; @@ -231,8 +230,6 @@ Any OXMLDataSourceSetting::convertString(const ::com::sun::star::uno::Type& _rEx return aReturn; } -//---------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx index e0206fe67e51..3180ffb93e64 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.hxx @@ -52,16 +52,13 @@ namespace dbaxml virtual void Characters( const OUString& rChars ); - /** adds value to property @param _sValue The value to add. */ void addValue(const OUString& _sValue); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLDATASOURCESETTING_HXX diff --git a/dbaccess/source/filter/xml/xmlDataSourceSettings.cxx b/dbaccess/source/filter/xml/xmlDataSourceSettings.cxx index 4b15c4527662..573b30c5b7f0 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSettings.cxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSettings.cxx @@ -44,14 +44,13 @@ OXMLDataSourceSettings::OXMLDataSourceSettings( ODBFilter& rImport DBG_CTOR(OXMLDataSourceSettings,NULL); } -// ----------------------------------------------------------------------------- OXMLDataSourceSettings::~OXMLDataSourceSettings() { DBG_DTOR(OXMLDataSourceSettings,NULL); } -// ----------------------------------------------------------------------------- + SvXMLImportContext* OXMLDataSourceSettings::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, @@ -73,14 +72,12 @@ SvXMLImportContext* OXMLDataSourceSettings::CreateChildContext( return pContext; } -// ----------------------------------------------------------------------------- + ODBFilter& OXMLDataSourceSettings::GetOwnImport() { return static_cast<ODBFilter&>(GetImport()); } -// ----------------------------------------------------------------------------- -//---------------------------------------------------------------------------- + } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlDataSourceSettings.hxx b/dbaccess/source/filter/xml/xmlDataSourceSettings.hxx index 35e8b45830d3..57b024ccbcf2 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSettings.hxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSettings.hxx @@ -36,9 +36,7 @@ namespace dbaxml const OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLDATASOURCESETTINGS_HXX diff --git a/dbaccess/source/filter/xml/xmlDatabase.cxx b/dbaccess/source/filter/xml/xmlDatabase.cxx index 26b727440ff8..34ba88501eb3 100644 --- a/dbaccess/source/filter/xml/xmlDatabase.cxx +++ b/dbaccess/source/filter/xml/xmlDatabase.cxx @@ -47,14 +47,12 @@ OXMLDatabase::OXMLDatabase( ODBFilter& rImport, DBG_CTOR(OXMLDatabase,NULL); } -// ----------------------------------------------------------------------------- OXMLDatabase::~OXMLDatabase() { DBG_DTOR(OXMLDatabase,NULL); } -// ----------------------------------------------------------------------------- SvXMLImportContext* OXMLDatabase::CreateChildContext( sal_uInt16 nPrefix, @@ -129,22 +127,19 @@ SvXMLImportContext* OXMLDatabase::CreateChildContext( if( !pContext ) pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); - return pContext; } -// ----------------------------------------------------------------------------- + ODBFilter& OXMLDatabase::GetOwnImport() { return static_cast<ODBFilter&>(GetImport()); } -// ----------------------------------------------------------------------------- + void OXMLDatabase::EndElement() { GetOwnImport().setPropertyInfo(); } -//---------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlDatabase.hxx b/dbaccess/source/filter/xml/xmlDatabase.hxx index 42d170094057..ed75204e8efa 100644 --- a/dbaccess/source/filter/xml/xmlDatabase.hxx +++ b/dbaccess/source/filter/xml/xmlDatabase.hxx @@ -39,9 +39,7 @@ namespace dbaxml virtual void EndElement(); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLDATABASE_HXX diff --git a/dbaccess/source/filter/xml/xmlDatabaseDescription.cxx b/dbaccess/source/filter/xml/xmlDatabaseDescription.cxx index ceb3e3c3d2b8..b3102490bb93 100644 --- a/dbaccess/source/filter/xml/xmlDatabaseDescription.cxx +++ b/dbaccess/source/filter/xml/xmlDatabaseDescription.cxx @@ -43,14 +43,12 @@ OXMLDatabaseDescription::OXMLDatabaseDescription( ODBFilter& rImport, { DBG_CTOR(OXMLDatabaseDescription,NULL); } -// ----------------------------------------------------------------------------- OXMLDatabaseDescription::~OXMLDatabaseDescription() { DBG_DTOR(OXMLDatabaseDescription,NULL); } -// ----------------------------------------------------------------------------- SvXMLImportContext* OXMLDatabaseDescription::CreateChildContext( sal_uInt16 nPrefix, @@ -85,14 +83,12 @@ SvXMLImportContext* OXMLDatabaseDescription::CreateChildContext( return pContext; } -// ----------------------------------------------------------------------------- + ODBFilter& OXMLDatabaseDescription::GetOwnImport() { return static_cast<ODBFilter&>(GetImport()); } -// ----------------------------------------------------------------------------- -//---------------------------------------------------------------------------- + } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlDatabaseDescription.hxx b/dbaccess/source/filter/xml/xmlDatabaseDescription.hxx index a56d90dedb31..ca01556f2867 100644 --- a/dbaccess/source/filter/xml/xmlDatabaseDescription.hxx +++ b/dbaccess/source/filter/xml/xmlDatabaseDescription.hxx @@ -41,9 +41,7 @@ namespace dbaxml const OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLDATABASEDESCRIPTION_HXX_INCLUDED diff --git a/dbaccess/source/filter/xml/xmlDocuments.cxx b/dbaccess/source/filter/xml/xmlDocuments.cxx index ddbae3725845..696740b17feb 100644 --- a/dbaccess/source/filter/xml/xmlDocuments.cxx +++ b/dbaccess/source/filter/xml/xmlDocuments.cxx @@ -50,7 +50,7 @@ OXMLDocuments::OXMLDocuments( ODBFilter& rImport DBG_CTOR(OXMLDocuments,NULL); } -// ----------------------------------------------------------------------------- + OXMLDocuments::OXMLDocuments( ODBFilter& rImport ,sal_uInt16 nPrfx , const OUString& rLName @@ -63,14 +63,12 @@ OXMLDocuments::OXMLDocuments( ODBFilter& rImport { DBG_CTOR(OXMLDocuments,NULL); } -// ----------------------------------------------------------------------------- OXMLDocuments::~OXMLDocuments() { DBG_DTOR(OXMLDocuments,NULL); } -// ----------------------------------------------------------------------------- SvXMLImportContext* OXMLDocuments::CreateChildContext( sal_uInt16 nPrefix, @@ -103,17 +101,14 @@ SvXMLImportContext* OXMLDocuments::CreateChildContext( if( !pContext ) pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); - return pContext; } -// ----------------------------------------------------------------------------- + ODBFilter& OXMLDocuments::GetOwnImport() { return static_cast<ODBFilter&>(GetImport()); } -// ----------------------------------------------------------------------------- -//---------------------------------------------------------------------------- + } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlDocuments.hxx b/dbaccess/source/filter/xml/xmlDocuments.hxx index d1f3617a2002..f39a6e4e1b07 100644 --- a/dbaccess/source/filter/xml/xmlDocuments.hxx +++ b/dbaccess/source/filter/xml/xmlDocuments.hxx @@ -58,9 +58,7 @@ namespace dbaxml const OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLDOCUMENTS_HXX diff --git a/dbaccess/source/filter/xml/xmlEnums.hxx b/dbaccess/source/filter/xml/xmlEnums.hxx index b18ba2ab6a4a..e9181a302813 100644 --- a/dbaccess/source/filter/xml/xmlEnums.hxx +++ b/dbaccess/source/filter/xml/xmlEnums.hxx @@ -158,9 +158,7 @@ namespace dbaxml XML_TOK_COLUMN_VISIBLE, XML_TOK_DEFAULT_CELL_STYLE_NAME }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLENUMS_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 10cad9b7b4b0..4d1803b70d51 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "xmlExport.hxx" #include "xmlAutoStyle.hxx" #include "flt_reghelper.hxx" @@ -76,22 +75,23 @@ namespace dbaxml static Reference< XInterface > SAL_CALL Create(const Reference< ::com::sun::star::lang::XMultiServiceFactory >&); }; } -// ----------------------------------------------------------------------------- + extern "C" void SAL_CALL createRegistryInfo_ODBFilterExport( ) { static ::dbaxml::OMultiInstanceAutoRegistration< ::dbaxml::ODBExport > aAutoRegistration; } -//-------------------------------------------------------------------------- + extern "C" void SAL_CALL createRegistryInfo_OSettingsExport( ) + { static ::dbaxml::OMultiInstanceAutoRegistration< ::dbaxml::ODBExportHelper > aAutoRegistration; } -//-------------------------------------------------------------------------- + extern "C" void SAL_CALL createRegistryInfo_OFullExport( ) { static ::dbaxml::OMultiInstanceAutoRegistration< ::dbaxml::ODBFullExportHelper > aAutoRegistration; } -//-------------------------------------------------------------------------- + namespace dbaxml { using namespace comphelper; @@ -99,17 +99,16 @@ namespace dbaxml using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::util; - //--------------------------------------------------------------------- Reference< XInterface > SAL_CALL ODBExportHelper::Create(const Reference< XMultiServiceFactory >& _rxORB) { return static_cast< XServiceInfo* >(new ODBExport(comphelper::getComponentContext(_rxORB),EXPORT_SETTINGS | EXPORT_PRETTY )); } - //--------------------------------------------------------------------- + OUString SAL_CALL ODBExportHelper::getImplementationName_Static( ) throw (RuntimeException) { return OUString("com.sun.star.comp.sdb.XMLSettingsExporter"); } - //--------------------------------------------------------------------- + Sequence< OUString > SAL_CALL ODBExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException) { Sequence< OUString > aSupported(1); @@ -117,18 +116,14 @@ namespace dbaxml return aSupported; } - - //--------------------------------------------------------------------- Reference< XInterface > SAL_CALL ODBFullExportHelper::Create(const Reference< XMultiServiceFactory >& _rxORB) { return static_cast< XServiceInfo* >(new ODBExport(comphelper::getComponentContext(_rxORB),EXPORT_ALL)); } - //--------------------------------------------------------------------- OUString SAL_CALL ODBFullExportHelper::getImplementationName_Static( ) throw (RuntimeException) { return OUString("com.sun.star.comp.sdb.XMLFullExporter"); } - //--------------------------------------------------------------------- Sequence< OUString > SAL_CALL ODBFullExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException) { Sequence< OUString > aSupported(1); @@ -136,7 +131,6 @@ namespace dbaxml return aSupported; } - //--------------------------------------------------------------------- OUString lcl_implGetPropertyXMLType(const Type& _rType) { // possible types we can write (either because we recognize them directly or because we convert _rValue @@ -192,7 +186,6 @@ namespace dbaxml // nothing to do here } }; -// ----------------------------------------------------------------------------- ODBExport::ODBExport(const Reference< XComponentContext >& _rxContext,sal_uInt16 nExportFlag) : SvXMLExport( util::MeasureUnit::MM_10TH, _rxContext, XML_DATABASE, EXPORT_OASIS | nExportFlag) @@ -258,7 +251,7 @@ ODBExport::ODBExport(const Reference< XComponentContext >& _rxContext,sal_uInt16 m_xRowExportHelper.get(), OUString(XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX )); } -// ----------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(ODBExport, "com.sun.star.comp.sdb.DBExportFilter") IMPLEMENT_SERVICE_INFO_SUPPORTS(ODBExport) IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(ODBExport, "com.sun.star.document.ExportFilter") @@ -269,7 +262,6 @@ IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(ODBExport, "com.sun.star.document.Ex return static_cast< XServiceInfo* >(new ODBExport( comphelper::getComponentContext(_rxORB))); } -// ----------------------------------------------------------------------------- void ODBExport::exportDataSource() { try @@ -488,7 +480,7 @@ void ODBExport::exportDataSource() DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void ODBExport::exportApplicationConnectionSettings(const TSettingsMap& _aSettings) { const ::xmloff::token::XMLTokenEnum pSettings[] = { @@ -524,7 +516,7 @@ void ODBExport::exportApplicationConnectionSettings(const TSettingsMap& _aSettin exportDataSourceSettings(); } -// ----------------------------------------------------------------------------- + void ODBExport::exportDriverSettings(const TSettingsMap& _aSettings) { const ::xmloff::token::XMLTokenEnum pSettings[] = { @@ -545,7 +537,7 @@ void ODBExport::exportDriverSettings(const TSettingsMap& _aSettings) exportDelimiter(); exportCharSet(); } -// ----------------------------------------------------------------------------- + void ODBExport::exportConnectionData() { SvXMLElementExport aConnData(*this,XML_NAMESPACE_DB, XML_CONNECTION_DATA, sal_True, sal_True); @@ -668,7 +660,7 @@ void ODBExport::exportConnectionData() exportLogin(); } -// ----------------------------------------------------------------------------- + template< typename T > void ODBExport::exportDataSourceSettingsSequence( ::std::vector< TypedPropertyValue >::iterator const & in) { @@ -755,7 +747,7 @@ void ODBExport::exportDataSourceSettings() } } } -// ----------------------------------------------------------------------------- + void ODBExport::exportCharSet() { if ( !m_sCharSet.isEmpty() ) @@ -765,7 +757,7 @@ void ODBExport::exportCharSet() SvXMLElementExport aElem(*this,XML_NAMESPACE_DB, XML_FONT_CHARSET, sal_True, sal_True); } } -// ----------------------------------------------------------------------------- + void ODBExport::exportDelimiter() { if ( m_aDelimiter.get() && m_aDelimiter->bUsed ) @@ -777,7 +769,7 @@ void ODBExport::exportDelimiter() SvXMLElementExport aElem(*this,XML_NAMESPACE_DB, XML_DELIMITER, sal_True, sal_True); } } -// ----------------------------------------------------------------------------- + void ODBExport::exportAutoIncrement() { if ( m_aAutoIncrement.get() ) @@ -787,7 +779,7 @@ void ODBExport::exportAutoIncrement() SvXMLElementExport aElem(*this,XML_NAMESPACE_DB, XML_AUTO_INCREMENT, sal_True, sal_True); } } -// ----------------------------------------------------------------------------- + void ODBExport::exportSequence(const Sequence< OUString>& _aValue ,::xmloff::token::XMLTokenEnum _eTokenFilter ,::xmloff::token::XMLTokenEnum _eTokenType) @@ -807,7 +799,7 @@ void ODBExport::exportSequence(const Sequence< OUString>& _aValue } } } -// ----------------------------------------------------------------------------- + void ODBExport::exportLogin() { Reference<XPropertySet> xProp(getDataSource()); @@ -825,7 +817,7 @@ void ODBExport::exportLogin() if ( bAddLogin ) SvXMLElementExport aElem(*this,XML_NAMESPACE_DB, XML_LOGIN, sal_True, sal_True); } -// ----------------------------------------------------------------------------- + void ODBExport::exportCollection(const Reference< XNameAccess >& _xCollection ,enum ::xmloff::token::XMLTokenEnum _eComponents ,enum ::xmloff::token::XMLTokenEnum _eSubComponents @@ -858,7 +850,7 @@ void ODBExport::exportCollection(const Reference< XNameAccess >& _xCollection } } } -// ----------------------------------------------------------------------------- + void ODBExport::exportComponent(XPropertySet* _xProp) { OUString sValue; @@ -876,7 +868,7 @@ void ODBExport::exportComponent(XPropertySet* _xProp) AddAttribute(XML_NAMESPACE_DB, XML_AS_TEMPLATE,bAsTemplate ? XML_TRUE : XML_FALSE); SvXMLElementExport aComponents(*this,XML_NAMESPACE_DB, XML_COMPONENT, sal_True, sal_True); } -// ----------------------------------------------------------------------------- + void ODBExport::exportQuery(XPropertySet* _xProp) { AddAttribute(XML_NAMESPACE_DB, XML_COMMAND,getString(_xProp->getPropertyValue(PROPERTY_COMMAND))); @@ -900,7 +892,7 @@ void ODBExport::exportQuery(XPropertySet* _xProp) exportFilter(_xProp,PROPERTY_ORDER,XML_ORDER_STATEMENT); exportTableName(_xProp,sal_True); } -// ----------------------------------------------------------------------------- + void ODBExport::exportTable(XPropertySet* _xProp) { exportTableName(_xProp,sal_False); @@ -923,7 +915,7 @@ void ODBExport::exportTable(XPropertySet* _xProp) exportFilter(_xProp,PROPERTY_FILTER,XML_FILTER_STATEMENT); exportFilter(_xProp,PROPERTY_ORDER,XML_ORDER_STATEMENT); } -// ----------------------------------------------------------------------------- + void ODBExport::exportStyleName(XPropertySet* _xProp,SvXMLAttributeList& _rAtt) { Reference<XPropertySet> xFind(_xProp); @@ -931,7 +923,7 @@ void ODBExport::exportStyleName(XPropertySet* _xProp,SvXMLAttributeList& _rAtt) exportStyleName(XML_DEFAULT_CELL_STYLE_NAME,xFind,_rAtt,m_aCellAutoStyleNames); exportStyleName(XML_DEFAULT_ROW_STYLE_NAME,xFind,_rAtt,m_aRowAutoStyleNames); } -// ----------------------------------------------------------------------------- + void ODBExport::exportStyleName(const ::xmloff::token::XMLTokenEnum _eToken,const uno::Reference<beans::XPropertySet>& _xProp,SvXMLAttributeList& _rAtt,TPropertyStyleMap& _rMap) { TPropertyStyleMap::iterator aFind = _rMap.find(_xProp); @@ -942,7 +934,7 @@ void ODBExport::exportStyleName(const ::xmloff::token::XMLTokenEnum _eToken,cons _rMap.erase(aFind); } } -// ----------------------------------------------------------------------------- + void ODBExport::exportTableName(XPropertySet* _xProp,sal_Bool _bUpdate) { OUString sValue; @@ -963,7 +955,7 @@ void ODBExport::exportTableName(XPropertySet* _xProp,sal_Bool _bUpdate) } } } -// ----------------------------------------------------------------------------- + void ODBExport::exportFilter(XPropertySet* _xProp ,const OUString& _sProp ,enum ::xmloff::token::XMLTokenEnum _eStatementType) @@ -978,7 +970,7 @@ void ODBExport::exportFilter(XPropertySet* _xProp } OSL_POSTCOND(!GetAttrList().getLength(),"Invalid attribute length!"); } -// ----------------------------------------------------------------------------- + void ODBExport::exportColumns(const Reference<XColumnsSupplier>& _xColSup) { OSL_PRECOND( _xColSup.is(), "ODBExport::exportColumns: invalid columns supplier!" ); @@ -1059,7 +1051,7 @@ void ODBExport::exportColumns(const Reference<XColumnsSupplier>& _xColSup) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void ODBExport::exportForms() { Any aValue; @@ -1080,7 +1072,7 @@ void ODBExport::exportForms() } } } -// ----------------------------------------------------------------------------- + void ODBExport::exportReports() { Any aValue; @@ -1101,7 +1093,7 @@ void ODBExport::exportReports() } } } -// ----------------------------------------------------------------------------- + void ODBExport::exportQueries(sal_Bool _bExportContext) { Any aValue; @@ -1129,7 +1121,7 @@ void ODBExport::exportQueries(sal_Bool _bExportContext) } } } -// ----------------------------------------------------------------------------- + void ODBExport::exportTables(sal_Bool _bExportContext) { Reference<XTablesSupplier> xSup(getDataSource(),UNO_QUERY); @@ -1149,7 +1141,7 @@ void ODBExport::exportTables(sal_Bool _bExportContext) } } } -// ----------------------------------------------------------------------------- + void ODBExport::exportAutoStyle(XPropertySet* _xProp) { typedef ::std::pair<TPropertyStyleMap*,sal_uInt16> TEnumMapperPair; @@ -1247,7 +1239,7 @@ void ODBExport::exportAutoStyle(XPropertySet* _xProp) } } } -// ----------------------------------------------------------------------------- + void ODBExport::_ExportContent() { exportDataSource(); @@ -1256,12 +1248,12 @@ void ODBExport::_ExportContent() exportQueries(sal_True); exportTables(sal_True); } -// ----------------------------------------------------------------------------- + void ODBExport::_ExportMasterStyles() { GetPageExport()->exportMasterStyles( sal_True ); } -// ----------------------------------------------------------------------------- + void ODBExport::_ExportAutoStyles() { // there are no styles that require their own autostyles @@ -1291,17 +1283,17 @@ void ODBExport::_ExportAutoStyles() exportDataStyles(); } } -// ----------------------------------------------------------------------------- + void ODBExport::_ExportStyles(sal_Bool bUsed) { SvXMLExport::_ExportStyles(bUsed); } -// ----------------------------------------------------------------------------- + sal_uInt32 ODBExport::exportDoc(enum ::xmloff::token::XMLTokenEnum eClass) { return SvXMLExport::exportDoc( eClass ); } -// ----------------------------------------------------------------------------- + void ODBExport::GetViewSettings(Sequence<PropertyValue>& aProps) { Reference<XQueryDefinitionsSupplier> xSup(getDataSource(),UNO_QUERY); @@ -1339,7 +1331,7 @@ void ODBExport::GetViewSettings(Sequence<PropertyValue>& aProps) } } -// ----------------------------------------------------------------------------- + void ODBExport::GetConfigurationSettings(Sequence<PropertyValue>& aProps) { Reference<XPropertySet> xProp(getDataSource()); @@ -1364,7 +1356,7 @@ void ODBExport::GetConfigurationSettings(Sequence<PropertyValue>& aProps) } } } -// ----------------------------------------------------------------------------- + OUString ODBExport::implConvertAny(const Any& _rValue) { OUStringBuffer aBuffer; @@ -1396,7 +1388,7 @@ OUString ODBExport::implConvertAny(const Any& _rValue) return aBuffer.makeStringAndClear(); } -// ----------------------------------------------------------------------------- + UniReference < XMLPropertySetMapper > ODBExport::GetTableStylesPropertySetMapper() const { if ( !m_xTableStylesPropertySetMapper.is() ) @@ -1405,7 +1397,7 @@ UniReference < XMLPropertySetMapper > ODBExport::GetTableStylesPropertySetMapper } return m_xTableStylesPropertySetMapper; } -// ----------------------------------------------------------------------------- + UniReference < XMLPropertySetMapper > ODBExport::GetCellStylesPropertySetMapper() const { if ( !m_xCellStylesPropertySetMapper.is() ) @@ -1414,7 +1406,7 @@ UniReference < XMLPropertySetMapper > ODBExport::GetCellStylesPropertySetMapper( } return m_xCellStylesPropertySetMapper; } -// ----------------------------------------------------------------------------- + UniReference < XMLPropertySetMapper > ODBExport::GetColumnStylesPropertySetMapper() const { if ( !m_xColumnStylesPropertySetMapper.is() ) @@ -1423,12 +1415,12 @@ UniReference < XMLPropertySetMapper > ODBExport::GetColumnStylesPropertySetMappe } return m_xColumnStylesPropertySetMapper; } -// ----------------------------------------------------------------------------- + SvXMLAutoStylePoolP* ODBExport::CreateAutoStylePool() { return new OXMLAutoStylePoolP(*this); } -// ----------------------------------------------------------------------------- + void SAL_CALL ODBExport::setSourceDocument( const Reference< XComponent >& xDoc ) throw(IllegalArgumentException, RuntimeException) { Reference<XOfficeDatabaseDocument> xOfficeDoc(xDoc,UNO_QUERY_THROW); @@ -1438,14 +1430,14 @@ void SAL_CALL ODBExport::setSourceDocument( const Reference< XComponent >& xDoc SetNumberFormatsSupplier(xNum); SvXMLExport::setSourceDocument(xDoc); } -// ----------------------------------------------------------------------------- + void ODBExport::_ExportFontDecls() { GetFontAutoStylePool(); // make sure the pool is created collectComponentStyles(); SvXMLExport::_ExportFontDecls(); } -// ----------------------------------------------------------------------------- + void ODBExport::collectComponentStyles() { if ( m_bAllreadyFilled ) @@ -1455,8 +1447,7 @@ void ODBExport::collectComponentStyles() exportQueries(sal_False); exportTables(sal_False); } -// ----------------------------------------------------------------------------- + }// dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlExport.hxx b/dbaccess/source/filter/xml/xmlExport.hxx index e9a04e5367b5..9ece717ee050 100644 --- a/dbaccess/source/filter/xml/xmlExport.hxx +++ b/dbaccess/source/filter/xml/xmlExport.hxx @@ -57,9 +57,7 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::text; using namespace ::com::sun::star::io; using namespace ::com::sun::star::xml::sax; -// ------------- // - ODBExport - -// ------------- #define PROGRESS_BAR_STEP 20 class ODBExport : public SvXMLExport @@ -189,9 +187,7 @@ public: inline Reference<XPropertySet> getDataSource() const { return m_xDataSource; } }; -// ----------------------------------------------------------------------------- } // dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLEXPORT_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx index 5f24a9fb2bef..24f5795d9777 100644 --- a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx +++ b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx @@ -113,16 +113,13 @@ OXMLFileBasedDatabase::OXMLFileBasedDatabase( ODBFilter& rImport, } } } -// ----------------------------------------------------------------------------- OXMLFileBasedDatabase::~OXMLFileBasedDatabase() { DBG_DTOR(OXMLFileBasedDatabase,NULL); } -// ----------------------------------------------------------------------------- -//---------------------------------------------------------------------------- + } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlFileBasedDatabase.hxx b/dbaccess/source/filter/xml/xmlFileBasedDatabase.hxx index 0a2626a9988d..85c270462115 100644 --- a/dbaccess/source/filter/xml/xmlFileBasedDatabase.hxx +++ b/dbaccess/source/filter/xml/xmlFileBasedDatabase.hxx @@ -35,9 +35,7 @@ namespace dbaxml const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList); virtual ~OXMLFileBasedDatabase(); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLFILEBASEDDATABASE_HXX_INCLUDED diff --git a/dbaccess/source/filter/xml/xmlHelper.cxx b/dbaccess/source/filter/xml/xmlHelper.cxx index 70570ab1e55f..2f735aedfa49 100644 --- a/dbaccess/source/filter/xml/xmlHelper.cxx +++ b/dbaccess/source/filter/xml/xmlHelper.cxx @@ -37,15 +37,14 @@ DBG_NAME(OPropertyHandlerFactory) OPropertyHandlerFactory::OPropertyHandlerFactory() { DBG_CTOR(OPropertyHandlerFactory,NULL); - } -// ----------------------------------------------------------------------------- + OPropertyHandlerFactory::~OPropertyHandlerFactory() { DBG_DTOR(OPropertyHandlerFactory,NULL); } -// ----------------------------------------------------------------------------- + const XMLPropertyHandler* OPropertyHandlerFactory::GetPropertyHandler(sal_Int32 _nType) const { const XMLPropertyHandler* pHandler = NULL; @@ -70,9 +69,8 @@ const XMLPropertyHandler* OPropertyHandlerFactory::GetPropertyHandler(sal_Int32 pHandler = OControlPropertyHandlerFactory::GetPropertyHandler(_nType); return pHandler; } -// ----------------------------------------------------------------------------- + #define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0 , 0, SvtSaveOptions::ODFVER_010} -// ----------------------------------------------------------------------------- UniReference < XMLPropertySetMapper > OXMLHelper::GetTableStylesPropertySetMapper() { static const XMLPropertyMapEntry s_aTableStylesProperties[] = @@ -82,7 +80,7 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetTableStylesPropertySetMappe UniReference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory(); return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aTableStylesProperties, xFac); } -// ----------------------------------------------------------------------------- + UniReference < XMLPropertySetMapper > OXMLHelper::GetColumnStylesPropertySetMapper() { #define MAP_CONST_COLUMN( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TABLE_COLUMN, context, SvtSaveOptions::ODFVER_010 } @@ -96,7 +94,7 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetColumnStylesPropertySetMapp UniReference < XMLPropertyHandlerFactory> xFac = new OPropertyHandlerFactory(); return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aColumnStylesProperties, xFac); } -// ----------------------------------------------------------------------------- + UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylesPropertySetMapper() { #define MAP_CONST_CELL( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010 } @@ -137,7 +135,7 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylesPropertySetMapper UniReference < XMLPropertyHandlerFactory> xFac = new /*OPropertyHandlerFactory*/::xmloff::OControlPropertyHandlerFactory(); return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aCellStylesProperties, xFac); } -// ----------------------------------------------------------------------------- + UniReference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMapper() { #define MAP_CONST_ROW( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TABLE_ROW, context, SvtSaveOptions::ODFVER_010 } @@ -149,7 +147,7 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMapper( UniReference < XMLPropertyHandlerFactory> xFac = new OPropertyHandlerFactory(); return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aStylesProperties, xFac); } -// ----------------------------------------------------------------------------- + } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlHelper.hxx b/dbaccess/source/filter/xml/xmlHelper.hxx index aa7a76e64e78..738d6ca2e734 100644 --- a/dbaccess/source/filter/xml/xmlHelper.hxx +++ b/dbaccess/source/filter/xml/xmlHelper.hxx @@ -55,9 +55,7 @@ namespace dbaxml static UniReference < XMLPropertySetMapper > GetCellStylesPropertySetMapper(); static UniReference < XMLPropertySetMapper > GetRowStylesPropertySetMapper(); }; -// ----------------------------------------------------------------------------- } // dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLHELPER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx index 15e1254c50dd..30e8a8649c39 100644 --- a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx +++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx @@ -31,7 +31,6 @@ #include <com/sun/star/container/XNameContainer.hpp> #include <tools/debug.hxx> - namespace dbaxml { using namespace ::com::sun::star::uno; @@ -102,7 +101,7 @@ OXMLHierarchyCollection::OXMLHierarchyCollection( ODBFilter& rImport } } } -// ----------------------------------------------------------------------------- + OXMLHierarchyCollection::OXMLHierarchyCollection( ODBFilter& rImport ,sal_uInt16 nPrfx ,const OUString& _sLocalName @@ -115,14 +114,13 @@ OXMLHierarchyCollection::OXMLHierarchyCollection( ODBFilter& rImport { DBG_CTOR(OXMLHierarchyCollection,NULL); } -// ----------------------------------------------------------------------------- OXMLHierarchyCollection::~OXMLHierarchyCollection() { DBG_DTOR(OXMLHierarchyCollection,NULL); } -// ----------------------------------------------------------------------------- + SvXMLImportContext* OXMLHierarchyCollection::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, @@ -152,14 +150,12 @@ SvXMLImportContext* OXMLHierarchyCollection::CreateChildContext( return pContext; } -// ----------------------------------------------------------------------------- + ODBFilter& OXMLHierarchyCollection::GetOwnImport() { return static_cast<ODBFilter&>(GetImport()); } -// ----------------------------------------------------------------------------- -//---------------------------------------------------------------------------- + } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx index 7c59d0e57168..2fdb30a99ed1 100644 --- a/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx +++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx @@ -24,7 +24,6 @@ #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/beans/XPropertySet.hpp> - namespace dbaxml { class ODBFilter; @@ -60,9 +59,7 @@ namespace dbaxml const OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLHIERARCHYCOLLECTION_HXX diff --git a/dbaccess/source/filter/xml/xmlLogin.cxx b/dbaccess/source/filter/xml/xmlLogin.cxx index eb0503ffbf79..bef6968de0cb 100644 --- a/dbaccess/source/filter/xml/xmlLogin.cxx +++ b/dbaccess/source/filter/xml/xmlLogin.cxx @@ -115,17 +115,13 @@ OXMLLogin::OXMLLogin( ODBFilter& rImport, } } } -// ----------------------------------------------------------------------------- OXMLLogin::~OXMLLogin() { DBG_DTOR(OXMLLogin,NULL); } -// ----------------------------------------------------------------------------- -//---------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlLogin.hxx b/dbaccess/source/filter/xml/xmlLogin.hxx index 1059296a442c..4371f81e584f 100644 --- a/dbaccess/source/filter/xml/xmlLogin.hxx +++ b/dbaccess/source/filter/xml/xmlLogin.hxx @@ -35,9 +35,7 @@ namespace dbaxml virtual ~OXMLLogin(); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLLOGIN_HXX diff --git a/dbaccess/source/filter/xml/xmlQuery.cxx b/dbaccess/source/filter/xml/xmlQuery.cxx index e2a64751e99b..e77503b54169 100644 --- a/dbaccess/source/filter/xml/xmlQuery.cxx +++ b/dbaccess/source/filter/xml/xmlQuery.cxx @@ -72,14 +72,13 @@ OXMLQuery::OXMLQuery( ODBFilter& rImport } } } -// ----------------------------------------------------------------------------- OXMLQuery::~OXMLQuery() { DBG_DTOR(OXMLQuery,NULL); } -// ----------------------------------------------------------------------------- + SvXMLImportContext* OXMLQuery::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, @@ -107,7 +106,7 @@ SvXMLImportContext* OXMLQuery::CreateChildContext( return pContext; } -// ----------------------------------------------------------------------------- + void OXMLQuery::setProperties(Reference< XPropertySet > & _xProp ) { try @@ -137,8 +136,7 @@ void OXMLQuery::setProperties(Reference< XPropertySet > & _xProp ) OSL_FAIL("OXMLTable::EndElement -> exception catched"); } } -//---------------------------------------------------------------------------- + } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlQuery.hxx b/dbaccess/source/filter/xml/xmlQuery.hxx index e2aef52021c2..1ce7082522ac 100644 --- a/dbaccess/source/filter/xml/xmlQuery.hxx +++ b/dbaccess/source/filter/xml/xmlQuery.hxx @@ -22,7 +22,6 @@ #include <xmloff/xmlictxt.hxx> #include "xmlTable.hxx" - namespace dbaxml { class ODBFilter; @@ -47,9 +46,7 @@ namespace dbaxml const OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLQUERY_HXX diff --git a/dbaccess/source/filter/xml/xmlServerDatabase.cxx b/dbaccess/source/filter/xml/xmlServerDatabase.cxx index dec5d0e1ad8f..987e9f7d6ccd 100644 --- a/dbaccess/source/filter/xml/xmlServerDatabase.cxx +++ b/dbaccess/source/filter/xml/xmlServerDatabase.cxx @@ -135,17 +135,13 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport, } } } -// ----------------------------------------------------------------------------- OXMLServerDatabase::~OXMLServerDatabase() { DBG_DTOR(OXMLServerDatabase,NULL); } -// ----------------------------------------------------------------------------- -//---------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlServerDatabase.hxx b/dbaccess/source/filter/xml/xmlServerDatabase.hxx index 84c5272159fe..0162ad431481 100644 --- a/dbaccess/source/filter/xml/xmlServerDatabase.hxx +++ b/dbaccess/source/filter/xml/xmlServerDatabase.hxx @@ -35,9 +35,7 @@ namespace dbaxml const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList); virtual ~OXMLServerDatabase(); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLSERVERDATABASE_HXX_INCLUDED diff --git a/dbaccess/source/filter/xml/xmlStyleImport.cxx b/dbaccess/source/filter/xml/xmlStyleImport.cxx index 6d28d09d3bff..73b64e72354b 100644 --- a/dbaccess/source/filter/xml/xmlStyleImport.cxx +++ b/dbaccess/source/filter/xml/xmlStyleImport.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "xmlStyleImport.hxx" #include <xmloff/nmspmap.hxx> @@ -47,7 +46,6 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace xmloff::token; -// ----------------------------------------------------------------------------- TYPEINIT1( OTableStyleContext, XMLPropStyleContext ); TYPEINIT1( OTableStylesContext, SvXMLStylesContext ); DBG_NAME(OTableStyleContext) @@ -64,14 +62,12 @@ OTableStyleContext::OTableStyleContext( ODBFilter& rImport, DBG_CTOR(OTableStyleContext,NULL); } -// ----------------------------------------------------------------------------- OTableStyleContext::~OTableStyleContext() { DBG_DTOR(OTableStyleContext,NULL); } -// ----------------------------------------------------------------------------- void OTableStyleContext::FillPropertySet( const Reference< XPropertySet > & rPropSet ) @@ -115,12 +111,10 @@ void OTableStyleContext::FillPropertySet( } XMLPropStyleContext::FillPropertySet(rPropSet); } -// ----------------------------------------------------------------------------- void OTableStyleContext::SetDefaults() { } -// ----------------------------------------------------------------------------- void OTableStyleContext::AddProperty(const sal_Int16 nContextID, const uno::Any& rValue) { @@ -129,7 +123,7 @@ void OTableStyleContext::AddProperty(const sal_Int16 nContextID, const uno::Any& XMLPropertyState aPropState(nIndex, rValue); GetProperties().push_back(aPropState); // has to be insertes in a sort order later } -// ----------------------------------------------------------------------------- + void OTableStyleContext::SetAttribute( sal_uInt16 nPrefixKey, const OUString& rLocalName, const OUString& rValue ) @@ -142,12 +136,12 @@ void OTableStyleContext::SetAttribute( sal_uInt16 nPrefixKey, else XMLPropStyleContext::SetAttribute( nPrefixKey, rLocalName, rValue ); } -// ----------------------------------------------------------------------------- + ODBFilter& OTableStyleContext::GetOwnImport() { return static_cast<ODBFilter&>(GetImport()); } -// ----------------------------------------------------------------------------- + DBG_NAME(OTableStylesContext) OTableStylesContext::OTableStylesContext( SvXMLImport& rImport, @@ -165,14 +159,12 @@ OTableStylesContext::OTableStylesContext( SvXMLImport& rImport, DBG_CTOR(OTableStylesContext,NULL); } -// ----------------------------------------------------------------------------- OTableStylesContext::~OTableStylesContext() { DBG_DTOR(OTableStylesContext,NULL); } -// ----------------------------------------------------------------------------- void OTableStylesContext::EndElement() { @@ -182,7 +174,6 @@ void OTableStylesContext::EndElement() else GetImport().GetStyles()->CopyStylesToDoc(sal_True); } -// ----------------------------------------------------------------------------- UniReference < SvXMLImportPropertyMapper > OTableStylesContext::GetImportPropertyMapper( @@ -220,7 +211,7 @@ UniReference < SvXMLImportPropertyMapper > return xMapper; } -// ---------------------------------------------------------------------------- + SvXMLStyleContext *OTableStylesContext::CreateStyleStyleChildContext( sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) @@ -243,14 +234,13 @@ SvXMLStyleContext *OTableStylesContext::CreateStyleStyleChildContext( return pStyle; } -// ----------------------------------------------------------------------------- + Reference < XNameContainer > OTableStylesContext::GetStylesContainer( sal_uInt16 nFamily ) const { Reference < XNameContainer > xStyles = SvXMLStylesContext::GetStylesContainer(nFamily); return xStyles; } -// ----------------------------------------------------------------------------- OUString OTableStylesContext::GetServiceName( sal_uInt16 nFamily ) const { @@ -273,7 +263,6 @@ OUString OTableStylesContext::GetServiceName( sal_uInt16 nFamily ) const } return sServiceName; } -// ----------------------------------------------------------------------------- sal_Int32 OTableStylesContext::GetIndex(const sal_Int16 nContextID) { @@ -294,13 +283,12 @@ sal_Int32 OTableStylesContext::GetIndex(const sal_Int16 nContextID) else return -1; } -// ----------------------------------------------------------------------------- + ODBFilter& OTableStylesContext::GetOwnImport() { return static_cast<ODBFilter&>(GetImport()); } -// ----------------------------------------------------------------------------- + } // dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlStyleImport.hxx b/dbaccess/source/filter/xml/xmlStyleImport.hxx index 2d13149ff1e3..b56658c14882 100644 --- a/dbaccess/source/filter/xml/xmlStyleImport.hxx +++ b/dbaccess/source/filter/xml/xmlStyleImport.hxx @@ -64,7 +64,6 @@ namespace dbaxml virtual ~OTableStyleContext(); - virtual void FillPropertySet(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rPropSet ); @@ -120,9 +119,7 @@ namespace dbaxml sal_Int32 GetIndex(const sal_Int16 nContextID); }; -// ----------------------------------------------------------------------------- } // dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLSTYLEIMPORT_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlTable.cxx b/dbaccess/source/filter/xml/xmlTable.cxx index bac9efbde09a..647d4c358f06 100644 --- a/dbaccess/source/filter/xml/xmlTable.cxx +++ b/dbaccess/source/filter/xml/xmlTable.cxx @@ -103,14 +103,13 @@ OXMLTable::OXMLTable( ODBFilter& _rImport GetOwnImport().GetComponentContext()->getServiceManager()->createInstanceWithArgumentsAndContext(m_sServiceName,aArguments, GetOwnImport().GetComponentContext()), UNO_QUERY); } -// ----------------------------------------------------------------------------- OXMLTable::~OXMLTable() { DBG_DTOR(OXMLTable,NULL); } -// ----------------------------------------------------------------------------- + SvXMLImportContext* OXMLTable::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, @@ -155,12 +154,12 @@ SvXMLImportContext* OXMLTable::CreateChildContext( return pContext; } -// ----------------------------------------------------------------------------- + ODBFilter& OXMLTable::GetOwnImport() { return static_cast<ODBFilter&>(GetImport()); } -// ----------------------------------------------------------------------------- + void OXMLTable::setProperties(uno::Reference< XPropertySet > & _xProp ) { try @@ -180,7 +179,7 @@ void OXMLTable::setProperties(uno::Reference< XPropertySet > & _xProp ) OSL_FAIL("OXMLTable::EndElement -> exception catched"); } } -// ----------------------------------------------------------------------------- + void OXMLTable::EndElement() { uno::Reference<XNameContainer> xNameContainer(m_xParentContainer,UNO_QUERY); @@ -215,7 +214,7 @@ void OXMLTable::EndElement() } } -// ----------------------------------------------------------------------------- + void OXMLTable::fillAttributes(sal_uInt16 /*nPrfx*/ ,const OUString& /*_sLocalName*/ ,const uno::Reference< XAttributeList > & _xAttrList @@ -254,8 +253,7 @@ void OXMLTable::fillAttributes(sal_uInt16 /*nPrfx*/ } } } -//---------------------------------------------------------------------------- + } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlTable.hxx b/dbaccess/source/filter/xml/xmlTable.hxx index 999c216459c3..6ece20cbe8c0 100644 --- a/dbaccess/source/filter/xml/xmlTable.hxx +++ b/dbaccess/source/filter/xml/xmlTable.hxx @@ -41,7 +41,6 @@ namespace dbaxml sal_Bool m_bApplyFilter; sal_Bool m_bApplyOrder; - ODBFilter& GetOwnImport(); void fillAttributes( sal_uInt16 nPrfx @@ -70,9 +69,7 @@ namespace dbaxml const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); virtual void EndElement(); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLTABLE_HXX diff --git a/dbaccess/source/filter/xml/xmlTableFilterList.cxx b/dbaccess/source/filter/xml/xmlTableFilterList.cxx index de8e856ba182..70cca6b63454 100644 --- a/dbaccess/source/filter/xml/xmlTableFilterList.cxx +++ b/dbaccess/source/filter/xml/xmlTableFilterList.cxx @@ -43,13 +43,11 @@ OXMLTableFilterList::OXMLTableFilterList( SvXMLImport& rImport, sal_uInt16 nPrfx DBG_CTOR(OXMLTableFilterList,NULL); } -// ----------------------------------------------------------------------------- OXMLTableFilterList::~OXMLTableFilterList() { DBG_DTOR(OXMLTableFilterList,NULL); } -// ----------------------------------------------------------------------------- SvXMLImportContext* OXMLTableFilterList::CreateChildContext( sal_uInt16 nPrefix, @@ -74,13 +72,12 @@ SvXMLImportContext* OXMLTableFilterList::CreateChildContext( return pContext; } -// ----------------------------------------------------------------------------- + ODBFilter& OXMLTableFilterList::GetOwnImport() { return static_cast<ODBFilter&>(GetImport()); } -// ----------------------------------------------------------------------------- void OXMLTableFilterList::EndElement() { Reference<XPropertySet> xDataSource(GetOwnImport().getDataSource()); @@ -92,8 +89,7 @@ void OXMLTableFilterList::EndElement() xDataSource->setPropertyValue(PROPERTY_TABLETYPEFILTER,makeAny(Sequence< OUString>(&(*m_aTypes.begin()),m_aTypes.size()))); } } -//---------------------------------------------------------------------------- + } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlTableFilterList.hxx b/dbaccess/source/filter/xml/xmlTableFilterList.hxx index ea8e3d826a46..66ef7bc832b5 100644 --- a/dbaccess/source/filter/xml/xmlTableFilterList.hxx +++ b/dbaccess/source/filter/xml/xmlTableFilterList.hxx @@ -62,9 +62,7 @@ namespace dbaxml m_aTypes.push_back(_sTypeFilter); } }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLTABLEFILTERLIST_HXX diff --git a/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx b/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx index 2c8c0f6af2eb..c6dff59d343a 100644 --- a/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx +++ b/dbaccess/source/filter/xml/xmlTableFilterPattern.cxx @@ -39,14 +39,13 @@ OXMLTableFilterPattern::OXMLTableFilterPattern( SvXMLImport& rImport, DBG_CTOR(OXMLTableFilterPattern,NULL); } -// ----------------------------------------------------------------------------- OXMLTableFilterPattern::~OXMLTableFilterPattern() { DBG_DTOR(OXMLTableFilterPattern,NULL); } -// ----------------------------------------------------------------------------- + void OXMLTableFilterPattern::Characters( const OUString& rChars ) { if ( m_bNameFilter ) @@ -55,8 +54,6 @@ void OXMLTableFilterPattern::Characters( const OUString& rChars ) m_rParent.pushTableTypeFilter(rChars); } -//---------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlTableFilterPattern.hxx b/dbaccess/source/filter/xml/xmlTableFilterPattern.hxx index 8402cc846a1e..1c7e90f53693 100644 --- a/dbaccess/source/filter/xml/xmlTableFilterPattern.hxx +++ b/dbaccess/source/filter/xml/xmlTableFilterPattern.hxx @@ -39,9 +39,7 @@ namespace dbaxml virtual void Characters( const OUString& rChars ); }; -// ----------------------------------------------------------------------------- } // namespace dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLTABLEFILTERPATTERN_HXX diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index 915d597c7d47..8ead50880d46 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -18,7 +18,6 @@ */ #include <config_features.h> - #include <com/sun/star/util/MeasureUnit.hpp> #include <com/sun/star/packages/zip/ZipIOException.hpp> #include <com/sun/star/embed/ElementModes.hpp> @@ -77,7 +76,7 @@ extern "C" void SAL_CALL createRegistryInfo_ODBFilter( ) { static ::dbaxml::OMultiInstanceAutoRegistration< ::dbaxml::ODBFilter > aAutoRegistration; } -//-------------------------------------------------------------------------- + namespace dbaxml { namespace @@ -249,8 +248,6 @@ sal_Int32 ReadThroughComponent( uno::Reference < XImporter > xImporter( _xFilter, UNO_QUERY ); xImporter->setTargetDocument( xModelComponent ); - - // finally, parser the stream try { @@ -351,9 +348,7 @@ sal_Int32 ReadThroughComponent( return 1; } -// ------------- // - ODBFilter - -// ------------- DBG_NAME(ODBFilter) ODBFilter::ODBFilter( const uno::Reference< XComponentContext >& _rxContext ) @@ -373,14 +368,12 @@ ODBFilter::ODBFilter( const uno::Reference< XComponentContext >& _rxContext ) XML_NAMESPACE_DB ); } -// ----------------------------------------------------------------------------- - ODBFilter::~ODBFilter() throw() { DBG_DTOR(ODBFilter,NULL); } -// ----------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(ODBFilter, "com.sun.star.comp.sdb.DBFilter") IMPLEMENT_SERVICE_INFO_SUPPORTS(ODBFilter) IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(ODBFilter, "com.sun.star.document.ImportFilter") @@ -391,7 +384,6 @@ IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(ODBFilter, "com.sun.star.document.Im return static_cast< XServiceInfo* >(new ODBFilter( comphelper::getComponentContext(_rxORB))); } -// ----------------------------------------------------------------------------- sal_Bool SAL_CALL ODBFilter::filter( const Sequence< PropertyValue >& rDescriptor ) throw (RuntimeException) { @@ -416,10 +408,9 @@ sal_Bool SAL_CALL ODBFilter::filter( const Sequence< PropertyValue >& rDescripto pFocusWindow->LeaveWait(); } - return bRet; } -// ----------------------------------------------------------------------------- + sal_Bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) throw (RuntimeException) { @@ -505,7 +496,7 @@ sal_Bool ODBFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) return bRet; } -// ----------------------------------------------------------------------------- + SvXMLImportContext* ODBFilter::CreateContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) @@ -541,7 +532,7 @@ SvXMLImportContext* ODBFilter::CreateContext( sal_uInt16 nPrefix, return pContext; } -// ----------------------------------------------------------------------------- + void ODBFilter::SetViewSettings(const Sequence<PropertyValue>& aViewProps) { const PropertyValue *pIter = aViewProps.getConstArray(); @@ -558,7 +549,7 @@ void ODBFilter::SetViewSettings(const Sequence<PropertyValue>& aViewProps) } } } -// ----------------------------------------------------------------------------- + void ODBFilter::SetConfigurationSettings(const Sequence<PropertyValue>& aConfigProps) { const PropertyValue *pIter = aConfigProps.getConstArray(); @@ -575,7 +566,7 @@ void ODBFilter::SetConfigurationSettings(const Sequence<PropertyValue>& aConfigP } } } -// ----------------------------------------------------------------------------- + void ODBFilter::fillPropertyMap(const Any& _rValue,TPropertyNameMap& _rMap) { Sequence<PropertyValue> aWindows; @@ -590,7 +581,7 @@ void ODBFilter::fillPropertyMap(const Any& _rValue,TPropertyNameMap& _rMap) } } -// ----------------------------------------------------------------------------- + const SvXMLTokenMap& ODBFilter::GetDocElemTokenMap() const { if ( !m_pDocElemTokenMap.get() ) @@ -612,7 +603,7 @@ const SvXMLTokenMap& ODBFilter::GetDocElemTokenMap() const } return *m_pDocElemTokenMap; } -// ----------------------------------------------------------------------------- + const SvXMLTokenMap& ODBFilter::GetDatabaseElemTokenMap() const { if ( !m_pDatabaseElemTokenMap.get() ) @@ -632,7 +623,7 @@ const SvXMLTokenMap& ODBFilter::GetDatabaseElemTokenMap() const } return *m_pDatabaseElemTokenMap; } -// ----------------------------------------------------------------------------- + const SvXMLTokenMap& ODBFilter::GetDataSourceElemTokenMap() const { if ( !m_pDataSourceElemTokenMap.get() ) @@ -683,7 +674,7 @@ const SvXMLTokenMap& ODBFilter::GetDataSourceElemTokenMap() const } return *m_pDataSourceElemTokenMap; } -// ----------------------------------------------------------------------------- + const SvXMLTokenMap& ODBFilter::GetLoginElemTokenMap() const { if ( !m_pLoginElemTokenMap.get() ) @@ -700,7 +691,7 @@ const SvXMLTokenMap& ODBFilter::GetLoginElemTokenMap() const } return *m_pLoginElemTokenMap; } -// ----------------------------------------------------------------------------- + const SvXMLTokenMap& ODBFilter::GetDatabaseDescriptionElemTokenMap() const { if ( !m_pDatabaseDescriptionElemTokenMap.get() ) @@ -715,7 +706,7 @@ const SvXMLTokenMap& ODBFilter::GetDatabaseDescriptionElemTokenMap() const } return *m_pDatabaseDescriptionElemTokenMap; } -// ----------------------------------------------------------------------------- + const SvXMLTokenMap& ODBFilter::GetDataSourceInfoElemTokenMap() const { if ( !m_pDataSourceInfoElemTokenMap.get() ) @@ -741,7 +732,7 @@ const SvXMLTokenMap& ODBFilter::GetDataSourceInfoElemTokenMap() const } return *m_pDataSourceInfoElemTokenMap; } -// ----------------------------------------------------------------------------- + const SvXMLTokenMap& ODBFilter::GetDocumentsElemTokenMap() const { if ( !m_pDocumentsElemTokenMap.get() ) @@ -761,7 +752,7 @@ const SvXMLTokenMap& ODBFilter::GetDocumentsElemTokenMap() const } return *m_pDocumentsElemTokenMap; } -// ----------------------------------------------------------------------------- + const SvXMLTokenMap& ODBFilter::GetComponentElemTokenMap() const { if ( !m_pComponentElemTokenMap.get() ) @@ -780,7 +771,7 @@ const SvXMLTokenMap& ODBFilter::GetComponentElemTokenMap() const } return *m_pComponentElemTokenMap; } -// ----------------------------------------------------------------------------- + const SvXMLTokenMap& ODBFilter::GetQueryElemTokenMap() const { if ( !m_pQueryElemTokenMap.get() ) @@ -804,7 +795,7 @@ const SvXMLTokenMap& ODBFilter::GetQueryElemTokenMap() const } return *m_pQueryElemTokenMap; } -// ----------------------------------------------------------------------------- + const SvXMLTokenMap& ODBFilter::GetColumnElemTokenMap() const { if ( !m_pColumnElemTokenMap.get() ) @@ -825,7 +816,7 @@ const SvXMLTokenMap& ODBFilter::GetColumnElemTokenMap() const } return *m_pColumnElemTokenMap; } -// ----------------------------------------------------------------------------- + SvXMLImportContext* ODBFilter::CreateStylesContext(sal_uInt16 _nPrefix,const OUString& rLocalName, const uno::Reference< XAttributeList>& xAttrList, sal_Bool bIsAutoStyle ) { @@ -840,12 +831,12 @@ SvXMLImportContext* ODBFilter::CreateStylesContext(sal_uInt16 _nPrefix,const OUS } return pContext; } -// ----------------------------------------------------------------------------- + SvXMLImportContext* ODBFilter::CreateScriptContext( const OUString& _rLocalName ) { return new XMLScriptContext( *this, XML_NAMESPACE_OFFICE, _rLocalName, GetModel() ); } -// ----------------------------------------------------------------------------- + UniReference < XMLPropertySetMapper > ODBFilter::GetTableStylesPropertySetMapper() const { if ( !m_xTableStylesPropertySetMapper.is() ) @@ -854,7 +845,7 @@ UniReference < XMLPropertySetMapper > ODBFilter::GetTableStylesPropertySetMapper } return m_xTableStylesPropertySetMapper; } -// ----------------------------------------------------------------------------- + UniReference < XMLPropertySetMapper > ODBFilter::GetColumnStylesPropertySetMapper() const { if ( !m_xColumnStylesPropertySetMapper.is() ) @@ -863,7 +854,7 @@ UniReference < XMLPropertySetMapper > ODBFilter::GetColumnStylesPropertySetMappe } return m_xColumnStylesPropertySetMapper; } -// ----------------------------------------------------------------------------- + UniReference < XMLPropertySetMapper > ODBFilter::GetCellStylesPropertySetMapper() const { if ( !m_xCellStylesPropertySetMapper.is() ) @@ -872,7 +863,7 @@ UniReference < XMLPropertySetMapper > ODBFilter::GetCellStylesPropertySetMapper( } return m_xCellStylesPropertySetMapper; } -// ----------------------------------------------------------------------------- + void ODBFilter::setPropertyInfo() { Reference<XPropertySet> xDataSource(getDataSource()); @@ -901,8 +892,7 @@ void ODBFilter::setPropertyInfo() } } } -// ----------------------------------------------------------------------------- + }// dbaxml -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlfilter.hxx b/dbaccess/source/filter/xml/xmlfilter.hxx index d8c29c57fc44..0f125776bba5 100644 --- a/dbaccess/source/filter/xml/xmlfilter.hxx +++ b/dbaccess/source/filter/xml/xmlfilter.hxx @@ -54,9 +54,7 @@ using namespace ::com::sun::star::text; using namespace ::com::sun::star::io; using namespace ::com::sun::star::xml::sax; -// ------------- // - ODBFilter - -// ------------- class ODBFilter : public SvXMLImport { public: @@ -90,7 +88,6 @@ private: sal_Bool implImport( const Sequence< PropertyValue >& rDescriptor ) throw (RuntimeException); - /** fills the map with the Properties @param _rValue The Any where the sequence resists in. @@ -160,9 +157,7 @@ public: inline void setNewFormat(bool _bNewFormat) { m_bNewFormat = _bNewFormat; } }; -// ----------------------------------------------------------------------------- } // dbaxml -// ----------------------------------------------------------------------------- #endif // DBA_XMLFILTER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/filter/xml/xmlservices.cxx b/dbaccess/source/filter/xml/xmlservices.cxx index 613c9c9990a9..2ed308b0526f 100644 --- a/dbaccess/source/filter/xml/xmlservices.cxx +++ b/dbaccess/source/filter/xml/xmlservices.cxx @@ -17,12 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <cppuhelper/factory.hxx> #include <osl/diagnose.h> #include "flt_reghelper.hxx" - using namespace ::dbaxml; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -55,7 +53,6 @@ extern "C" void SAL_CALL createRegistryInfo_dbaxml() } } -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbaxml_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/dbaccess/source/inc/OAuthenticationContinuation.hxx b/dbaccess/source/inc/OAuthenticationContinuation.hxx index 2228b36b5505..1b3ad7f0b11c 100644 --- a/dbaccess/source/inc/OAuthenticationContinuation.hxx +++ b/dbaccess/source/inc/OAuthenticationContinuation.hxx @@ -29,11 +29,8 @@ #include <rtl/ustring.hxx> #include <comphelper/interaction.hxx> - -//........................................................................ namespace dbaccess { -//........................................................................ class OOO_DLLPUBLIC_DBA OAuthenticationContinuation : public comphelper::OInteraction< com::sun::star::ucb::XInteractionSupplyAuthentication > @@ -66,9 +63,7 @@ public: sal_Bool getRememberPassword() const { return m_bRemberPassword; } }; -//........................................................................ } // namespace dbaccess -//........................................................................ #endif // _DBACCESS_OAUTHENTICATIONCONTINUATION_HXX_ diff --git a/dbaccess/source/inc/apitools.hxx b/dbaccess/source/inc/apitools.hxx index 70babe93a05d..dc41135a2d96 100644 --- a/dbaccess/source/inc/apitools.hxx +++ b/dbaccess/source/inc/apitools.hxx @@ -28,17 +28,13 @@ #include <cppuhelper/typeprovider.hxx> #include <comphelper/sequence.hxx> -//================================================================================== -//= various typedefs -//================================================================================== +// various typedefs namespace { DECLARE_STL_VECTOR(::com::sun::star::uno::WeakReferenceHelper, OWeakRefArray); } -//================================================================================== -//= OSubComponent - a component which holds a hard ref to it's parent -//= and is been hold itself (by the parent) with a weak ref -//================================================================================== +// OSubComponent - a component which holds a hard ref to it's parent +// and is been hold itself (by the parent) with a weak ref class OSubComponent : public ::cppu::OComponentHelper { protected: @@ -64,10 +60,8 @@ public: }; -//================================================================================== -//= helper for implementing the XServiceInfo interface +// helper for implementing the XServiceInfo interface -//---------------------------------------------------------------------------------- // (internal - not to be used outside - usually) #define IMPLEMENT_SERVICE_INFO_IMPLNAME(classname, implasciiname) \ OUString SAL_CALL classname::getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) \ @@ -156,7 +150,6 @@ public: return static_cast< XServiceInfo* >(new classname(_rxORB)); \ } \ -//---------------------------------------------------------------------------------- // declare service info methods #define DECLARE_SERVICE_INFO() \ virtual OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); \ @@ -170,66 +163,54 @@ public: static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > \ SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&) \ -//---------------------------------------------------------------------------------- #define IMPLEMENT_SERVICE_INFO1(classname, implasciiname, serviceasciiname) \ IMPLEMENT_SERVICE_INFO_IMPLNAME(classname, implasciiname) \ IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \ IMPLEMENT_SERVICE_INFO_GETSUPPORTED1(classname, serviceasciiname) \ -//---------------------------------------------------------------------------------- #define IMPLEMENT_SERVICE_INFO1_STATIC(classname, implasciiname, serviceasciiname) \ IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(classname, implasciiname) \ IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \ IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(classname, serviceasciiname) \ IMPLEMENT_SERVICE_INFO_CREATE_STATIC(classname) \ -//---------------------------------------------------------------------------------- #define IMPLEMENT_SERVICE_INFO2(classname, implasciiname, serviceasciiname1, serviceasciiname2) \ IMPLEMENT_SERVICE_INFO_IMPLNAME(classname, implasciiname) \ IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \ IMPLEMENT_SERVICE_INFO_GETSUPPORTED2(classname, serviceasciiname1, serviceasciiname2) -//---------------------------------------------------------------------------------- #define IMPLEMENT_SERVICE_INFO2_STATIC(classname, implasciiname, serviceasciiname1, serviceasciiname2) \ IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(classname, implasciiname) \ IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \ IMPLEMENT_SERVICE_INFO_GETSUPPORTED2_STATIC(classname, serviceasciiname1,serviceasciiname2) \ IMPLEMENT_SERVICE_INFO_CREATE_STATIC(classname) \ -//---------------------------------------------------------------------------------- #define IMPLEMENT_SERVICE_INFO3(classname, implasciiname, serviceasciiname1, serviceasciiname2, serviceasciiname3) \ IMPLEMENT_SERVICE_INFO_IMPLNAME(classname, implasciiname) \ IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \ IMPLEMENT_SERVICE_INFO_GETSUPPORTED3(classname, serviceasciiname1, serviceasciiname2, serviceasciiname3) \ -//---------------------------------------------------------------------------------- #define IMPLEMENT_SERVICE_INFO1_ABSTRACT(classname, serviceasciiname) \ IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \ IMPLEMENT_SERVICE_INFO_GETSUPPORTED1(classname, serviceasciiname) \ -//---------------------------------------------------------------------------------- #define IMPLEMENT_SERVICE_INFO2_ABSTRACT(classname, serviceasciiname1, serviceasciiname2) \ IMPLEMENT_SERVICE_INFO_SUPPORTS(classname) \ IMPLEMENT_SERVICE_INFO_GETSUPPORTED2(classname, serviceasciiname1, serviceasciiname2) \ -//================================================================================== -//= XTypeProvider helpers +// XTypeProvider helpers -//-------------------------------------------------------------------------- #define DECLARE_IMPLEMENTATION_ID( ) \ virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException); \ static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId() \ -//-------------------------------------------------------------------------- #define DECLARE_GETTYPES( ) \ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException); -//-------------------------------------------------------------------------- #define DECLARE_TYPEPROVIDER( ) \ DECLARE_GETTYPES( ) \ DECLARE_IMPLEMENTATION_ID( ) -//-------------------------------------------------------------------------- #define IMPLEMENT_IMPLEMENTATION_ID( classname ) \ ::com::sun::star::uno::Sequence< sal_Int8 > classname::getUnoTunnelImplementationId() \ { \ @@ -250,7 +231,6 @@ public: return classname::getUnoTunnelImplementationId(); \ } -//-------------------------------------------------------------------------- #define IMPLEMENT_GETTYPES2( classname, baseclass1, baseclass2 ) \ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > classname::getTypes() throw (::com::sun::star::uno::RuntimeException) \ { \ @@ -260,7 +240,6 @@ public: ); \ } -//-------------------------------------------------------------------------- #define IMPLEMENT_GETTYPES3( classname, baseclass1, baseclass2, baseclass3 ) \ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > classname::getTypes() throw (::com::sun::star::uno::RuntimeException) \ { \ @@ -271,25 +250,20 @@ public: ); \ } -//-------------------------------------------------------------------------- #define IMPLEMENT_TYPEPROVIDER2( classname, baseclass1, baseclass2 ) \ IMPLEMENT_IMPLEMENTATION_ID( classname) \ IMPLEMENT_GETTYPES2( classname, baseclass1, baseclass2 ) -//-------------------------------------------------------------------------- #define IMPLEMENT_TYPEPROVIDER3( classname, baseclass1, baseclass2, baseclass3 ) \ IMPLEMENT_IMPLEMENTATION_ID( classname) \ IMPLEMENT_GETTYPES3(classname, baseclass1, baseclass2, baseclass3 ) -//================================================================================== -//= helper for declaring/implementing classes based on the OPropertyContainer and an OPropertyArrayUsageHelper -//---------------------------------------------------------------------------------- +// helper for declaring/implementing classes based on the OPropertyContainer and an OPropertyArrayUsageHelper #define DECLARE_PROPERTYCONTAINER_DEFAULTS( ) \ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException); \ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); \ virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const -//---------------------------------------------------------------------------------- #define IMPLEMENT_PROPERTYCONTAINER_DEFAULTS2( classname , baseclass1) \ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL classname::getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException) \ { \ @@ -306,74 +280,61 @@ public: describeProperties(aProps); \ return new ::cppu::OPropertyArrayHelper(aProps); \ } -//---------------------------------------------------------------------------------- #define IMPLEMENT_PROPERTYCONTAINER_DEFAULTS( classname ) \ IMPLEMENT_PROPERTYCONTAINER_DEFAULTS2( classname, classname ) -//================================================================================== -//= helper for implementing the createArrayHelper -//---------------------------------------------------------------------------------- +// helper for implementing the createArrayHelper #define BEGIN_PROPERTY_SEQUENCE(count) \ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property> aDescriptor(count); \ ::com::sun::star::beans::Property* pDesc = aDescriptor.getArray(); \ sal_Int32 nPos = 0; \ -//---------------------------------------------------------------------------------- #define BEGIN_PROPERTY_HELPER(count) \ BEGIN_PROPERTY_SEQUENCE(count) -//---------------------------------------------------------------------------------- #define DECL_PROP_IMPL(varname, cpputype) \ pDesc[nPos++] = ::com::sun::star::beans::Property(PROPERTY_##varname, PROPERTY_ID_##varname, cpputype, -//---------------------------------------------------------------------------------- #define DECL_PROP0(varname, type) \ DECL_PROP_IMPL(varname, ::getCppuType((const type *)0)) 0) -//---------------------------------------------------------------------------------- + #define DECL_PROP0_BOOL(varname) \ DECL_PROP_IMPL(varname, ::getBooleanCppuType()) 0) -//---------------------------------------------------------------------------------- + #define DECL_PROP0_IFACE(varname, iface) \ DECL_PROP_IMPL(varname, ::getCppuType(static_cast< ::com::sun::star::uno::Reference< iface >* >(NULL))) 0) -//---------------------------------------------------------------------------------- #define DECL_PROP1(varname, type, attrib1) \ DECL_PROP_IMPL(varname, ::getCppuType((const type *)0)) ::com::sun::star::beans::PropertyAttribute::attrib1) -//---------------------------------------------------------------------------------- + #define DECL_PROP1_BOOL(varname, attrib1) \ DECL_PROP_IMPL(varname, ::getBooleanCppuType()) ::com::sun::star::beans::PropertyAttribute::attrib1) -//---------------------------------------------------------------------------------- + #define DECL_PROP1_IFACE(varname, iface, attrib1) \ DECL_PROP_IMPL(varname, ::getCppuType(static_cast< ::com::sun::star::uno::Reference< iface >* >(NULL))) ::com::sun::star::beans::PropertyAttribute::attrib1) -//---------------------------------------------------------------------------------- + #define DECL_PROP2_IFACE(varname, iface, attrib1, attrib2) \ DECL_PROP_IMPL(varname, ::getCppuType(static_cast< ::com::sun::star::uno::Reference< iface >* >(NULL))) ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2) -//---------------------------------------------------------------------------------- #define DECL_PROP2(varname, type, attrib1, attrib2) \ DECL_PROP_IMPL(varname, ::getCppuType((const type *)0)) ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2) -//---------------------------------------------------------------------------------- + #define DECL_PROP2_BOOL(varname, attrib1, attrib2) \ DECL_PROP_IMPL(varname, ::getBooleanCppuType()) ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2) -//---------------------------------------------------------------------------------- #define DECL_PROP3(varname, type, attrib1, attrib2, attrib3) \ DECL_PROP_IMPL(varname, ::getCppuType((const type *)0)) ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 | ::com::sun::star::beans::PropertyAttribute::attrib3) -//---------------------------------------------------------------------------------- + #define DECL_PROP3_BOOL(varname, attrib1, attrib2, attrib3) \ DECL_PROP_IMPL(varname, ::getBooleanCppuType()) ::com::sun::star::beans::PropertyAttribute::attrib1 | ::com::sun::star::beans::PropertyAttribute::attrib2 | ::com::sun::star::beans::PropertyAttribute::attrib3) - -//---------------------------------------------------------------------------------- #define END_PROPERTY_SEQUENCE() \ OSL_ENSURE(nPos == aDescriptor.getLength(), "forgot to adjust the count ?"); \ -//---------------------------------------------------------------------------------- #define END_PROPERTY_HELPER() \ END_PROPERTY_SEQUENCE() \ return new ::cppu::OPropertyArrayHelper(aDescriptor); - #define NOTIFY_LISTERNERS(_rListeners,T,method) \ Sequence< Reference< XInterface > > aListenerSeq = _rListeners.getElements(); \ \ diff --git a/dbaccess/source/inc/dsntypes.hxx b/dbaccess/source/inc/dsntypes.hxx index 6802694b68c7..0395dc530240 100644 --- a/dbaccess/source/inc/dsntypes.hxx +++ b/dbaccess/source/inc/dsntypes.hxx @@ -25,14 +25,10 @@ #include <tools/string.hxx> #include <connectivity/DriversConfig.hxx> -//......................................................................... namespace dbaccess { -//......................................................................... -//========================================================================= -//= DATASOURCE_TYPE -//========================================================================= +// DATASOURCE_TYPE /// known datasource types enum DATASOURCE_TYPE { @@ -75,7 +71,6 @@ enum DATASOURCE_TYPE DST_USERDEFINE9, DST_USERDEFINE10, - DST_UNKNOWN /// unrecognized type }; @@ -99,10 +94,7 @@ enum DATASOURCE_TYPE #define PAGE_DBSETUPWIZARD_USERDEFINED 17 #define PAGE_DBSETUPWIZARD_MYSQL_NATIVE 18 - -//========================================================================= -//= ODsnTypeCollection -//========================================================================= +// ODsnTypeCollection class OOO_DLLPUBLIC_DBA ODsnTypeCollection { protected: @@ -190,9 +182,7 @@ public: OUString getType(const OUString& _sURL) const; }; -//------------------------------------------------------------------------- //- ODsnTypeCollection::TypeIterator -//------------------------------------------------------------------------- class OOO_DLLPUBLIC_DBA ODsnTypeCollection::TypeIterator { friend class ODsnTypeCollection; @@ -225,9 +215,7 @@ protected: TypeIterator(const ODsnTypeCollection* _pContainer, sal_Int32 _nInitialPos = 0); }; -//......................................................................... } // namespace dbaccess -//......................................................................... #endif // _DBACCESS_DSNTYPES_HXX_ diff --git a/dbaccess/source/inc/registrationhelper.hxx b/dbaccess/source/inc/registrationhelper.hxx index 0f482b651710..cef8c004fe5e 100644 --- a/dbaccess/source/inc/registrationhelper.hxx +++ b/dbaccess/source/inc/registrationhelper.hxx @@ -30,7 +30,6 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleService rtl_ModuleCount* ); -//========================================================================== class OModuleRegistration { static ::com::sun::star::uno::Sequence< OUString >* @@ -76,7 +75,6 @@ public: ); }; -//========================================================================== template <class TYPE> class OMultiInstanceAutoRegistration { @@ -112,7 +110,6 @@ OMultiInstanceAutoRegistration<TYPE>::~OMultiInstanceAutoRegistration() OModuleRegistration::revokeComponent(TYPE::getImplementationName_Static()); } -//========================================================================== template <class TYPE> class OOneInstanceAutoRegistration { diff --git a/dbaccess/source/sdbtools/connection/connectiondependent.hxx b/dbaccess/source/sdbtools/connection/connectiondependent.hxx index 4533520095d4..668b61c23933 100644 --- a/dbaccess/source/sdbtools/connection/connectiondependent.hxx +++ b/dbaccess/source/sdbtools/connection/connectiondependent.hxx @@ -27,14 +27,10 @@ #include <cppuhelper/weakref.hxx> #include <osl/mutex.hxx> -//........................................................................ namespace sdbtools { -//........................................................................ - //==================================================================== - //= ConnectionDependentComponent - //==================================================================== + // ConnectionDependentComponent class ConnectionDependentComponent { private: @@ -103,9 +99,7 @@ namespace sdbtools } }; - //==================================================================== - //= ConnectionDependentComponent::EntryGuard - //==================================================================== + // ConnectionDependentComponent::EntryGuard /** a class for guarding methods of a connection-dependent component This class serves multiple purposes: @@ -137,10 +131,7 @@ namespace sdbtools } }; - -//........................................................................ } // namespace sdbtools -//........................................................................ #endif // DBACCESS_CONNECTION_DEPENDENT_HXX diff --git a/dbaccess/source/sdbtools/connection/connectiontools.cxx b/dbaccess/source/sdbtools/connection/connectiontools.cxx index 868ee3c8b375..cc89afb70436 100644 --- a/dbaccess/source/sdbtools/connection/connectiontools.cxx +++ b/dbaccess/source/sdbtools/connection/connectiontools.cxx @@ -33,10 +33,8 @@ extern "C" void SAL_CALL createRegistryInfo_ConnectionTools() ::sdbtools::OAutoRegistration< ::sdbtools::ConnectionTools > aRegistration; } -//........................................................................ namespace sdbtools { -//........................................................................ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -53,41 +51,33 @@ namespace sdbtools using ::com::sun::star::lang::IllegalArgumentException; using ::com::sun::star::uno::XComponentContext; - //==================================================================== - //= ConnectionTools - //==================================================================== - //-------------------------------------------------------------------- + // ConnectionTools ConnectionTools::ConnectionTools( const Reference<XComponentContext>& _rContext ) :ConnectionDependentComponent( _rContext ) { } - //-------------------------------------------------------------------- ConnectionTools::~ConnectionTools() { } - //-------------------------------------------------------------------- Reference< XTableName > SAL_CALL ConnectionTools::createTableName() throw (RuntimeException) { EntryGuard aGuard( *this ); return new TableName( getContext(), getConnection() ); } - //-------------------------------------------------------------------- Reference< XObjectNames > SAL_CALL ConnectionTools::getObjectNames() throw (RuntimeException) { EntryGuard aGuard( *this ); return new ObjectNames( getContext(), getConnection() ); } - //-------------------------------------------------------------------- Reference< XDataSourceMetaData > SAL_CALL ConnectionTools::getDataSourceMetaData() throw (RuntimeException) { EntryGuard aGuard( *this ); return new DataSourceMetaData( getContext(), getConnection() ); } - //-------------------------------------------------------------------- Reference< container::XNameAccess > SAL_CALL ConnectionTools::getFieldsByCommandDescriptor( ::sal_Int32 commandType, const OUString& command, Reference< lang::XComponent >& keepFieldsAlive ) throw (sdbc::SQLException, RuntimeException) { EntryGuard aGuard( *this ); @@ -97,7 +87,6 @@ namespace sdbtools aErrorInfo.doThrow(); return xRet; } - //-------------------------------------------------------------------- Reference< sdb::XSingleSelectQueryComposer > SAL_CALL ConnectionTools::getComposer( ::sal_Int32 commandType, const OUString& command ) throw (::com::sun::star::uno::RuntimeException) { EntryGuard aGuard( *this ); @@ -106,13 +95,11 @@ namespace sdbtools return aComposer.getComposer(); } - //-------------------------------------------------------------------- OUString SAL_CALL ConnectionTools::getImplementationName() throw (RuntimeException) { return getImplementationName_static(); } - //-------------------------------------------------------------------- ::sal_Bool SAL_CALL ConnectionTools::supportsService(const OUString & _ServiceName) throw (RuntimeException) { Sequence< OUString > aSupported( getSupportedServiceNames() ); @@ -121,19 +108,16 @@ namespace sdbtools return ::std::find( begin, end, _ServiceName ) != end; } - //-------------------------------------------------------------------- Sequence< OUString > SAL_CALL ConnectionTools::getSupportedServiceNames() throw (RuntimeException) { return getSupportedServiceNames_static(); } - //-------------------------------------------------------------------- OUString SAL_CALL ConnectionTools::getImplementationName_static() { return OUString( "com.sun.star.comp.dbaccess.ConnectionTools" ); } - //-------------------------------------------------------------------- Sequence< OUString > SAL_CALL ConnectionTools::getSupportedServiceNames_static() { Sequence< OUString > aSupported( 1 ); @@ -141,13 +125,11 @@ namespace sdbtools return aSupported; } - //-------------------------------------------------------------------- Reference< XInterface > SAL_CALL ConnectionTools::Create(const Reference< XComponentContext >& _rxContext ) { return *( new ConnectionTools( Reference<XComponentContext>( _rxContext ) ) ); } - //-------------------------------------------------------------------- void SAL_CALL ConnectionTools::initialize(const Sequence< Any > & _rArguments) throw (RuntimeException, Exception) { ::osl::MutexGuard aGuard( getMutex() ); @@ -167,9 +149,6 @@ namespace sdbtools setWeakConnection( xConnection ); } - -//........................................................................ } // namespace sdbtools -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/sdbtools/connection/connectiontools.hxx b/dbaccess/source/sdbtools/connection/connectiontools.hxx index 08d9a82db32b..7d8250e80d25 100644 --- a/dbaccess/source/sdbtools/connection/connectiontools.hxx +++ b/dbaccess/source/sdbtools/connection/connectiontools.hxx @@ -31,14 +31,10 @@ #include <cppuhelper/implbase3.hxx> -//........................................................................ namespace sdbtools { -//........................................................................ - //==================================================================== - //= ConnectionTools - //==================================================================== + // ConnectionTools typedef ::cppu::WeakImplHelper3 < ::com::sun::star::sdb::tools::XConnectionTools , ::com::sun::star::lang::XServiceInfo , ::com::sun::star::lang::XInitialization @@ -89,9 +85,7 @@ namespace sdbtools ConnectionTools& operator=( const ConnectionTools& ); // never implemented }; -//........................................................................ } // namespace sdbtools -//........................................................................ #endif // DBACCESS_CONNECTIONTOOLS_HXX diff --git a/dbaccess/source/sdbtools/connection/datasourcemetadata.cxx b/dbaccess/source/sdbtools/connection/datasourcemetadata.cxx index 2a68e485a510..b8e1d8a4f8b8 100644 --- a/dbaccess/source/sdbtools/connection/datasourcemetadata.cxx +++ b/dbaccess/source/sdbtools/connection/datasourcemetadata.cxx @@ -17,17 +17,14 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "datasourcemetadata.hxx" #include <com/sun/star/lang/NullPointerException.hpp> #include <connectivity/dbmetadata.hxx> -//........................................................................ namespace sdbtools { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::sdbc::XConnection; @@ -35,17 +32,12 @@ namespace sdbtools using ::com::sun::star::uno::RuntimeException; using ::com::sun::star::uno::XComponentContext; - //==================================================================== - //= DataSourceMetaData_Impl - //==================================================================== + // DataSourceMetaData_Impl struct DataSourceMetaData_Impl { }; - //==================================================================== - //= DataSourceMetaData - //==================================================================== - //-------------------------------------------------------------------- + // DataSourceMetaData DataSourceMetaData::DataSourceMetaData( const Reference<XComponentContext>& _rContext, const Reference< XConnection >& _rxConnection ) :ConnectionDependentComponent( _rContext ) ,m_pImpl( new DataSourceMetaData_Impl ) @@ -55,12 +47,10 @@ namespace sdbtools setWeakConnection( _rxConnection ); } - //-------------------------------------------------------------------- DataSourceMetaData::~DataSourceMetaData() { } - //-------------------------------------------------------------------- ::sal_Bool SAL_CALL DataSourceMetaData::supportsQueriesInFrom( ) throw (RuntimeException) { EntryGuard aGuard( *this ); @@ -68,8 +58,6 @@ namespace sdbtools return aMeta.supportsSubqueriesInFrom(); } -//........................................................................ } // namespace sdbtools -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx b/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx index fda74aa478b1..53fb07e0da93 100644 --- a/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx +++ b/dbaccess/source/sdbtools/connection/datasourcemetadata.hxx @@ -28,14 +28,10 @@ #include <memory> -//........................................................................ namespace sdbtools { -//........................................................................ - //==================================================================== - //= DataSourceMetaData - //==================================================================== + // DataSourceMetaData typedef ::cppu::WeakImplHelper1 < ::com::sun::star::sdb::tools::XDataSourceMetaData > DataSourceMetaData_Base; struct DataSourceMetaData_Impl; @@ -73,10 +69,7 @@ namespace sdbtools DataSourceMetaData& operator=( const DataSourceMetaData& ); // never implemented }; - -//........................................................................ } // namespace sdbtools -//........................................................................ #endif // DBACCESS_DATASOURCEMETADATA_HXX diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx index 2f3318c3903d..39f4ffa5dc88 100644 --- a/dbaccess/source/sdbtools/connection/objectnames.cxx +++ b/dbaccess/source/sdbtools/connection/objectnames.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "objectnames.hxx" #include "module_sdbt.hxx" @@ -38,10 +37,8 @@ #include <boost/shared_ptr.hpp> -//........................................................................ namespace sdbtools { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::sdbc::XConnection; @@ -63,9 +60,7 @@ namespace sdbtools namespace CommandType = ::com::sun::star::sdb::CommandType; namespace ErrorCondition = ::com::sun::star::sdb::ErrorCondition; - //==================================================================== - //= INameValidation - //==================================================================== + // INameValidation class INameValidation { public: @@ -76,9 +71,7 @@ namespace sdbtools }; typedef ::boost::shared_ptr< INameValidation > PNameValidation; - //==================================================================== - //= PlainExistenceCheck - //==================================================================== + // PlainExistenceCheck class PlainExistenceCheck : public INameValidation { private: @@ -120,9 +113,7 @@ namespace sdbtools } }; - //==================================================================== - //= TableValidityCheck - //==================================================================== + // TableValidityCheck class TableValidityCheck : public INameValidation { const Reference<XComponentContext> m_aContext; @@ -165,9 +156,7 @@ namespace sdbtools } }; - //==================================================================== - //= QueryValidityCheck - //==================================================================== + // QueryValidityCheck class QueryValidityCheck : public INameValidation { const Reference<XComponentContext> m_aContext; @@ -215,9 +204,7 @@ namespace sdbtools } }; - //==================================================================== - //= CombinedNameCheck - //==================================================================== + // CombinedNameCheck class CombinedNameCheck : public INameValidation { private: @@ -245,9 +232,7 @@ namespace sdbtools } }; - //==================================================================== - //= NameCheckFactory - //==================================================================== + // NameCheckFactory class NameCheckFactory { public: @@ -304,7 +289,6 @@ namespace sdbtools static void verifyCommandType( sal_Int32 _nCommandType ); }; - //-------------------------------------------------------------------- void NameCheckFactory::verifyCommandType( sal_Int32 _nCommandType ) { if ( ( _nCommandType != CommandType::TABLE ) @@ -317,7 +301,6 @@ namespace sdbtools ); } - //-------------------------------------------------------------------- PNameValidation NameCheckFactory::createExistenceCheck( const Reference<XComponentContext>& _rContext, sal_Int32 _nCommandType, const Reference< XConnection >& _rxConnection ) { verifyCommandType( _nCommandType ); @@ -354,7 +337,6 @@ namespace sdbtools return pReturn; } - //-------------------------------------------------------------------- PNameValidation NameCheckFactory::createValidityCheck( const Reference<XComponentContext>& _rContext, sal_Int32 _nCommandType, const Reference< XConnection >& _rxConnection ) { verifyCommandType( _nCommandType ); @@ -378,18 +360,13 @@ namespace sdbtools return PNameValidation( new QueryValidityCheck( _rContext, _rxConnection ) ); } - //==================================================================== - //= ObjectNames_Impl - //==================================================================== + // ObjectNames_Impl struct ObjectNames_Impl { SdbtClient m_aModuleClient; // keep the module alive as long as this instance lives }; - //==================================================================== - //= ObjectNames - //==================================================================== - //-------------------------------------------------------------------- + // ObjectNames ObjectNames::ObjectNames( const Reference<XComponentContext>& _rContext, const Reference< XConnection >& _rxConnection ) :ConnectionDependentComponent( _rContext ) ,m_pImpl( new ObjectNames_Impl ) @@ -399,12 +376,10 @@ namespace sdbtools setWeakConnection( _rxConnection ); } - //-------------------------------------------------------------------- ObjectNames::~ObjectNames() { } - //-------------------------------------------------------------------- OUString SAL_CALL ObjectNames::suggestName( ::sal_Int32 _CommandType, const OUString& _BaseName ) throw (IllegalArgumentException, RuntimeException) { EntryGuard aGuard( *this ); @@ -434,7 +409,6 @@ namespace sdbtools return sName; } - //-------------------------------------------------------------------- OUString SAL_CALL ObjectNames::convertToSQLName( const OUString& Name ) throw (RuntimeException) { EntryGuard aGuard( *this ); @@ -442,7 +416,6 @@ namespace sdbtools return ::dbtools::convertName2SQLName( Name, xMeta->getExtraNameCharacters() ); } - //-------------------------------------------------------------------- ::sal_Bool SAL_CALL ObjectNames::isNameUsed( ::sal_Int32 _CommandType, const OUString& _Name ) throw (IllegalArgumentException, RuntimeException) { EntryGuard aGuard( *this ); @@ -451,7 +424,6 @@ namespace sdbtools return !pNameCheck->validateName( _Name ); } - //-------------------------------------------------------------------- ::sal_Bool SAL_CALL ObjectNames::isNameValid( ::sal_Int32 _CommandType, const OUString& _Name ) throw (IllegalArgumentException, RuntimeException) { EntryGuard aGuard( *this ); @@ -460,7 +432,6 @@ namespace sdbtools return pNameCheck->validateName( _Name ); } - //-------------------------------------------------------------------- void SAL_CALL ObjectNames::checkNameForCreate( ::sal_Int32 _CommandType, const OUString& _Name ) throw (SQLException, RuntimeException) { EntryGuard aGuard( *this ); @@ -472,8 +443,6 @@ namespace sdbtools pNameCheck->validateName_throw( _Name ); } -//........................................................................ } // namespace sdbtools -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/sdbtools/connection/objectnames.hxx b/dbaccess/source/sdbtools/connection/objectnames.hxx index f05a417d796e..a696ba467090 100644 --- a/dbaccess/source/sdbtools/connection/objectnames.hxx +++ b/dbaccess/source/sdbtools/connection/objectnames.hxx @@ -28,14 +28,10 @@ #include <memory> -//........................................................................ namespace sdbtools { -//........................................................................ - //==================================================================== - //= ObjectNames - //==================================================================== + // ObjectNames typedef ::cppu::WeakImplHelper1 < ::com::sun::star::sdb::tools::XObjectNames > ObjectNames_Base; struct ObjectNames_Impl; @@ -79,9 +75,7 @@ namespace sdbtools ObjectNames& operator=( const ObjectNames& ); // never implemented }; -//........................................................................ } // namespace sdbtools -//........................................................................ #endif // DBACCESS_SOURCE_SDBTOOLS_INC_OBJECTNAMES_HXX diff --git a/dbaccess/source/sdbtools/connection/tablename.cxx b/dbaccess/source/sdbtools/connection/tablename.cxx index 1b640cb2e18a..96ca135c4404 100644 --- a/dbaccess/source/sdbtools/connection/tablename.cxx +++ b/dbaccess/source/sdbtools/connection/tablename.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "tablename.hxx" #include "sdbt_resource.hrc" #include "module_sdbt.hxx" @@ -31,10 +30,8 @@ #include <tools/diagnose_ex.h> #include <tools/string.hxx> -//........................................................................ namespace sdbtools { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::sdbc::XConnection; @@ -56,9 +53,7 @@ namespace sdbtools using namespace ::dbtools; - //==================================================================== - //= TableName - //==================================================================== + // TableName struct TableName_Impl { SdbtClient m_aModuleClient; // keep the module alive as long as this instance lives @@ -68,10 +63,7 @@ namespace sdbtools OUString sName; }; - //==================================================================== - //= TableName - //==================================================================== - //-------------------------------------------------------------------- + // TableName TableName::TableName( const Reference<XComponentContext>& _rContext, const Reference< XConnection >& _rxConnection ) :ConnectionDependentComponent( _rContext ) ,m_pImpl( new TableName_Impl ) @@ -82,61 +74,52 @@ namespace sdbtools setWeakConnection( _rxConnection ); } - //-------------------------------------------------------------------- TableName::~TableName() { } - //-------------------------------------------------------------------- OUString SAL_CALL TableName::getCatalogName() throw (RuntimeException) { EntryGuard aGuard( *this ); return m_pImpl->sCatalog; } - //-------------------------------------------------------------------- void SAL_CALL TableName::setCatalogName( const OUString& _catalogName ) throw (RuntimeException) { EntryGuard aGuard( *this ); m_pImpl->sCatalog = _catalogName; } - //-------------------------------------------------------------------- OUString SAL_CALL TableName::getSchemaName() throw (RuntimeException) { EntryGuard aGuard( *this ); return m_pImpl->sSchema; } - //-------------------------------------------------------------------- void SAL_CALL TableName::setSchemaName( const OUString& _schemaName ) throw (RuntimeException) { EntryGuard aGuard( *this ); m_pImpl->sSchema = _schemaName; } - //-------------------------------------------------------------------- OUString SAL_CALL TableName::getTableName() throw (RuntimeException) { EntryGuard aGuard( *this ); return m_pImpl->sName; } - //-------------------------------------------------------------------- void SAL_CALL TableName::setTableName( const OUString& _tableName ) throw (RuntimeException) { EntryGuard aGuard( *this ); m_pImpl->sName = _tableName; } - //-------------------------------------------------------------------- OUString SAL_CALL TableName::getNameForSelect() throw (RuntimeException) { EntryGuard aGuard( *this ); return composeTableNameForSelect( getConnection(), m_pImpl->sCatalog, m_pImpl->sSchema, m_pImpl->sName ); } - //-------------------------------------------------------------------- Reference< XPropertySet > SAL_CALL TableName::getTable() throw (NoSuchElementException, RuntimeException) { EntryGuard aGuard( *this ); @@ -164,7 +147,6 @@ namespace sdbtools return xTable; } - //-------------------------------------------------------------------- void SAL_CALL TableName::setTable( const Reference< XPropertySet >& _table ) throw (IllegalArgumentException, RuntimeException) { EntryGuard aGuard( *this ); @@ -194,7 +176,6 @@ namespace sdbtools } } - //-------------------------------------------------------------------- namespace { /** translates a CompositionType into a EComposeRule @@ -233,7 +214,6 @@ namespace sdbtools } } - //-------------------------------------------------------------------- OUString SAL_CALL TableName::getComposedName( ::sal_Int32 _Type, ::sal_Bool _Quote ) throw (IllegalArgumentException, RuntimeException) { EntryGuard aGuard( *this ); @@ -244,7 +224,6 @@ namespace sdbtools lcl_translateCompositionType_throw( _Type ) ); } - //-------------------------------------------------------------------- void SAL_CALL TableName::setComposedName( const OUString& _ComposedName, ::sal_Int32 _Type ) throw (RuntimeException) { EntryGuard aGuard( *this ); @@ -256,8 +235,6 @@ namespace sdbtools lcl_translateCompositionType_throw( _Type ) ); } -//........................................................................ } // namespace sdbtools -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/sdbtools/connection/tablename.hxx b/dbaccess/source/sdbtools/connection/tablename.hxx index 653d176b573d..73412de8bf1b 100644 --- a/dbaccess/source/sdbtools/connection/tablename.hxx +++ b/dbaccess/source/sdbtools/connection/tablename.hxx @@ -28,14 +28,10 @@ #include <memory> -//........................................................................ namespace sdbtools { -//........................................................................ - //==================================================================== - //= TableName - //==================================================================== + // TableName typedef ::cppu::WeakImplHelper1 < ::com::sun::star::sdb::tools::XTableName > TableName_Base; struct TableName_Impl; @@ -85,9 +81,7 @@ namespace sdbtools TableName& operator=( const TableName& ); // never implemented }; -//........................................................................ } // namespace sdbtools -//........................................................................ #endif // DBACCESS_SOURCE_SDBTOOLS_CONNECTION_TABLENAME_HXX diff --git a/dbaccess/source/sdbtools/inc/module_sdbt.hxx b/dbaccess/source/sdbtools/inc/module_sdbt.hxx index 26b1672d5624..8d242032771a 100644 --- a/dbaccess/source/sdbtools/inc/module_sdbt.hxx +++ b/dbaccess/source/sdbtools/inc/module_sdbt.hxx @@ -22,16 +22,12 @@ #include <unotools/componentresmodule.hxx> -//........................................................................ namespace sdbtools { -//........................................................................ DEFINE_MODULE( SdbtModule, SdbtClient, SdbtRes ) -//........................................................................ } // namespace sdbtools -//........................................................................ #endif // DBACCESS_MODULE_SDBT_HXX diff --git a/dbaccess/source/sdbtools/misc/module_sdbt.cxx b/dbaccess/source/sdbtools/misc/module_sdbt.cxx index 237a2a92618c..d40ef6b96aff 100644 --- a/dbaccess/source/sdbtools/misc/module_sdbt.cxx +++ b/dbaccess/source/sdbtools/misc/module_sdbt.cxx @@ -17,18 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "module_sdbt.hxx" -//........................................................................ namespace sdbtools { -//........................................................................ IMPLEMENT_MODULE( SdbtModule, "sdbt" ) -//........................................................................ } // namespace sdbtools -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/sdbtools/misc/sdbt_services.cxx b/dbaccess/source/sdbtools/misc/sdbt_services.cxx index 60230f39a445..03eba5f12ac6 100644 --- a/dbaccess/source/sdbtools/misc/sdbt_services.cxx +++ b/dbaccess/source/sdbtools/misc/sdbt_services.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "module_sdbt.hxx" using ::com::sun::star::lang::XMultiServiceFactory; @@ -28,8 +27,6 @@ using ::com::sun::star::uno::XInterface; extern "C" void SAL_CALL createRegistryInfo_ConnectionTools(); -//--------------------------------------------------------------------------------------- - extern "C" void SAL_CALL sdbt_initializeModule() { static sal_Bool s_bInit = sal_False; @@ -40,7 +37,6 @@ extern "C" void SAL_CALL sdbt_initializeModule() } } -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL sdbt_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/dbaccess/source/shared/registrationhelper.cxx b/dbaccess/source/shared/registrationhelper.cxx index 9fdaf34e006e..642241181590 100644 --- a/dbaccess/source/shared/registrationhelper.cxx +++ b/dbaccess/source/shared/registrationhelper.cxx @@ -32,7 +32,6 @@ uno::Sequence< uno::Sequence< OUString > >* OModuleRegistration::s_pSupportedSe uno::Sequence< sal_Int64 >* OModuleRegistration::s_pCreationFunctionPointers = NULL; uno::Sequence< sal_Int64 >* OModuleRegistration::s_pFactoryFunctionPointers = NULL; -//-------------------------------------------------------------------------- void OModuleRegistration::registerComponent( const OUString& _rImplementationName, const uno::Sequence< OUString >& _rServiceNames, @@ -68,7 +67,6 @@ void OModuleRegistration::registerComponent( s_pFactoryFunctionPointers->getArray()[nOldLen] = reinterpret_cast<sal_Int64>(_pFactoryFunction); } -//-------------------------------------------------------------------------- void OModuleRegistration::revokeComponent(const OUString& _rImplementationName) { if (!s_pImplementationNames) @@ -106,7 +104,6 @@ void OModuleRegistration::revokeComponent(const OUString& _rImplementationName) } } -//-------------------------------------------------------------------------- uno::Reference< uno::XInterface > OModuleRegistration::getComponentFactory( const OUString& _rImplementationName, const uno::Reference< lang::XMultiServiceFactory >& _rxServiceManager) @@ -126,10 +123,8 @@ uno::Reference< uno::XInterface > OModuleRegistration::getComponentFactory( && (s_pImplementationNames->getLength() == s_pFactoryFunctionPointers->getLength()), "OModuleRegistration::getComponentFactory : inconsistent state !"); - uno::Reference< uno::XInterface > xReturn; - sal_Int32 nLen = s_pImplementationNames->getLength(); const OUString* pImplName = s_pImplementationNames->getConstArray(); const uno::Sequence< OUString >* pServices = s_pSupportedServices->getConstArray(); @@ -155,5 +150,4 @@ uno::Reference< uno::XInterface > OModuleRegistration::getComponentFactory( return NULL; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index 15d80947b54d..8ab54d24b068 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "AppController.hxx" #include "dbustrings.hrc" #include "advancedsettingsdlg.hxx" @@ -133,10 +132,9 @@ extern "C" void SAL_CALL createRegistryInfo_ODBApplication() { static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OApplicationController > aAutoRegistration; } -//........................................................................ + namespace dbaui { -//........................................................................ using namespace ::dbtools; using namespace ::svx; using namespace ::com::sun::star; @@ -162,35 +160,32 @@ using ::com::sun::star::sdb::application::NamedDatabaseObject; namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject; namespace DatabaseObjectContainer = ::com::sun::star::sdb::application::DatabaseObjectContainer; -//------------------------------------------------------------------------------ OUString SAL_CALL OApplicationController::getImplementationName() throw( RuntimeException ) { return getImplementationName_Static(); } -//------------------------------------------------------------------------------ OUString OApplicationController::getImplementationName_Static() throw( RuntimeException ) { return OUString(SERVICE_SDB_APPLICATIONCONTROLLER); } -//------------------------------------------------------------------------------ + Sequence< OUString> OApplicationController::getSupportedServiceNames_Static(void) throw( RuntimeException ) { Sequence< OUString> aSupported(1); aSupported.getArray()[0] = OUString("com.sun.star.sdb.application.DefaultViewController"); return aSupported; } -//------------------------------------------------------------------------- + Sequence< OUString> SAL_CALL OApplicationController::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL OApplicationController::Create(const Reference<XMultiServiceFactory >& _rxFactory) { return *(new OApplicationController( comphelper::getComponentContext(_rxFactory))); } -// ----------------------------------------------------------------------------- struct XContainerFunctor : public ::std::unary_function< OApplicationController::TContainerVector::value_type , bool> { @@ -206,9 +201,7 @@ struct XContainerFunctor : public ::std::unary_function< OApplicationController: } }; -//==================================================================== -//= OApplicationController -//==================================================================== +// OApplicationController class SelectionNotifier : public ::boost::noncopyable { private: @@ -291,11 +284,8 @@ private: SelectionNotifier& m_rNotifier; }; -//==================================================================== -//= OApplicationController -//==================================================================== +// OApplicationController DBG_NAME(OApplicationController) -//-------------------------------------------------------------------- OApplicationController::OApplicationController(const Reference< XComponentContext >& _rxORB) :OApplicationController_CBASE( _rxORB ) ,m_aContextMenuInterceptors( getMutex() ) @@ -313,7 +303,7 @@ OApplicationController::OApplicationController(const Reference< XComponentContex { DBG_CTOR(OApplicationController,NULL); } -//------------------------------------------------------------------------------ + OApplicationController::~OApplicationController() { if ( !rBHelper.bDisposed && !rBHelper.bInDispose ) @@ -330,10 +320,9 @@ OApplicationController::~OApplicationController() DBG_DTOR(OApplicationController,NULL); } -//-------------------------------------------------------------------- + IMPLEMENT_FORWARD_XTYPEPROVIDER2(OApplicationController,OApplicationController_CBASE,OApplicationController_Base) IMPLEMENT_FORWARD_XINTERFACE2(OApplicationController,OApplicationController_CBASE,OApplicationController_Base) -// ----------------------------------------------------------------------------- void OApplicationController::disconnect() { if ( m_xDataSourceConnection.is() ) @@ -357,7 +346,6 @@ void OApplicationController::disconnect() InvalidateAll(); } -//-------------------------------------------------------------------- void SAL_CALL OApplicationController::disposing() { ::std::for_each(m_aCurrentContainers.begin(),m_aCurrentContainers.end(),XContainerFunctor(this)); @@ -437,7 +425,6 @@ void SAL_CALL OApplicationController::disposing() OApplicationController_CBASE::disposing(); // here the m_refCount must be equal 5 } -//-------------------------------------------------------------------- sal_Bool OApplicationController::Construct(Window* _pParent) { setView( * new OApplicationView( _pParent, getORB(), *this, m_ePreviewMode ) ); @@ -481,7 +468,6 @@ sal_Bool OApplicationController::Construct(Window* _pParent) return sal_True; } -//-------------------------------------------------------------------- void SAL_CALL OApplicationController::disposing(const EventObject& _rSource) throw( RuntimeException ) { ::osl::MutexGuard aGuard( getMutex() ); @@ -519,7 +505,7 @@ void SAL_CALL OApplicationController::disposing(const EventObject& _rSource) thr OApplicationController_CBASE::disposing( _rSource ); } } -//-------------------------------------------------------------------- + sal_Bool SAL_CALL OApplicationController::suspend(sal_Bool bSuspend) throw( RuntimeException ) { // notify the OnPrepareViewClosing event (before locking any mutex) @@ -577,7 +563,7 @@ sal_Bool SAL_CALL OApplicationController::suspend(sal_Bool bSuspend) throw( Runt return bCanSuspend; } -// ----------------------------------------------------------------------------- + FeatureState OApplicationController::GetState(sal_uInt16 _nId) const { FeatureState aReturn; @@ -968,7 +954,6 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const return aReturn; } -// ----------------------------------------------------------------------------- namespace { bool lcl_handleException_nothrow( const Reference< XModel >& _rxDocument, const Any& _rException ) @@ -999,7 +984,6 @@ namespace } } -// ----------------------------------------------------------------------------- void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& aArgs) { SolarMutexGuard aSolarGuard; @@ -1425,7 +1409,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa } InvalidateFeature(_nId); } -// ----------------------------------------------------------------------------- + void OApplicationController::describeSupportedFeatures() { OApplicationController_CBASE::describeSupportedFeatures(); @@ -1532,13 +1516,12 @@ void OApplicationController::describeSupportedFeatures() implDescribeSupportedFeature( ".uno:DBStatusUserName", SID_DB_APP_STATUS_USERNAME, CommandGroup::INTERNAL); implDescribeSupportedFeature( ".uno:DBStatusHostName", SID_DB_APP_STATUS_HOSTNAME, CommandGroup::INTERNAL); } -// ----------------------------------------------------------------------------- + OApplicationView* OApplicationController::getContainer() const { return static_cast< OApplicationView* >( getView() ); } -// ----------------------------------------------------------------------------- // ::com::sun::star::container::XContainerListener void SAL_CALL OApplicationController::elementInserted( const ContainerEvent& _rEvent ) throw(RuntimeException) { @@ -1575,7 +1558,7 @@ void SAL_CALL OApplicationController::elementInserted( const ContainerEvent& _rE } } } -// ----------------------------------------------------------------------------- + void SAL_CALL OApplicationController::elementRemoved( const ContainerEvent& _rEvent ) throw(RuntimeException) { SolarMutexGuard aSolarGuard; @@ -1609,7 +1592,7 @@ void SAL_CALL OApplicationController::elementRemoved( const ContainerEvent& _rEv getContainer()->elementRemoved(eType,sName); } } -// ----------------------------------------------------------------------------- + void SAL_CALL OApplicationController::elementReplaced( const ContainerEvent& _rEvent ) throw(RuntimeException) { SolarMutexGuard aSolarGuard; @@ -1658,6 +1641,7 @@ void SAL_CALL OApplicationController::elementReplaced( const ContainerEvent& _rE } } } + namespace { OUString lcl_getToolBarResource(ElementType _eType) @@ -1686,7 +1670,7 @@ namespace return sToolbar; } } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationController::onContainerSelect(ElementType _eType) { OSL_ENSURE(getContainer(),"View is NULL! -> GPF"); @@ -1757,7 +1741,7 @@ sal_Bool OApplicationController::onContainerSelect(ElementType _eType) return sal_True; } -// ----------------------------------------------------------------------------- + bool OApplicationController::onEntryDoubleClick( SvTreeListBox& _rTree ) { if ( getContainer() && getContainer()->isLeaf( _rTree.GetHdlEntry() ) ) @@ -1778,7 +1762,7 @@ bool OApplicationController::onEntryDoubleClick( SvTreeListBox& _rTree ) } return false; // not handled } -// ----------------------------------------------------------------------------- + bool OApplicationController::impl_isAlterableView_nothrow( const OUString& _rTableOrViewName ) const { OSL_PRECOND( m_xDataSourceConnection.is(), "OApplicationController::impl_isAlterableView_nothrow: no connection!" ); @@ -1804,14 +1788,12 @@ bool OApplicationController::impl_isAlterableView_nothrow( const OUString& _rTab return bIsAlterableView; } -// ----------------------------------------------------------------------------- Reference< XComponent > OApplicationController::openElement(const OUString& _sName, ElementType _eType, ElementOpenMode _eOpenMode, sal_uInt16 _nInstigatorCommand ) { return openElementWithArguments( _sName, _eType, _eOpenMode, _nInstigatorCommand, ::comphelper::NamedValueCollection() ); } -// ----------------------------------------------------------------------------- Reference< XComponent > OApplicationController::openElementWithArguments( const OUString& _sName, ElementType _eType, ElementOpenMode _eOpenMode, sal_uInt16 _nInstigatorCommand, const ::comphelper::NamedValueCollection& _rAdditionalArguments ) { @@ -1923,7 +1905,7 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const } return xRet; } -// ----------------------------------------------------------------------------- + IMPL_LINK( OApplicationController, OnSelectContainer, void*, _pType ) { ElementType eType = (ElementType)reinterpret_cast< sal_IntPtr >( _pType ); @@ -1931,7 +1913,7 @@ IMPL_LINK( OApplicationController, OnSelectContainer, void*, _pType ) getContainer()->selectContainer(eType); return 0L; } -// ----------------------------------------------------------------------------- + IMPL_LINK( OApplicationController, OnCreateWithPilot, void*, _pType ) { ElementType eType = (ElementType)reinterpret_cast< sal_IntPtr >( _pType ); @@ -1939,7 +1921,6 @@ IMPL_LINK( OApplicationController, OnCreateWithPilot, void*, _pType ) return 0L; } -// ----------------------------------------------------------------------------- void OApplicationController::newElementWithPilot( ElementType _eType ) { utl::CloseVeto aKeepDoc( getFrame() ); @@ -1989,7 +1970,6 @@ void OApplicationController::newElementWithPilot( ElementType _eType ) // XDatabaseDocumentUI::loadComponent method. } -// ----------------------------------------------------------------------------- Reference< XComponent > OApplicationController::newElement( ElementType _eType, const ::comphelper::NamedValueCollection& i_rAdditionalArguments, Reference< XComponent >& o_rDocumentDefinition ) { @@ -2048,7 +2028,6 @@ Reference< XComponent > OApplicationController::newElement( ElementType _eType, return xComponent; } -// ----------------------------------------------------------------------------- void OApplicationController::addContainerListener(const Reference<XNameAccess>& _xCollection) { try @@ -2070,7 +2049,7 @@ void OApplicationController::addContainerListener(const Reference<XNameAccess>& DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OApplicationController::renameEntry() { SolarMutexGuard aSolarGuard; @@ -2224,7 +2203,6 @@ void OApplicationController::renameEntry() } } -// ----------------------------------------------------------------------------- void OApplicationController::onSelectionChanged() { InvalidateAll(); @@ -2245,7 +2223,7 @@ void OApplicationController::onSelectionChanged() } } } -// ----------------------------------------------------------------------------- + void OApplicationController::showPreviewFor(const ElementType _eType,const OUString& _sName) { if ( m_ePreviewMode == E_PREVIEWNONE ) @@ -2292,13 +2270,12 @@ void OApplicationController::showPreviewFor(const ElementType _eType,const OUStr } } -//------------------------------------------------------------------------------ IMPL_LINK_NOARG(OApplicationController, OnClipboardChanged) { OnInvalidateClipboard(); return 0L; } -//------------------------------------------------------------------------------ + void OApplicationController::OnInvalidateClipboard() { InvalidateFeature(ID_BROWSER_CUT); @@ -2306,21 +2283,21 @@ void OApplicationController::OnInvalidateClipboard() InvalidateFeature(ID_BROWSER_PASTE); InvalidateFeature(SID_DB_APP_PASTE_SPECIAL); } -// ----------------------------------------------------------------------------- + void OApplicationController::onCutEntry() { } -// ----------------------------------------------------------------------------- + void OApplicationController::onCopyEntry() { Execute(ID_BROWSER_COPY,Sequence<PropertyValue>()); } -// ----------------------------------------------------------------------------- + void OApplicationController::onPasteEntry() { Execute(ID_BROWSER_PASTE,Sequence<PropertyValue>()); } -// ----------------------------------------------------------------------------- + void OApplicationController::onDeleteEntry() { ElementType eType = getContainer()->getElementType(); @@ -2346,85 +2323,71 @@ void OApplicationController::onDeleteEntry() executeChecked(nId,Sequence<PropertyValue>()); } -// ----------------------------------------------------------------------------- void OApplicationController::executeUnChecked(const URL& _rCommand, const Sequence< PropertyValue>& aArgs) { OApplicationController_CBASE::executeUnChecked( _rCommand, aArgs ); } -// ----------------------------------------------------------------------------- void OApplicationController::executeChecked(const URL& _rCommand, const Sequence< PropertyValue>& aArgs) { OApplicationController_CBASE::executeChecked( _rCommand, aArgs ); } -// ----------------------------------------------------------------------------- void OApplicationController::executeUnChecked(sal_uInt16 _nCommandId, const Sequence< PropertyValue>& aArgs) { OApplicationController_CBASE::executeUnChecked( _nCommandId, aArgs ); } -// ----------------------------------------------------------------------------- void OApplicationController::executeChecked(sal_uInt16 _nCommandId, const Sequence< PropertyValue>& aArgs) { OApplicationController_CBASE::executeChecked( _nCommandId, aArgs ); } -// ----------------------------------------------------------------------------- sal_Bool OApplicationController::isCommandEnabled(sal_uInt16 _nCommandId) const { return OApplicationController_CBASE::isCommandEnabled( _nCommandId ); } -// ----------------------------------------------------------------------------- sal_Bool OApplicationController::isCommandEnabled( const OUString& _rCompleteCommandURL ) const { return OApplicationController_CBASE::isCommandEnabled( _rCompleteCommandURL ); } -// ----------------------------------------------------------------------------- sal_uInt16 OApplicationController::registerCommandURL( const OUString& _rCompleteCommandURL ) { return OApplicationController_CBASE::registerCommandURL( _rCompleteCommandURL ); } -// ----------------------------------------------------------------------------- void OApplicationController::notifyHiContrastChanged() { OApplicationController_CBASE::notifyHiContrastChanged(); } -// ----------------------------------------------------------------------------- Reference< XController > OApplicationController::getXController() throw( RuntimeException ) { return OApplicationController_CBASE::getXController(); } -// ----------------------------------------------------------------------------- bool OApplicationController::interceptUserInput( const NotifyEvent& _rEvent ) { return OApplicationController_CBASE::interceptUserInput( _rEvent ); } -// ----------------------------------------------------------------------------- PopupMenu* OApplicationController::getContextMenu( Control& /*_rControl*/ ) const { return new PopupMenu( ModuleRes( RID_MENU_APP_EDIT ) ); } -// ----------------------------------------------------------------------------- IController& OApplicationController::getCommandController() { return *static_cast< IApplicationController* >( this ); } -// ----------------------------------------------------------------------------- ::cppu::OInterfaceContainerHelper* OApplicationController::getContextMenuInterceptors() { return &m_aContextMenuInterceptors; } -// ----------------------------------------------------------------------------- Any OApplicationController::getCurrentSelection( Control& _rControl ) const { Sequence< NamedDatabaseObject > aSelection; @@ -2432,13 +2395,11 @@ Any OApplicationController::getCurrentSelection( Control& _rControl ) const return makeAny( aSelection ); } -// ----------------------------------------------------------------------------- sal_Bool OApplicationController::requestQuickHelp( const SvTreeListEntry* /*_pEntry*/, OUString& /*_rText*/ ) const { return sal_False; } -// ----------------------------------------------------------------------------- sal_Bool OApplicationController::requestDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPixel*/ ) { TransferableHelper* pTransfer = NULL; @@ -2463,7 +2424,7 @@ sal_Bool OApplicationController::requestDrag( sal_Int8 /*_nAction*/, const Point return NULL != pTransfer; } -// ----------------------------------------------------------------------------- + sal_Int8 OApplicationController::queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) { sal_Int8 nActionAskedFor = _rEvt.mnAction; @@ -2508,7 +2469,7 @@ sal_Int8 OApplicationController::queryDrop( const AcceptDropEvent& _rEvt, const return DND_ACTION_NONE; } -// ----------------------------------------------------------------------------- + sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt ) { OApplicationView* pView = getContainer(); @@ -2522,12 +2483,10 @@ sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt ) // a TransferableDataHelper for accessing the dropped data TransferableDataHelper aDroppedData(_rEvt.maDropEvent.Transferable); - // reset the data of the previous async drop (if any) if ( m_nAsyncDrop ) Application::RemoveUserEvent(m_nAsyncDrop); - m_nAsyncDrop = 0; m_aAsyncDrop.aDroppedData.clear(); m_aAsyncDrop.nType = pView->getElementType(); @@ -2536,7 +2495,6 @@ sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt ) m_aAsyncDrop.bHtml = sal_False; m_aAsyncDrop.aUrl = OUString(); - // loop through the available formats and see what we can do ... // first we have to check if it is our own format, if not we have to copy the stream :-( if ( ODataAccessObjectTransferable::canExtractObjectDescriptor(aDroppedData.GetDataFlavorExVector()) ) @@ -2611,13 +2569,12 @@ sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt ) return DND_ACTION_NONE; } -// ----------------------------------------------------------------------------- + Reference< XModel > SAL_CALL OApplicationController::getModel(void) throw( RuntimeException ) { return m_xModel; } -// ----------------------------------------------------------------------------- void OApplicationController::onAttachedFrame() { sal_Int32 nConnectedControllers( 0 ); @@ -2644,7 +2601,6 @@ void OApplicationController::onAttachedFrame() OnFirstControllerConnected(); } -// ----------------------------------------------------------------------------- void OApplicationController::OnFirstControllerConnected() { if ( !m_xModel.is() ) @@ -2693,7 +2649,6 @@ void OApplicationController::OnFirstControllerConnected() return; } -// ----------------------------------------------------------------------------- void SAL_CALL OApplicationController::attachFrame( const Reference< XFrame > & i_rxFrame ) throw( RuntimeException ) { ::osl::MutexGuard aGuard( getMutex() ); @@ -2703,7 +2658,6 @@ void SAL_CALL OApplicationController::attachFrame( const Reference< XFrame > & i onAttachedFrame(); } -// ----------------------------------------------------------------------------- sal_Bool SAL_CALL OApplicationController::attachModel(const Reference< XModel > & _rxModel) throw( RuntimeException ) { ::osl::MutexGuard aGuard( getMutex() ); @@ -2794,7 +2748,7 @@ sal_Bool SAL_CALL OApplicationController::attachModel(const Reference< XModel > return sal_True; } -// ----------------------------------------------------------------------------- + void OApplicationController::containerFound( const Reference< XContainer >& _xContainer) { try @@ -2810,13 +2764,12 @@ void OApplicationController::containerFound( const Reference< XContainer >& _xCo DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + OUString OApplicationController::getCurrentlySelectedName(sal_Int32& _rnCommandType) const { _rnCommandType = ( (getContainer()->getElementType() == E_QUERY) ? CommandType::QUERY : ( (getContainer()->getElementType() == E_TABLE) ? CommandType::TABLE : -1 )); - OUString sName; if ( _rnCommandType != -1 ) { @@ -2833,19 +2786,16 @@ OUString OApplicationController::getCurrentlySelectedName(sal_Int32& _rnCommandT return sName; } -// ----------------------------------------------------------------------------- void SAL_CALL OApplicationController::addSelectionChangeListener( const Reference< view::XSelectionChangeListener >& _Listener ) throw (RuntimeException) { m_pSelectionNotifier->addListener( _Listener ); } -// ----------------------------------------------------------------------------- void SAL_CALL OApplicationController::removeSelectionChangeListener( const Reference< view::XSelectionChangeListener >& _Listener ) throw (RuntimeException) { m_pSelectionNotifier->removeListener( _Listener ); } -// ----------------------------------------------------------------------------- ::sal_Bool SAL_CALL OApplicationController::select( const Any& _aSelection ) throw (IllegalArgumentException, RuntimeException) { SolarMutexGuard aSolarGuard; @@ -2857,7 +2807,6 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer return sal_True; } - // -------------------------------------------------------------- // BEGIN compatibility Sequence< NamedValue > aCurrentSelection; if ( (_aSelection >>= aCurrentSelection) && aCurrentSelection.getLength() ) @@ -2885,7 +2834,6 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer return sal_True; } // END compatibility - // -------------------------------------------------------------- Sequence< NamedDatabaseObject > aSelectedObjects; if ( !( _aSelection >>= aSelectedObjects ) ) @@ -2970,7 +2918,7 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer return sal_True; } -// ----------------------------------------------------------------------------- + Any SAL_CALL OApplicationController::getSelection( ) throw (RuntimeException) { SolarMutexGuard aSolarGuard; @@ -3000,7 +2948,7 @@ Any SAL_CALL OApplicationController::getSelection( ) throw (RuntimeException) } return makeAny( aCurrentSelection ); } -// ----------------------------------------------------------------------------- + void OApplicationController::impl_migrateScripts_nothrow() { try @@ -3014,8 +2962,6 @@ void OApplicationController::impl_migrateScripts_nothrow() } } -//........................................................................ } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx index e9e282040599..f56f039f4781 100644 --- a/dbaccess/source/ui/app/AppController.hxx +++ b/dbaccess/source/ui/app/AppController.hxx @@ -62,16 +62,12 @@ namespace com { namespace sun { namespace star { } }}} -//........................................................................ namespace dbaui { -//........................................................................ class SubComponentManager; - //==================================================================== - //= OApplicationController - //==================================================================== + // OApplicationController class OApplicationController; class OApplicationView; class OLinkedDocumentsAccess; @@ -137,7 +133,6 @@ namespace dbaui OApplicationView* getContainer() const; - /** returns the database name @return the database name @@ -400,7 +395,6 @@ namespace dbaui void impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::boost::optional< OUString >& i_rObjectName ); protected: - // ---------------------------------------------------------------- // initalizing members /** forces usage of a connection which we do not own <p>To be used from within XInitialization::initialize only.</p> @@ -564,9 +558,7 @@ namespace dbaui virtual void SAL_CALL disposing(); }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // DBAUI_APPCONTROLLER_HXX diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx index 8ac9711a2cfe..195c52a3424f 100644 --- a/dbaccess/source/ui/app/AppControllerDnD.cxx +++ b/dbaccess/source/ui/app/AppControllerDnD.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "AppController.hxx" #include <comphelper/sequence.hxx> #include <comphelper/property.hxx> @@ -82,10 +81,8 @@ #include <osl/mutex.hxx> #include "subcomponentmanager.hxx" -//........................................................................ namespace dbaui { -//........................................................................ using namespace ::dbtools; using namespace ::svx; using namespace ::svtools; @@ -101,7 +98,6 @@ using namespace ::com::sun::star::frame; using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::util; -// ----------------------------------------------------------------------------- void OApplicationController::deleteTables(const ::std::vector< OUString>& _rList) { SharedConnection xConnection( ensureConnection() ); @@ -185,7 +181,7 @@ void OApplicationController::deleteTables(const ::std::vector< OUString>& _rList } } } -// ----------------------------------------------------------------------------- + void OApplicationController::deleteObjects( ElementType _eType, const ::std::vector< OUString>& _rList, bool _bConfirm ) { Reference< XNameContainer > xNames( getElements( _eType ), UNO_QUERY ); @@ -296,7 +292,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec } } } -// ----------------------------------------------------------------------------- + void OApplicationController::deleteEntries() { SolarMutexGuard aSolarGuard; @@ -326,7 +322,7 @@ void OApplicationController::deleteEntries() } } } -// ----------------------------------------------------------------------------- + // DO NOT CALL with getMutex() held!! const SharedConnection& OApplicationController::ensureConnection( ::dbtools::SQLExceptionInfo* _pErrorInfo ) { @@ -414,13 +410,13 @@ const SharedConnection& OApplicationController::ensureConnection( ::dbtools::SQL return m_xDataSourceConnection; } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationController::isDataSourceReadOnly() const { Reference<XStorable> xStore(m_xModel,UNO_QUERY); return !xStore.is() || xStore->isReadonly(); } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationController::isConnectionReadOnly() const { sal_Bool bIsConnectionReadOnly = sal_True; @@ -438,7 +434,7 @@ sal_Bool OApplicationController::isConnectionReadOnly() const // TODO check configuration return bIsConnectionReadOnly; } -// ----------------------------------------------------------------------------- + Reference< XNameAccess > OApplicationController::getElements( ElementType _eType ) { Reference< XNameAccess > xElements; @@ -487,7 +483,7 @@ Reference< XNameAccess > OApplicationController::getElements( ElementType _eType return xElements; } -// ----------------------------------------------------------------------------- + void OApplicationController::getSelectionElementNames(::std::vector< OUString>& _rNames) const { SolarMutexGuard aSolarGuard; @@ -498,7 +494,6 @@ void OApplicationController::getSelectionElementNames(::std::vector< OUString>& getContainer()->getSelectionElementNames( _rNames ); } -// ----------------------------------------------------------------------------- SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptr< OLinkedDocumentsAccess > OApplicationController::getDocumentsAccess( ElementType _eType ) { @@ -519,9 +514,9 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH ) ); return pDocuments; } + SAL_WNODEPRECATED_DECLARATIONS_POP -// ----------------------------------------------------------------------------- TransferableHelper* OApplicationController::copyObject() { try @@ -587,7 +582,7 @@ TransferableHelper* OApplicationController::copyObject() } return NULL; } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAccessDescriptor& _rPasteData,const OUString& _sParentFolder ,sal_Bool _bMove) { try @@ -675,7 +670,6 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc } } - Reference< XNameContainer > xDestQueries(getQueryDefintions(), UNO_QUERY); Reference< XSingleServiceFactory > xQueryFactory(xDestQueries, UNO_QUERY); if (!xQueryFactory.is()) @@ -772,7 +766,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc } return sal_False; } -// ----------------------------------------------------------------------------- + Reference<XNameContainer> OApplicationController::getQueryDefintions() const { Reference<XQueryDefinitionsSupplier> xSet(m_xDataSource,UNO_QUERY); @@ -783,7 +777,7 @@ Reference<XNameContainer> OApplicationController::getQueryDefintions() const } return xNames; } -// ----------------------------------------------------------------------------- + void OApplicationController::getSupportedFormats(ElementType _eType,::std::vector<SotFormatStringId>& _rFormatIds) const { switch( _eType ) @@ -800,19 +794,18 @@ void OApplicationController::getSupportedFormats(ElementType _eType,::std::vecto break; } } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationController::isTableFormat() const { return m_aTableCopyHelper.isTableFormat(getViewClipboard()); } -// ----------------------------------------------------------------------------- + IMPL_LINK( OApplicationController, OnAsyncDrop, void*, /*NOTINTERESTEDIN*/ ) { m_nAsyncDrop = 0; SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); - if ( m_aAsyncDrop.nType == E_TABLE ) { SharedConnection xConnection( ensureConnection() ); @@ -842,9 +835,7 @@ IMPL_LINK( OApplicationController, OnAsyncDrop, void*, /*NOTINTERESTEDIN*/ ) return 0L; } -//........................................................................ -} // namespace dbaui -//........................................................................ +} // namespace dbaui /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index ce9ad063044f..202071992a60 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "AppController.hxx" #include "AppDetailView.hxx" #include "AppView.hxx" @@ -67,7 +66,6 @@ #include <vcl/waitobj.hxx> #include <osl/mutex.hxx> -//........................................................................ namespace dbaui { using namespace ::dbtools; @@ -93,9 +91,6 @@ using ::com::sun::star::ui::XContextMenuInterceptor; namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject; namespace ErrorCondition = ::com::sun::star::sdb::ErrorCondition; -//........................................................................ -// ----------------------------------------------------------------------------- - class CloseChecker : public ::cppu::WeakImplHelper1< com::sun::star::lang::XEventListener > { bool m_bClosed; @@ -122,7 +117,7 @@ public: } }; -// ----------------------------------------------------------------------------- + void OApplicationController::convertToView(const OUString& _sName) { try @@ -165,7 +160,7 @@ void OApplicationController::convertToView(const OUString& _sName) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OApplicationController::pasteFormat(sal_uInt32 _nFormatId) { if ( _nFormatId ) @@ -188,13 +183,12 @@ void OApplicationController::pasteFormat(sal_uInt32 _nFormatId) } } } -// ----------------------------------------------------------------------------- + void OApplicationController::openDataSourceAdminDialog() { openDialog( OUString( "com.sun.star.sdb.DatasourceAdministrationDialog" ) ); } -// ----------------------------------------------------------------------------- void OApplicationController::openDialog( const OUString& _sServiceName ) { try @@ -254,13 +248,12 @@ void OApplicationController::openDialog( const OUString& _sServiceName ) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OApplicationController::openTableFilterDialog() { openDialog( OUString( "com.sun.star.sdb.TableFilterDialog" ) ); } -// ----------------------------------------------------------------------------- void OApplicationController::refreshTables() { if ( getContainer() && getContainer()->getDetailView() ) @@ -282,12 +275,12 @@ void OApplicationController::refreshTables() getContainer()->getDetailView()->createTablesPage( ensureConnection() ); } } -// ----------------------------------------------------------------------------- + void OApplicationController::openDirectSQLDialog() { openDialog( SERVICE_SDB_DIRECTSQLDIALOG ); } -// ----------------------------------------------------------------------------- + void SAL_CALL OApplicationController::propertyChange( const PropertyChangeEvent& evt ) throw (RuntimeException) { SolarMutexGuard aSolarGuard; @@ -336,7 +329,6 @@ void SAL_CALL OApplicationController::propertyChange( const PropertyChangeEvent& modified(aEvt); } -// ----------------------------------------------------------------------------- Reference< XDataSource > SAL_CALL OApplicationController::getDataSource() throw (RuntimeException) { ::osl::MutexGuard aGuard( getMutex() ); @@ -344,7 +336,6 @@ Reference< XDataSource > SAL_CALL OApplicationController::getDataSource() throw return xDataSource; } -// ----------------------------------------------------------------------------- Reference< XWindow > SAL_CALL OApplicationController::getApplicationMainWindow() throw (RuntimeException) { ::osl::MutexGuard aGuard( getMutex() ); @@ -353,28 +344,24 @@ Reference< XWindow > SAL_CALL OApplicationController::getApplicationMainWindow() return xWindow; } -// ----------------------------------------------------------------------------- Sequence< Reference< XComponent > > SAL_CALL OApplicationController::getSubComponents() throw (RuntimeException) { ::osl::MutexGuard aGuard( getMutex() ); return m_pSubComponentManager->getSubComponents(); } -// ----------------------------------------------------------------------------- Reference< XConnection > SAL_CALL OApplicationController::getActiveConnection() throw (RuntimeException) { ::osl::MutexGuard aGuard( getMutex() ); return m_xDataSourceConnection.getTyped(); } -// ----------------------------------------------------------------------------- ::sal_Bool SAL_CALL OApplicationController::isConnected( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( getMutex() ); return m_xDataSourceConnection.is(); } -// ----------------------------------------------------------------------------- void SAL_CALL OApplicationController::connect( ) throw (SQLException, RuntimeException) { SQLExceptionInfo aError; @@ -390,7 +377,6 @@ void SAL_CALL OApplicationController::connect( ) throw (SQLException, RuntimeEx } } -// ----------------------------------------------------------------------------- beans::Pair< ::sal_Int32, OUString > SAL_CALL OApplicationController::identifySubComponent( const Reference< XComponent >& i_rSubComponent ) throw (IllegalArgumentException, RuntimeException) { ::osl::MutexGuard aGuard( getMutex() ); @@ -409,7 +395,6 @@ beans::Pair< ::sal_Int32, OUString > SAL_CALL OApplicationController::identifySu return beans::Pair< ::sal_Int32, OUString >( nType, sName ); } -// ----------------------------------------------------------------------------- ::sal_Bool SAL_CALL OApplicationController::closeSubComponents( ) throw (RuntimeException) { SolarMutexGuard aSolarGuard; @@ -417,8 +402,6 @@ beans::Pair< ::sal_Int32, OUString > SAL_CALL OApplicationController::identifySu return m_pSubComponentManager->closeSubComponents(); } - -// ----------------------------------------------------------------------------- namespace { ElementType lcl_objectType2ElementType( const sal_Int32 _nObjectType ) @@ -438,7 +421,6 @@ namespace } } -// ----------------------------------------------------------------------------- void OApplicationController::impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::boost::optional< OUString >& i_rObjectName ) { // ensure we're connected @@ -486,14 +468,12 @@ void OApplicationController::impl_validateObjectTypeAndName_throw( const sal_Int throw NoSuchElementException( *i_rObjectName, *this ); } -// ----------------------------------------------------------------------------- Reference< XComponent > SAL_CALL OApplicationController::loadComponent( ::sal_Int32 _ObjectType, const OUString& _ObjectName, ::sal_Bool _ForEditing ) throw (IllegalArgumentException, NoSuchElementException, SQLException, RuntimeException) { return loadComponentWithArguments( _ObjectType, _ObjectName, _ForEditing, Sequence< PropertyValue >() ); } -// ----------------------------------------------------------------------------- Reference< XComponent > SAL_CALL OApplicationController::loadComponentWithArguments( ::sal_Int32 _ObjectType, const OUString& _ObjectName, ::sal_Bool _ForEditing, const Sequence< PropertyValue >& _Arguments ) throw (IllegalArgumentException, NoSuchElementException, SQLException, RuntimeException) { @@ -513,13 +493,11 @@ Reference< XComponent > SAL_CALL OApplicationController::loadComponentWithArgume return xComponent; } -// ----------------------------------------------------------------------------- Reference< XComponent > SAL_CALL OApplicationController::createComponent( ::sal_Int32 i_nObjectType, Reference< XComponent >& o_DocumentDefinition ) throw (IllegalArgumentException, SQLException, RuntimeException) { return createComponentWithArguments( i_nObjectType, Sequence< PropertyValue >(), o_DocumentDefinition ); } -// ----------------------------------------------------------------------------- Reference< XComponent > SAL_CALL OApplicationController::createComponentWithArguments( ::sal_Int32 i_nObjectType, const Sequence< PropertyValue >& i_rArguments, Reference< XComponent >& o_DocumentDefinition ) throw (IllegalArgumentException, SQLException, RuntimeException) { SolarMutexGuard aSolarGuard; @@ -536,20 +514,17 @@ Reference< XComponent > SAL_CALL OApplicationController::createComponentWithArgu return xComponent; } -// ----------------------------------------------------------------------------- void SAL_CALL OApplicationController::registerContextMenuInterceptor( const Reference< XContextMenuInterceptor >& _Interceptor ) throw (RuntimeException) { if ( _Interceptor.is() ) m_aContextMenuInterceptors.addInterface( _Interceptor ); } -// ----------------------------------------------------------------------------- void SAL_CALL OApplicationController::releaseContextMenuInterceptor( const Reference< XContextMenuInterceptor >& _Interceptor ) throw (RuntimeException) { m_aContextMenuInterceptors.removeInterface( _Interceptor ); } -// ----------------------------------------------------------------------------- void OApplicationController::previewChanged( sal_Int32 _nMode ) { SolarMutexGuard aSolarGuard; @@ -576,7 +551,7 @@ void OApplicationController::previewChanged( sal_Int32 _nMode ) InvalidateFeature(SID_DB_APP_VIEW_DOCINFO_PREVIEW); InvalidateFeature(SID_DB_APP_VIEW_DOC_PREVIEW); } -// ----------------------------------------------------------------------------- + void OApplicationController::askToReconnect() { if ( m_bNeedToReconnect ) @@ -608,7 +583,6 @@ void OApplicationController::askToReconnect() } } -// ----------------------------------------------------------------------------- OUString OApplicationController::getDatabaseName() const { OUString sDatabaseName; @@ -626,14 +600,12 @@ OUString OApplicationController::getDatabaseName() const return sDatabaseName; } -// ----------------------------------------------------------------------------- OUString OApplicationController::getStrippedDatabaseName() const { OUString sDatabaseName; return ::dbaui::getStrippedDatabaseName( m_xDataSource, sDatabaseName ); } -// ----------------------------------------------------------------------------- void OApplicationController::onDocumentOpened( const OUString& _rName, const sal_Int32 _nType, const ElementOpenMode _eMode, const Reference< XComponent >& _xDocument, const Reference< XComponent >& _rxDefinition ) { @@ -657,7 +629,7 @@ void OApplicationController::onDocumentOpened( const OUString& _rName, const sal DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationController::insertHierachyElement(ElementType _eType,const OUString& _sParentFolder,sal_Bool _bCollection,const Reference<XContent>& _xContent,sal_Bool _bMove) { Reference<XHierarchicalNameContainer> xNames(getElements(_eType), UNO_QUERY); @@ -670,7 +642,7 @@ sal_Bool OApplicationController::insertHierachyElement(ElementType _eType,const ,_xContent ,_bMove); } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationController::isRenameDeleteAllowed(ElementType _eType,sal_Bool _bDelete) const { ElementType eType = getContainer()->getElementType(); @@ -710,7 +682,7 @@ sal_Bool OApplicationController::isRenameDeleteAllowed(ElementType _eType,sal_Bo } return bEnabled; } -// ----------------------------------------------------------------------------- + void OApplicationController::onLoadedMenu(const Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager) { @@ -743,7 +715,7 @@ void OApplicationController::onLoadedMenu(const Reference< ::com::sun::star::fra InvalidateAll(); } } -// ----------------------------------------------------------------------------- + void OApplicationController::doAction(sal_uInt16 _nId ,ElementOpenMode _eOpenMode) { ::std::vector< OUString> aList; @@ -798,7 +770,7 @@ void OApplicationController::doAction(sal_uInt16 _nId ,ElementOpenMode _eOpenMod aSendMail.Send( getFrame() ); } } -// ----------------------------------------------------------------------------- + ElementType OApplicationController::getElementType(const Reference< XContainer >& _xContainer) const { ElementType eRet = E_NONE; @@ -817,8 +789,6 @@ ElementType OApplicationController::getElementType(const Reference< XContainer > return eRet; } -//........................................................................ } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 79a0afff37ee..148d469d68ca 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -66,7 +66,6 @@ #include <com/sun/star/document/XDocumentProperties.hpp> - using namespace ::dbaui; using namespace ::com::sun::star::container; using namespace ::com::sun::star::uno; @@ -122,9 +121,7 @@ namespace OUString sErase = _rName.getToken(0,'/',nIndex); // we don't want to have the "private:forms" part return (nIndex != -1 ? lcl_findEntry_impl(rTree,_rName.copy(sErase.getLength() + 1),_pFirst) : NULL); } - //================================================================== // class OPreviewWindow - //================================================================== class OTablePreviewWindow : public Window { DECL_LINK(OnDisableInput, void*); @@ -135,12 +132,10 @@ namespace OTablePreviewWindow( Window* pParent, WinBits nStyle = 0 ); virtual long Notify( NotifyEvent& rNEvt ); }; - // ----------------------------------------------------------------------------- OTablePreviewWindow::OTablePreviewWindow(Window* pParent, WinBits nStyle) : Window( pParent, nStyle) { ImplInitSettings( sal_True, sal_True, sal_True ); } - // ----------------------------------------------------------------------------- long OTablePreviewWindow::Notify( NotifyEvent& rNEvt ) { long nRet = Window::Notify( rNEvt ); @@ -148,13 +143,11 @@ namespace PostUserEvent( LINK( this, OTablePreviewWindow, OnDisableInput) ); return nRet; } - // ----------------------------------------------------------------------------- IMPL_LINK_NOARG(OTablePreviewWindow, OnDisableInput) { EnableInput(sal_False); return 0L; } - // ----------------------------------------------------------------------------- void OTablePreviewWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); @@ -166,7 +159,6 @@ namespace Invalidate(); } } - // ----------------------------------------------------------------------------- void OTablePreviewWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -189,10 +181,9 @@ namespace } } -//================================================================== + // class OAppDetailPageHelper DBG_NAME(OAppDetailPageHelper) -//================================================================== OAppDetailPageHelper::OAppDetailPageHelper(Window* _pParent,OAppBorderWindow& _rBorderWin,PreviewMode _ePreviewMode) : Window(_pParent,WB_DIALOGCONTROL) ,m_rBorderWin(_rBorderWin) ,m_aFL(this,WB_VERT) @@ -232,7 +223,7 @@ OAppDetailPageHelper::OAppDetailPageHelper(Window* _pParent,OAppBorderWindow& _r m_pLists[i] = NULL; ImplInitSettings(); } -// ----------------------------------------------------------------------------- + OAppDetailPageHelper::~OAppDetailPageHelper() { try @@ -263,7 +254,7 @@ OAppDetailPageHelper::~OAppDetailPageHelper() DBG_DTOR(OAppDetailPageHelper,NULL); } -// ----------------------------------------------------------------------------- + int OAppDetailPageHelper::getVisibleControlIndex() const { int i = 0; @@ -274,7 +265,7 @@ int OAppDetailPageHelper::getVisibleControlIndex() const } return i; } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::selectAll() { int nPos = getVisibleControlIndex(); @@ -283,7 +274,7 @@ void OAppDetailPageHelper::selectAll() m_pLists[nPos]->SelectAll(sal_True); } } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::sort(int _nPos,SvSortMode _eSortMode ) { OSL_ENSURE(m_pLists[_nPos],"List can not be NULL! ->GPF"); @@ -293,7 +284,7 @@ void OAppDetailPageHelper::sort(int _nPos,SvSortMode _eSortMode ) if ( eOldSortMode != _eSortMode ) pModel->Resort(); } -// ----------------------------------------------------------------------------- + sal_Bool OAppDetailPageHelper::isSortUp() const { SvSortMode eSortMode = SortNone; @@ -305,21 +296,21 @@ sal_Bool OAppDetailPageHelper::isSortUp() const } return eSortMode == SortAscending; } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::sortDown() { int nPos = getVisibleControlIndex(); if ( nPos < E_ELEMENT_TYPE_COUNT ) sort(nPos,SortDescending); } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::sortUp() { int nPos = getVisibleControlIndex(); if ( nPos < E_ELEMENT_TYPE_COUNT ) sort(nPos,SortAscending); } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::getSelectionElementNames( ::std::vector< OUString>& _rNames ) const { int nPos = getVisibleControlIndex(); @@ -353,7 +344,6 @@ void OAppDetailPageHelper::getSelectionElementNames( ::std::vector< OUString>& _ } } -// ----------------------------------------------------------------------------- void OAppDetailPageHelper::describeCurrentSelectionForControl( const Control& _rControl, Sequence< NamedDatabaseObject >& _out_rSelectedObjects ) { enum ElementType eType = E_TABLE; @@ -368,7 +358,6 @@ void OAppDetailPageHelper::describeCurrentSelectionForControl( const Control& _r OSL_FAIL( "OAppDetailPageHelper::describeCurrentSelectionForControl: invalid control!" ); } -// ----------------------------------------------------------------------------- void OAppDetailPageHelper::describeCurrentSelectionForType( const ElementType _eType, Sequence< NamedDatabaseObject >& _out_rSelectedObjects ) { OSL_ENSURE( _eType < E_ELEMENT_TYPE_COUNT, "OAppDetailPageHelper::describeCurrentSelectionForType: invalid type!" ); @@ -437,7 +426,6 @@ void OAppDetailPageHelper::describeCurrentSelectionForType( const ElementType _e ::std::copy( aSelected.begin(), aSelected.end(), _out_rSelectedObjects.getArray() ); } -// ----------------------------------------------------------------------------- void OAppDetailPageHelper::selectElements(const Sequence< OUString>& _aNames) { int nPos = getVisibleControlIndex(); @@ -455,7 +443,7 @@ void OAppDetailPageHelper::selectElements(const Sequence< OUString>& _aNames) } } } -// ----------------------------------------------------------------------------- + OUString OAppDetailPageHelper::getQualifiedName( SvTreeListEntry* _pEntry ) const { int nPos = getVisibleControlIndex(); @@ -492,13 +480,13 @@ OUString OAppDetailPageHelper::getQualifiedName( SvTreeListEntry* _pEntry ) cons return sComposedName; } -// ----------------------------------------------------------------------------- + ElementType OAppDetailPageHelper::getElementType() const { int nPos = getVisibleControlIndex(); return static_cast<ElementType>(nPos); } -// ----------------------------------------------------------------------------- + sal_Int32 OAppDetailPageHelper::getSelectionCount() { sal_Int32 nCount = 0; @@ -515,7 +503,7 @@ sal_Int32 OAppDetailPageHelper::getSelectionCount() } return nCount; } -// ----------------------------------------------------------------------------- + sal_Int32 OAppDetailPageHelper::getElementCount() { sal_Int32 nCount = 0; @@ -526,34 +514,34 @@ sal_Int32 OAppDetailPageHelper::getElementCount() } return nCount; } -// ----------------------------------------------------------------------------- + sal_Bool OAppDetailPageHelper::isCutAllowed() { return sal_False; } -// ----------------------------------------------------------------------------- + sal_Bool OAppDetailPageHelper::isCopyAllowed() { return sal_True; } -// ----------------------------------------------------------------------------- + sal_Bool OAppDetailPageHelper::isPasteAllowed() { return sal_True; } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::copy() { } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::cut() { } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::paste() { } -// ----------------------------------------------------------------------------- + bool OAppDetailPageHelper::isLeaf(SvTreeListEntry* _pEntry) const { if ( !_pEntry ) @@ -570,7 +558,6 @@ bool OAppDetailPageHelper::isLeaf(SvTreeListEntry* _pEntry) const return true; } -// ----------------------------------------------------------------------------- sal_Bool OAppDetailPageHelper::isALeafSelected() const { int nPos = getVisibleControlIndex(); @@ -587,7 +574,7 @@ sal_Bool OAppDetailPageHelper::isALeafSelected() const } return bLeafSelected; } -// ----------------------------------------------------------------------------- + SvTreeListEntry* OAppDetailPageHelper::getEntry( const Point& _aPosPixel) const { SvTreeListEntry* pReturn = NULL; @@ -596,7 +583,7 @@ SvTreeListEntry* OAppDetailPageHelper::getEntry( const Point& _aPosPixel) const pReturn = m_pLists[nPos]->GetEntry( _aPosPixel,sal_True ); return pReturn; } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xConnection) { OSL_ENSURE(_xConnection.is(),"Connection is NULL! -> GPF"); @@ -630,7 +617,6 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon setDetailPage(m_pLists[E_TABLE]); } -// ----------------------------------------------------------------------------- void OAppDetailPageHelper::getElementIcons( ElementType _eType, sal_uInt16& _rImageId) { ImageProvider aImageProvider; @@ -649,7 +635,6 @@ void OAppDetailPageHelper::getElementIcons( ElementType _eType, sal_uInt16& _rIm _rImageId = aImageProvider.getDefaultImageResourceID( nDatabaseObjectType ); } -// ----------------------------------------------------------------------------- void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameAccess >& _xContainer) { OSL_ENSURE(E_TABLE != _eType,"E_TABLE isn't allowed."); @@ -693,7 +678,7 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA setDetailPage(m_pLists[_eType]); } } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::setDetailPage(Window* _pWindow) { OSL_ENSURE(_pWindow,"OAppDetailPageHelper::setDetailPage: Window is NULL!"); @@ -717,7 +702,6 @@ void OAppDetailPageHelper::setDetailPage(Window* _pWindow) Resize(); } -// ----------------------------------------------------------------------------- namespace { namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject; @@ -732,7 +716,6 @@ namespace } } -// ----------------------------------------------------------------------------- void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContainer, const ElementType _eType, const sal_uInt16 _nImageId, SvTreeListEntry* _pParent ) { @@ -772,7 +755,7 @@ void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContaine } } } -// ----------------------------------------------------------------------------- + DBTreeListBox* OAppDetailPageHelper::createSimpleTree( const OString& _sHelpId, const Image& _rImage) { DBTreeListBox* pTreeView = new DBTreeListBox(this, @@ -781,7 +764,6 @@ DBTreeListBox* OAppDetailPageHelper::createSimpleTree( const OString& _sHelpId, return createTree( pTreeView, _rImage ); } -// ----------------------------------------------------------------------------- DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, const Image& _rImage ) { WaitObject aWaitCursor(this); @@ -808,7 +790,7 @@ DBTreeListBox* OAppDetailPageHelper::createTree( DBTreeListBox* _pTreeView, cons return _pTreeView; } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::clearPages() { showPreview(NULL); @@ -818,7 +800,7 @@ void OAppDetailPageHelper::clearPages() m_pLists[i]->Clear(); } } -// ----------------------------------------------------------------------------- + sal_Bool OAppDetailPageHelper::isFilled() const { size_t i = 0; @@ -826,7 +808,7 @@ sal_Bool OAppDetailPageHelper::isFilled() const ; return i != E_ELEMENT_TYPE_COUNT; } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::elementReplaced(ElementType _eType ,const OUString& _rOldName ,const OUString& _rNewName ) @@ -860,7 +842,7 @@ void OAppDetailPageHelper::elementReplaced(ElementType _eType } } } -// ----------------------------------------------------------------------------- + SvTreeListEntry* OAppDetailPageHelper::elementAdded(ElementType _eType,const OUString& _rName, const Any& _rObject ) { SvTreeListEntry* pRet = NULL; @@ -904,7 +886,7 @@ SvTreeListEntry* OAppDetailPageHelper::elementAdded(ElementType _eType,const OUS } return pRet; } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::elementRemoved( ElementType _eType,const OUString& _rName ) { DBTreeListBox* pTreeView = getCurrentView(); @@ -942,44 +924,44 @@ void OAppDetailPageHelper::elementRemoved( ElementType _eType,const OUString& _r showPreview(NULL); } } -// ----------------------------------------------------------------------------- + IMPL_LINK(OAppDetailPageHelper, OnEntryDoubleClick, SvTreeListBox*, _pTree) { OSL_ENSURE( _pTree, "OAppDetailPageHelper, OnEntryDoubleClick: invalid callback!" ); bool bHandled = ( _pTree != NULL ) && getBorderWin().getView()->getAppController().onEntryDoubleClick( *_pTree ); return bHandled ? 1L : 0L; } -// ----------------------------------------------------------------------------- + IMPL_LINK(OAppDetailPageHelper, OnEntrySelChange, void*, /*NOINTERESTEDIN*/) { getBorderWin().getView()->getAppController().onSelectionChanged(); return 1L; } -// ----------------------------------------------------------------------------- + IMPL_LINK( OAppDetailPageHelper, OnCutEntry, void*, /*NOINTERESTEDIN*/ ) { getBorderWin().getView()->getAppController().onCutEntry(); return 1L; } -// ----------------------------------------------------------------------------- + IMPL_LINK( OAppDetailPageHelper, OnCopyEntry, void*, /*NOINTERESTEDIN*/ ) { getBorderWin().getView()->getAppController().onCopyEntry(); return 1L; } -// ----------------------------------------------------------------------------- + IMPL_LINK( OAppDetailPageHelper, OnPasteEntry, void*, /*NOINTERESTEDIN*/ ) { getBorderWin().getView()->getAppController().onPasteEntry(); return 1L; } -// ----------------------------------------------------------------------------- + IMPL_LINK( OAppDetailPageHelper, OnDeleteEntry, void*, /*NOINTERESTEDIN*/ ) { getBorderWin().getView()->getAppController().onDeleteEntry(); return 1L; } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::Resize() { // parent window dimension @@ -1009,17 +991,17 @@ void OAppDetailPageHelper::Resize() m_pTablePreview->SetPosSizePixel(Point(0,0),m_aBorder.GetSizePixel() ); } } -// ----------------------------------------------------------------------------- + PreviewMode OAppDetailPageHelper::getPreviewMode() { return m_ePreviewMode; } -// ----------------------------------------------------------------------------- + sal_Bool OAppDetailPageHelper::isPreviewEnabled() { return m_ePreviewMode != E_PREVIEWNONE; } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::switchPreview(PreviewMode _eMode,sal_Bool _bForce) { if ( m_ePreviewMode != _eMode || _bForce ) @@ -1065,7 +1047,7 @@ void OAppDetailPageHelper::switchPreview(PreviewMode _eMode,sal_Bool _bForce) } } } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::showPreview(const Reference< XContent >& _xContent) { if ( isPreviewEnabled() ) @@ -1126,7 +1108,7 @@ void OAppDetailPageHelper::showPreview(const Reference< XContent >& _xContent) } } } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::showPreview( const OUString& _sDataSourceName, const OUString& _sName, sal_Bool _bTable) @@ -1194,7 +1176,7 @@ void OAppDetailPageHelper::showPreview( const OUString& _sDataSourceName, showPreview(NULL); } } -// ----------------------------------------------------------------------------- + IMPL_LINK(OAppDetailPageHelper, OnDropdownClickHdl, ToolBox*, /*pToolBox*/) { m_aTBPreview.EndSelection(); @@ -1242,7 +1224,6 @@ IMPL_LINK(OAppDetailPageHelper, OnDropdownClickHdl, ToolBox*, /*pToolBox*/) return 0L; } -// ----------------------------------------------------------------------------- void OAppDetailPageHelper::KeyInput( const KeyEvent& rKEvt ) { SvTreeListBox* pCurrentView = getCurrentView(); @@ -1259,7 +1240,6 @@ void OAppDetailPageHelper::KeyInput( const KeyEvent& rKEvt ) Window::KeyInput(rKEvt); } -// ----------------------------------------------------------------------------- void OAppDetailPageHelper::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); @@ -1281,7 +1261,7 @@ void OAppDetailPageHelper::DataChanged( const DataChangedEvent& rDCEvt ) } } } -// ----------------------------------------------------------------------------- + void OAppDetailPageHelper::ImplInitSettings() { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -1305,13 +1285,13 @@ void OAppDetailPageHelper::ImplInitSettings() m_aTBPreview.SetBackground( rStyleSettings.GetFieldColor() ); m_pTablePreview->SetBackground( rStyleSettings.GetFieldColor() ); } -// ----------------------------------------------------------------------------- + OPreviewWindow::OPreviewWindow(Window* _pParent) : Window(_pParent) { ImplInitSettings( sal_True, sal_True, sal_True ); } -// ----------------------------------------------------------------------------- + sal_Bool OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const { const Size aWinSize( GetOutputSizePixel() ); @@ -1345,8 +1325,6 @@ sal_Bool OPreviewWindow::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rect return bRet; } -// ------------------------------------------------------------------------ - void OPreviewWindow::Paint( const Rectangle& rRect ) { Window::Paint( rRect ); @@ -1362,7 +1340,7 @@ void OPreviewWindow::Paint( const Rectangle& rRect ) m_aGraphicObj.Draw( this, aPos, aSize ); } } -// ----------------------------------------------------------------------------- + void OPreviewWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); @@ -1374,7 +1352,7 @@ void OPreviewWindow::DataChanged( const DataChangedEvent& rDCEvt ) Invalidate(); } } -// ----------------------------------------------------------------------------- + void OPreviewWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -1395,7 +1373,5 @@ void OPreviewWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal if( bBackground ) SetBackground( rStyleSettings.GetFieldColor() ); } -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx index 92202ecadcd3..40d6426eb416 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx @@ -73,10 +73,8 @@ namespace dbaui void setGraphic(const Graphic& _rGraphic ) { m_aGraphicObj.SetGraphic(_rGraphic); } }; - //================================================================== // A helper class for the controls in the detail page. // Combines general functionality. - //================================================================== class OAppDetailPageHelper : public Window { DBTreeListBox* m_pLists[ELEMENT_COUNT]; @@ -322,7 +320,6 @@ namespace dbaui void elementRemoved(ElementType _eType ,const OUString& _rName ); - /// returns the preview mode PreviewMode getPreviewMode(); diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index 9652e33e0f09..08d657ad654d 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -62,7 +62,6 @@ using ::com::sun::star::sdb::application::NamedDatabaseObject; #define SPACEBETWEENENTRIES 4 -// ----------------------------------------------------------------------------- TaskEntry::TaskEntry( const sal_Char* _pAsciiUNOCommand, sal_uInt16 _nHelpID, sal_uInt16 _nTitleResourceID, bool _bHideWhenDisabled ) :sUNOCommand( OUString::createFromAscii( _pAsciiUNOCommand ) ) ,nHelpID( _nHelpID ) @@ -71,7 +70,6 @@ TaskEntry::TaskEntry( const sal_Char* _pAsciiUNOCommand, sal_uInt16 _nHelpID, sa { } -// ----------------------------------------------------------------------------- OCreationList::OCreationList( OTasksWindow& _rParent ) :SvTreeListBox( &_rParent, WB_TABSTOP | WB_HASBUTTONSATROOT | WB_HASBUTTONS ) ,m_rTaskWindow( _rParent ) @@ -85,7 +83,7 @@ OCreationList::OCreationList( OTasksWindow& _rParent ) SetNodeDefaultImages( ); EnableEntryMnemonics(); } -// ----------------------------------------------------------------------------- + void OCreationList::Paint( const Rectangle& _rRect ) { if ( m_pMouseDownEntry ) @@ -99,7 +97,6 @@ void OCreationList::Paint( const Rectangle& _rRect ) Control::SetFont( m_aOriginalFont ); } -// ----------------------------------------------------------------------------- void OCreationList::PreparePaint( SvTreeListEntry* _pEntry ) { Wallpaper aEntryBackground( m_aOriginalBackgroundColor ); @@ -127,7 +124,6 @@ void OCreationList::PreparePaint( SvTreeListEntry* _pEntry ) SetBackground( aEntryBackground ); } -// ----------------------------------------------------------------------------- void OCreationList::SelectSearchEntry( const void* _pEntry ) { SvTreeListEntry* pEntry = const_cast< SvTreeListEntry* >( static_cast< const SvTreeListEntry* >( _pEntry ) ); @@ -140,7 +136,6 @@ void OCreationList::SelectSearchEntry( const void* _pEntry ) GrabFocus(); } -// ----------------------------------------------------------------------------- void OCreationList::ExecuteSearchEntry( const void* _pEntry ) const { SvTreeListEntry* pEntry = const_cast< SvTreeListEntry* >( static_cast< const SvTreeListEntry* >( _pEntry ) ); @@ -151,7 +146,6 @@ void OCreationList::ExecuteSearchEntry( const void* _pEntry ) const onSelected( pEntry ); } -// ----------------------------------------------------------------------------- Rectangle OCreationList::GetFocusRect( SvTreeListEntry* _pEntry, long _nLine ) { Rectangle aRect = SvTreeListBox::GetFocusRect( _pEntry, _nLine ); @@ -171,7 +165,7 @@ Rectangle OCreationList::GetFocusRect( SvTreeListEntry* _pEntry, long _nLine ) return aRect; } -// ----------------------------------------------------------------------------- + void OCreationList::StartDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPixel*/ ) { // don't give this to the base class, it does a ReleaseMouse as very first action @@ -179,28 +173,28 @@ void OCreationList::StartDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPixel* // something with the drag-event), I hesitate to fix it in the current state, // since I don't overlook the consequences, and we're close to 2.0 ...) } -// ----------------------------------------------------------------------------- + void OCreationList::ModelHasCleared() { SvTreeListBox::ModelHasCleared(); m_pLastActiveEntry = NULL; m_pMouseDownEntry = NULL; } -// ----------------------------------------------------------------------------- + void OCreationList::GetFocus() { SvTreeListBox::GetFocus(); if ( !GetCurEntry() ) setCurrentEntryInvalidate( m_pLastActiveEntry ? m_pLastActiveEntry : GetFirstEntryInView() ); } -// ----------------------------------------------------------------------------- + void OCreationList::LoseFocus() { SvTreeListBox::LoseFocus(); m_pLastActiveEntry = GetCurEntry(); setCurrentEntryInvalidate( NULL ); } -// ----------------------------------------------------------------------------- + void OCreationList::MouseButtonDown( const MouseEvent& rMEvt ) { SvTreeListBox::MouseButtonDown( rMEvt ); @@ -213,7 +207,7 @@ void OCreationList::MouseButtonDown( const MouseEvent& rMEvt ) CaptureMouse(); } } -// ----------------------------------------------------------------------------- + void OCreationList::MouseMove( const MouseEvent& rMEvt ) { if ( rMEvt.IsLeaveWindow() ) @@ -252,7 +246,7 @@ void OCreationList::MouseMove( const MouseEvent& rMEvt ) SvTreeListBox::MouseMove(rMEvt); } -// ----------------------------------------------------------------------------- + void OCreationList::MouseButtonUp( const MouseEvent& rMEvt ) { SvTreeListEntry* pEntry = GetEntry( rMEvt.GetPosPixel() ); @@ -279,7 +273,7 @@ void OCreationList::MouseButtonUp( const MouseEvent& rMEvt ) if ( bExecute ) onSelected( pEntry ); } -// ----------------------------------------------------------------------------- + bool OCreationList::setCurrentEntryInvalidate( SvTreeListEntry* _pEntry ) { if ( GetCurEntry() != _pEntry ) @@ -297,7 +291,7 @@ bool OCreationList::setCurrentEntryInvalidate( SvTreeListEntry* _pEntry ) } return false; } -// ----------------------------------------------------------------------------- + void OCreationList::updateHelpText() { sal_uInt16 nHelpTextId = 0; @@ -305,7 +299,7 @@ void OCreationList::updateHelpText() nHelpTextId = reinterpret_cast< TaskEntry* >( GetCurEntry()->GetUserData() )->nHelpID; m_rTaskWindow.setHelpText( nHelpTextId ); } -// ----------------------------------------------------------------------------- + void OCreationList::onSelected( SvTreeListEntry* _pEntry ) const { OSL_ENSURE( _pEntry, "OCreationList::onSelected: invalid entry!" ); @@ -313,7 +307,7 @@ void OCreationList::onSelected( SvTreeListEntry* _pEntry ) const aCommand.Complete = reinterpret_cast< TaskEntry* >( _pEntry->GetUserData() )->sUNOCommand; m_rTaskWindow.getDetailView()->getBorderWin().getView()->getAppController().executeChecked( aCommand, Sequence< PropertyValue >() ); } -// ----------------------------------------------------------------------------- + void OCreationList::KeyInput( const KeyEvent& rKEvt ) { const KeyCode& rCode = rKEvt.GetKeyCode(); @@ -343,8 +337,9 @@ void OCreationList::KeyInput( const KeyEvent& rKEvt ) updateHelpText(); } } -// ----------------------------------------------------------------------------- + DBG_NAME(OTasksWindow) + OTasksWindow::OTasksWindow(Window* _pParent,OApplicationDetailView* _pDetailView) : Window(_pParent,WB_DIALOGCONTROL ) ,m_aCreation(*this) @@ -368,13 +363,13 @@ OTasksWindow::OTasksWindow(Window* _pParent,OApplicationDetailView* _pDetailView ImplInitSettings(sal_True,sal_True,sal_True); } -// ----------------------------------------------------------------------------- + OTasksWindow::~OTasksWindow() { DBG_DTOR(OTasksWindow,NULL); Clear(); } -// ----------------------------------------------------------------------- + void OTasksWindow::DataChanged( const DataChangedEvent& rDCEvt ) { DBG_CHKTHIS(OTasksWindow,NULL); @@ -387,7 +382,7 @@ void OTasksWindow::DataChanged( const DataChangedEvent& rDCEvt ) Invalidate(); } } -// ----------------------------------------------------------------------------- + void OTasksWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) { DBG_CHKTHIS(OTasksWindow,NULL); @@ -422,7 +417,7 @@ void OTasksWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_B aFont.SetWeight(WEIGHT_BOLD); m_aDescription.SetControlFont(aFont); } -// ----------------------------------------------------------------------------- + void OTasksWindow::setHelpText(sal_uInt16 _nId) { DBG_CHKTHIS(OTasksWindow,NULL); @@ -436,8 +431,9 @@ void OTasksWindow::setHelpText(sal_uInt16 _nId) { m_aHelpText.SetText(OUString()); } + } -// ----------------------------------------------------------------------------- + IMPL_LINK(OTasksWindow, OnEntrySelectHdl, SvTreeListBox*, /*_pTreeBox*/) { DBG_CHKTHIS(OTasksWindow,NULL); @@ -446,7 +442,7 @@ IMPL_LINK(OTasksWindow, OnEntrySelectHdl, SvTreeListBox*, /*_pTreeBox*/) m_aHelpText.SetText( ModuleRes( reinterpret_cast< TaskEntry* >( pEntry->GetUserData() )->nHelpID ) ); return 1L; } -// ----------------------------------------------------------------------------- + void OTasksWindow::Resize() { DBG_CHKTHIS(OTasksWindow,NULL); @@ -469,7 +465,7 @@ void OTasksWindow::Resize() m_aFL.SetPosSizePixel( Point(nHalfOutputWidth , 0), Size(aFLSize.Width(), nOutputHeight ) ); } -// ----------------------------------------------------------------------------- + void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList ) { DBG_CHKTHIS(OTasksWindow,NULL); @@ -520,7 +516,7 @@ void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList ) m_aCreation.updateHelpText(); Enable(!_rList.empty()); } -// ----------------------------------------------------------------------------- + void OTasksWindow::Clear() { DBG_CHKTHIS(OTasksWindow,NULL); @@ -533,10 +529,11 @@ void OTasksWindow::Clear() } m_aCreation.Clear(); } -//================================================================== + // class OApplicationDetailView -//================================================================== + DBG_NAME(OApplicationDetailView) + OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,PreviewMode _ePreviewMode) : OSplitterView(&_rParent,sal_False ) ,m_aHorzSplitter(this) ,m_aTasks(this,STR_TASKS,WB_BORDER | WB_DIALOGCONTROL ) @@ -570,7 +567,7 @@ OApplicationDetailView::OApplicationDetailView(OAppBorderWindow& _rParent,Previe m_aHorzSplitter.SetUniqueId(UID_APP_VIEW_HORZ_SPLIT); setSplitter(&m_aHorzSplitter); } -// ----------------------------------------------------------------------------- + OApplicationDetailView::~OApplicationDetailView() { DBG_DTOR(OApplicationDetailView,NULL); @@ -578,7 +575,7 @@ OApplicationDetailView::~OApplicationDetailView() setSplitter(NULL); m_pControlHelper = NULL; } -// ----------------------------------------------------------------------------- + void OApplicationDetailView::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) { DBG_CHKTHIS(OApplicationDetailView,NULL); @@ -604,7 +601,7 @@ void OApplicationDetailView::ImplInitSettings( sal_Bool bFont, sal_Bool bForegro m_aHorzSplitter.SetFillColor( rStyleSettings.GetDialogColor() ); m_aHorzSplitter.SetTextFillColor(rStyleSettings.GetDialogColor() ); } -// ----------------------------------------------------------------------- + void OApplicationDetailView::DataChanged( const DataChangedEvent& rDCEvt ) { DBG_CHKTHIS(OApplicationDetailView,NULL); @@ -620,20 +617,18 @@ void OApplicationDetailView::DataChanged( const DataChangedEvent& rDCEvt ) Invalidate(); } } -// ----------------------------------------------------------------------------- + void OApplicationDetailView::GetFocus() { DBG_CHKTHIS(OApplicationDetailView,NULL); OSplitterView::GetFocus(); } -// ----------------------------------------------------------------------------- void OApplicationDetailView::setTaskExternalMnemonics( MnemonicGenerator& _rMnemonics ) { m_aExternalMnemonics = _rMnemonics; } -// ----------------------------------------------------------------------------- bool OApplicationDetailView::interceptKeyInput( const KeyEvent& _rEvent ) { const KeyCode& rKeyCode = _rEvent.GetKeyCode(); @@ -644,19 +639,16 @@ bool OApplicationDetailView::interceptKeyInput( const KeyEvent& _rEvent ) return false; } -// ----------------------------------------------------------------------------- void OApplicationDetailView::createTablesPage(const Reference< XConnection >& _xConnection ) { impl_createPage( E_TABLE, _xConnection, NULL ); } -// ----------------------------------------------------------------------------- void OApplicationDetailView::createPage( ElementType _eType,const Reference< XNameAccess >& _xContainer ) { impl_createPage( _eType, NULL, _xContainer ); } -// ----------------------------------------------------------------------------- void OApplicationDetailView::impl_createPage( ElementType _eType, const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxNonTableElements ) { @@ -684,7 +676,6 @@ void OApplicationDetailView::impl_createPage( ElementType _eType, const Referenc Resize(); } -// ----------------------------------------------------------------------------- const TaskPaneData& OApplicationDetailView::impl_getTaskPaneData( ElementType _eType ) { if ( m_aTaskPaneData.empty() ) @@ -698,7 +689,6 @@ const TaskPaneData& OApplicationDetailView::impl_getTaskPaneData( ElementType _e return rData; } -// ----------------------------------------------------------------------------- void OApplicationDetailView::impl_fillTaskPaneData( ElementType _eType, TaskPaneData& _rData ) const { TaskEntryList& rList( _rData.aTasks ); @@ -765,55 +755,54 @@ void OApplicationDetailView::impl_fillTaskPaneData( ElementType _eType, TaskPane } } -// ----------------------------------------------------------------------------- OUString OApplicationDetailView::getQualifiedName( SvTreeListEntry* _pEntry ) const { DBG_CHKTHIS(OApplicationDetailView,NULL); return m_pControlHelper->getQualifiedName( _pEntry ); } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationDetailView::isLeaf(SvTreeListEntry* _pEntry) const { DBG_CHKTHIS(OApplicationDetailView,NULL); return m_pControlHelper->isLeaf(_pEntry); } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationDetailView::isALeafSelected() const { DBG_CHKTHIS(OApplicationDetailView,NULL); return m_pControlHelper->isALeafSelected(); } -// ----------------------------------------------------------------------------- + void OApplicationDetailView::selectAll() { DBG_CHKTHIS(OApplicationDetailView,NULL); m_pControlHelper->selectAll(); } -// ----------------------------------------------------------------------------- + void OApplicationDetailView::sortDown() { DBG_CHKTHIS(OApplicationDetailView,NULL); m_pControlHelper->sortDown(); } -// ----------------------------------------------------------------------------- + void OApplicationDetailView::sortUp() { DBG_CHKTHIS(OApplicationDetailView,NULL); m_pControlHelper->sortUp(); } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationDetailView::isFilled() const { DBG_CHKTHIS(OApplicationDetailView,NULL); return m_pControlHelper->isFilled(); } -// ----------------------------------------------------------------------------- + ElementType OApplicationDetailView::getElementType() const { DBG_CHKTHIS(OApplicationDetailView,NULL); return m_pControlHelper->getElementType(); } -// ----------------------------------------------------------------------------- + void OApplicationDetailView::clearPages(sal_Bool _bTaskAlso) { DBG_CHKTHIS(OApplicationDetailView,NULL); @@ -821,81 +810,85 @@ void OApplicationDetailView::clearPages(sal_Bool _bTaskAlso) getTasksWindow().Clear(); m_pControlHelper->clearPages(); } -// ----------------------------------------------------------------------------- + sal_Int32 OApplicationDetailView::getSelectionCount() { DBG_CHKTHIS(OApplicationDetailView,NULL); return m_pControlHelper->getSelectionCount(); } -// ----------------------------------------------------------------------------- + sal_Int32 OApplicationDetailView::getElementCount() { DBG_CHKTHIS(OApplicationDetailView,NULL); return m_pControlHelper->getElementCount(); } -// ----------------------------------------------------------------------------- void OApplicationDetailView::getSelectionElementNames( ::std::vector< OUString>& _rNames ) const { DBG_CHKTHIS(OApplicationDetailView,NULL); m_pControlHelper->getSelectionElementNames( _rNames ); } -// ----------------------------------------------------------------------------- + void OApplicationDetailView::describeCurrentSelectionForControl( const Control& _rControl, Sequence< NamedDatabaseObject >& _out_rSelectedObjects ) { DBG_CHKTHIS(OApplicationDetailView,NULL); m_pControlHelper->describeCurrentSelectionForControl( _rControl, _out_rSelectedObjects ); } -// ----------------------------------------------------------------------------- + void OApplicationDetailView::describeCurrentSelectionForType( const ElementType _eType, Sequence< NamedDatabaseObject >& _out_rSelectedObjects ) { DBG_CHKTHIS(OApplicationDetailView,NULL); m_pControlHelper->describeCurrentSelectionForType( _eType, _out_rSelectedObjects ); } -// ----------------------------------------------------------------------------- + void OApplicationDetailView::selectElements(const Sequence< OUString>& _aNames) { DBG_CHKTHIS(OApplicationDetailView,NULL); m_pControlHelper->selectElements( _aNames ); } -// ----------------------------------------------------------------------------- + SvTreeListEntry* OApplicationDetailView::getEntry( const Point& _aPoint ) const { DBG_CHKTHIS(OApplicationDetailView,NULL); return m_pControlHelper->getEntry(_aPoint); } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationDetailView::isCutAllowed() { DBG_CHKTHIS(OApplicationDetailView,NULL); return m_pControlHelper->isCutAllowed(); } + sal_Bool OApplicationDetailView::isCopyAllowed() { DBG_CHKTHIS(OApplicationDetailView,NULL); return m_pControlHelper->isCopyAllowed(); } + sal_Bool OApplicationDetailView::isPasteAllowed() { DBG_CHKTHIS(OApplicationDetailView,NULL);return m_pControlHelper->isPasteAllowed(); } + void OApplicationDetailView::copy() { DBG_CHKTHIS(OApplicationDetailView,NULL);m_pControlHelper->copy(); } + void OApplicationDetailView::cut() { DBG_CHKTHIS(OApplicationDetailView,NULL);m_pControlHelper->cut(); } + void OApplicationDetailView::paste() { DBG_CHKTHIS(OApplicationDetailView,NULL); m_pControlHelper->paste(); } -// ----------------------------------------------------------------------------- + SvTreeListEntry* OApplicationDetailView::elementAdded(ElementType _eType,const OUString& _rName, const Any& _rObject ) { DBG_CHKTHIS(OApplicationDetailView,NULL); return m_pControlHelper->elementAdded(_eType,_rName, _rObject ); } -// ----------------------------------------------------------------------------- + void OApplicationDetailView::elementRemoved(ElementType _eType,const OUString& _rName ) { DBG_CHKTHIS(OApplicationDetailView,NULL); m_pControlHelper->elementRemoved(_eType,_rName ); } -// ----------------------------------------------------------------------------- + void OApplicationDetailView::elementReplaced(ElementType _eType ,const OUString& _rOldName ,const OUString& _rNewName ) @@ -903,31 +896,31 @@ void OApplicationDetailView::elementReplaced(ElementType _eType DBG_CHKTHIS(OApplicationDetailView,NULL); m_pControlHelper->elementReplaced( _eType, _rOldName, _rNewName ); } -// ----------------------------------------------------------------------------- + PreviewMode OApplicationDetailView::getPreviewMode() { DBG_CHKTHIS(OApplicationDetailView,NULL); return m_pControlHelper->getPreviewMode(); } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationDetailView::isPreviewEnabled() { DBG_CHKTHIS(OApplicationDetailView,NULL); return m_pControlHelper->isPreviewEnabled(); } -// ----------------------------------------------------------------------------- + void OApplicationDetailView::switchPreview(PreviewMode _eMode) { DBG_CHKTHIS(OApplicationDetailView,NULL); m_pControlHelper->switchPreview(_eMode); } -// ----------------------------------------------------------------------------- + void OApplicationDetailView::showPreview(const Reference< XContent >& _xContent) { DBG_CHKTHIS(OApplicationDetailView,NULL); m_pControlHelper->showPreview(_xContent); } -// ----------------------------------------------------------------------------- + void OApplicationDetailView::showPreview( const OUString& _sDataSourceName, const OUString& _sName, sal_Bool _bTable) @@ -935,13 +928,13 @@ void OApplicationDetailView::showPreview( const OUString& _sDataSourceName, DBG_CHKTHIS(OApplicationDetailView,NULL); m_pControlHelper->showPreview(_sDataSourceName,_sName,_bTable); } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationDetailView::isSortUp() const { DBG_CHKTHIS(OApplicationDetailView,NULL); return m_pControlHelper->isSortUp(); } -// ----------------------------------------------------------------------------- + Window* OApplicationDetailView::getTreeWindow() const { return m_pControlHelper->getCurrentView(); diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx index 67c9b57e9f96..d8813dddecdc 100644 --- a/dbaccess/source/ui/app/AppDetailView.hxx +++ b/dbaccess/source/ui/app/AppDetailView.hxx @@ -141,7 +141,6 @@ namespace dbaui void Clear(); void setHelpText(sal_uInt16 _nId); }; - //================================================================== class OApplicationDetailView : public OSplitterView , public IClipboardTest { @@ -326,7 +325,6 @@ namespace dbaui /// <TRUE/> if the preview is enabled sal_Bool isPreviewEnabled(); - /** switches to the given preview mode @param _eMode the mode to set for the preview diff --git a/dbaccess/source/ui/app/AppIconControl.cxx b/dbaccess/source/ui/app/AppIconControl.cxx index 0dc9d966ea85..2cfccd12bcad 100644 --- a/dbaccess/source/ui/app/AppIconControl.cxx +++ b/dbaccess/source/ui/app/AppIconControl.cxx @@ -28,10 +28,8 @@ #include <memory> using namespace ::dbaui; -//================================================================== // class OApplicationIconControl DBG_NAME(OApplicationIconControl) -//================================================================== OApplicationIconControl::OApplicationIconControl(Window* _pParent) : SvtIconChoiceCtrl(_pParent,WB_ICON | WB_NOCOLUMNHEADER | WB_HIGHLIGHTFRAME | /*!WB_NOSELECTION |*/ WB_TABSTOP | WB_CLIPCHILDREN | WB_NOVSCROLL | WB_SMART_ARRANGE | WB_NOHSCROLL | WB_CENTER) @@ -63,7 +61,7 @@ OApplicationIconControl::OApplicationIconControl(Window* _pParent) SetChoiceWithCursor( sal_True ); SetSelectionMode(SINGLE_SELECTION); } -// ----------------------------------------------------------------------------- + OApplicationIconControl::~OApplicationIconControl() { sal_uLong nCount = GetEntryCount(); @@ -79,7 +77,7 @@ OApplicationIconControl::~OApplicationIconControl() DBG_DTOR(OApplicationIconControl,NULL); } -// ----------------------------------------------------------------------------- + sal_Int8 OApplicationIconControl::AcceptDrop( const AcceptDropEvent& _rEvt ) { sal_Int8 nDropOption = DND_ACTION_NONE; @@ -97,7 +95,7 @@ sal_Int8 OApplicationIconControl::AcceptDrop( const AcceptDropEvent& _rEvt ) return nDropOption; } -// ----------------------------------------------------------------------------- + sal_Int8 OApplicationIconControl::ExecuteDrop( const ExecuteDropEvent& _rEvt ) { if ( m_pActionListener ) diff --git a/dbaccess/source/ui/app/AppIconControl.hxx b/dbaccess/source/ui/app/AppIconControl.hxx index 1c057f52c37a..1ca4b4dae1d7 100644 --- a/dbaccess/source/ui/app/AppIconControl.hxx +++ b/dbaccess/source/ui/app/AppIconControl.hxx @@ -22,11 +22,9 @@ #include <svtools/ivctrl.hxx> #include <svtools/transfer.hxx> - namespace dbaui { class IControlActionListener; - //================================================================== class OApplicationIconControl :public SvtIconChoiceCtrl ,public DropTargetHelper { diff --git a/dbaccess/source/ui/app/AppSwapWindow.cxx b/dbaccess/source/ui/app/AppSwapWindow.cxx index 2eba13004c3b..97f6cc0259ba 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.cxx +++ b/dbaccess/source/ui/app/AppSwapWindow.cxx @@ -36,10 +36,8 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::container; -//================================================================== // class OApplicationSwapWindow DBG_NAME(OApplicationSwapWindow) -//================================================================== OApplicationSwapWindow::OApplicationSwapWindow( Window* _pParent, OAppBorderWindow& _rBorderWindow ) :Window(_pParent,WB_DIALOGCONTROL ) ,m_aIconControl(this) @@ -55,13 +53,13 @@ OApplicationSwapWindow::OApplicationSwapWindow( Window* _pParent, OAppBorderWind m_aIconControl.SetHelpId(HID_APP_SWAP_ICONCONTROL); m_aIconControl.Show(); } -// ----------------------------------------------------------------------------- + OApplicationSwapWindow::~OApplicationSwapWindow() { DBG_DTOR(OApplicationSwapWindow,NULL); } -// ----------------------------------------------------------------------------- + void OApplicationSwapWindow::Resize() { Size aFLSize = LogicToPixel( Size( 8, 0 ), MAP_APPFONT ); @@ -74,7 +72,7 @@ void OApplicationSwapWindow::Resize() m_aIconControl.SetPosSizePixel( Point(static_cast<long>((aOutputSize.Width() - nX)*0.5), 0) ,Size(nX,aOutputSize.Height())); m_aIconControl.ArrangeIcons(); } -// ----------------------------------------------------------------------------- + void OApplicationSwapWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -95,7 +93,7 @@ void OApplicationSwapWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForegro if( bBackground ) SetBackground( rStyleSettings.GetFieldColor() ); } -// ----------------------------------------------------------------------- + void OApplicationSwapWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); @@ -109,7 +107,7 @@ void OApplicationSwapWindow::DataChanged( const DataChangedEvent& rDCEvt ) Invalidate(); } } -// ----------------------------------------------------------------------------- + void OApplicationSwapWindow::clearSelection() { m_aIconControl.SetNoSelection(); @@ -120,13 +118,11 @@ void OApplicationSwapWindow::clearSelection() m_aIconControl.GetClickHdl().Call(&m_aIconControl); } -// ----------------------------------------------------------------------------- void OApplicationSwapWindow::createIconAutoMnemonics( MnemonicGenerator& _rMnemonics ) { m_aIconControl.CreateAutoMnemonics( _rMnemonics ); } -// ----------------------------------------------------------------------------- bool OApplicationSwapWindow::interceptKeyInput( const KeyEvent& _rEvent ) { const KeyCode& rKeyCode = _rEvent.GetKeyCode(); @@ -137,7 +133,6 @@ bool OApplicationSwapWindow::interceptKeyInput( const KeyEvent& _rEvent ) return false; } -// ----------------------------------------------------------------------------- ElementType OApplicationSwapWindow::getElementType() const { sal_uLong nPos = 0; @@ -145,7 +140,6 @@ ElementType OApplicationSwapWindow::getElementType() const return ( pEntry ) ? *static_cast<ElementType*>(pEntry->GetUserData()) : E_NONE; } -// ----------------------------------------------------------------------------- bool OApplicationSwapWindow::onContainerSelected( ElementType _eType ) { if ( m_eLastType == _eType ) @@ -162,7 +156,6 @@ bool OApplicationSwapWindow::onContainerSelected( ElementType _eType ) return false; } -// ----------------------------------------------------------------------------- IMPL_LINK(OApplicationSwapWindow, OnContainerSelectHdl, SvtIconChoiceCtrl*, _pControl) { sal_uLong nPos = 0; @@ -176,13 +169,13 @@ IMPL_LINK(OApplicationSwapWindow, OnContainerSelectHdl, SvtIconChoiceCtrl*, _pCo return 1L; } -//------------------------------------------------------------------------------ + IMPL_LINK_NOARG(OApplicationSwapWindow, ChangeToLastSelected) { selectContainer(m_eLastType); return 0L; } -// ----------------------------------------------------------------------------- + void OApplicationSwapWindow::selectContainer(ElementType _eType) { sal_uLong nCount = m_aIconControl.GetEntryCount(); diff --git a/dbaccess/source/ui/app/AppSwapWindow.hxx b/dbaccess/source/ui/app/AppSwapWindow.hxx index e0a806677309..1e8dd8849eb8 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.hxx +++ b/dbaccess/source/ui/app/AppSwapWindow.hxx @@ -27,7 +27,6 @@ namespace dbaui { class OAppBorderWindow; - //================================================================== class OApplicationSwapWindow : public Window, public IClipboardTest { @@ -47,7 +46,6 @@ namespace dbaui // window overloads virtual void Resize(); - inline sal_Bool isCutAllowed() { return sal_False; } inline sal_Bool isCopyAllowed() { return sal_False; } inline sal_Bool isPasteAllowed() { return sal_False; } @@ -75,7 +73,6 @@ namespace dbaui /// return the element of currently select entry ElementType getElementType() const; - /** clears the selection in the icon choice control and calls the handler */ void clearSelection(); @@ -89,9 +86,7 @@ namespace dbaui private: bool onContainerSelected( ElementType _eType ); }; -// ............................................................. } // namespace dbaui -// ............................................................. #endif // DBAUI_APPSWAPWINDOW_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx index a75d6e5604dc..384ed8eaf067 100644 --- a/dbaccess/source/ui/app/AppTitleWindow.cxx +++ b/dbaccess/source/ui/app/AppTitleWindow.cxx @@ -45,7 +45,7 @@ OTitleWindow::OTitleWindow(Window* _pParent,sal_uInt16 _nTitleId,WinBits _nBits, for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) pWindows[i]->Show(); } -// ----------------------------------------------------------------------------- + OTitleWindow::~OTitleWindow() { if ( m_pChild ) @@ -57,13 +57,13 @@ OTitleWindow::~OTitleWindow() DBG_DTOR(OTitleWindow,NULL); } -// ----------------------------------------------------------------------------- + void OTitleWindow::setChildWindow(Window* _pChild) { m_pChild = _pChild; } + #define SPACE_BORDER 1 -// ----------------------------------------------------------------------------- void OTitleWindow::Resize() { // parent window dimension @@ -88,7 +88,7 @@ void OTitleWindow::Resize() Size(nOutputWidth - ( m_bShift ? (2*nXOffset - 2*SPACE_BORDER) : sal_Int32(SPACE_BORDER) ), nOutputHeight - nHeight - 2*nXOffset - 2*SPACE_BORDER) ); } } -// ----------------------------------------------------------------------------- + void OTitleWindow::setTitle(sal_uInt16 _nTitleId) { if ( _nTitleId != 0 ) @@ -96,14 +96,14 @@ void OTitleWindow::setTitle(sal_uInt16 _nTitleId) m_aTitle.SetText(ModuleRes(_nTitleId)); } } -// ----------------------------------------------------------------------------- + void OTitleWindow::GetFocus() { Window::GetFocus(); if ( m_pChild ) m_pChild->GrabFocus(); } -// ----------------------------------------------------------------------------- + long OTitleWindow::GetWidthPixel() const { Size aTextSize = LogicToPixel( Size( 12, 0 ), MAP_APPFONT ); @@ -111,7 +111,7 @@ long OTitleWindow::GetWidthPixel() const return nWidth; } -// ----------------------------------------------------------------------- + void OTitleWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); @@ -126,7 +126,7 @@ void OTitleWindow::DataChanged( const DataChangedEvent& rDCEvt ) Invalidate(); } } -//----------------------------------------------------------------------------- + void OTitleWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) { AllSettings aAllSettings = GetSettings(); @@ -153,7 +153,6 @@ void OTitleWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_B if( bBackground ) SetBackground( rStyleSettings.GetFieldColor() ); - Window* pWindows [] = { &m_aSpace1, &m_aSpace2, &m_aTitle}; for (size_t i=0; i < sizeof(pWindows)/sizeof(pWindows[0]); ++i) { @@ -164,8 +163,7 @@ void OTitleWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_B pWindows[i]->SetBackground( Wallpaper( aStyle.GetShadowColor() ) ); } } -// ............................................................. + } // namespace dbaui -// ............................................................. /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/app/AppTitleWindow.hxx b/dbaccess/source/ui/app/AppTitleWindow.hxx index f4c64310a2db..7213b27f0f5a 100644 --- a/dbaccess/source/ui/app/AppTitleWindow.hxx +++ b/dbaccess/source/ui/app/AppTitleWindow.hxx @@ -60,7 +60,6 @@ namespace dbaui */ void setTitle(sal_uInt16 _nTitleId); - /** Gets the min Width in Pixel which is needed to display the whole @return @@ -68,9 +67,7 @@ namespace dbaui */ long GetWidthPixel() const; }; -// ............................................................. } // namespace dbaui -// ............................................................. #endif // DBAUI_TITLE_WINDOW_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx index 871e29cf8662..f9dac6a931ab 100644 --- a/dbaccess/source/ui/app/AppView.cxx +++ b/dbaccess/source/ui/app/AppView.cxx @@ -57,10 +57,8 @@ using namespace ::com::sun::star::frame; using namespace ::com::sun::star::container; using ::com::sun::star::sdb::application::NamedDatabaseObject; -//================================================================== // class OAppBorderWindow DBG_NAME(OAppBorderWindow) -//================================================================== OAppBorderWindow::OAppBorderWindow(OApplicationView* _pParent,PreviewMode _ePreviewMode) : Window(_pParent,WB_DIALOGCONTROL) ,m_pPanel(NULL) ,m_pDetailView(NULL) @@ -85,7 +83,7 @@ OAppBorderWindow::OAppBorderWindow(OApplicationView* _pParent,PreviewMode _ePrev ImplInitSettings(); } -// ----------------------------------------------------------------------------- + OAppBorderWindow::~OAppBorderWindow() { // destroy children @@ -108,13 +106,13 @@ OAppBorderWindow::~OAppBorderWindow() DBG_DTOR(OAppBorderWindow,NULL); } -// ----------------------------------------------------------------------------- + void OAppBorderWindow::GetFocus() { if ( m_pPanel ) m_pPanel->GrabFocus(); } -// ----------------------------------------------------------------------------- + void OAppBorderWindow::Resize() { // parent window dimension @@ -139,7 +137,7 @@ void OAppBorderWindow::Resize() if ( m_pDetailView ) m_pDetailView->SetPosSizePixel(Point(nX + aFLSize.Width(),0),Size(nOutputWidth - nX - aFLSize.Width(),nOutputHeight)); } -// ----------------------------------------------------------------------------- + void OAppBorderWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); @@ -154,7 +152,7 @@ void OAppBorderWindow::DataChanged( const DataChangedEvent& rDCEvt ) Invalidate(); } } -// ----------------------------------------------------------------------------- + void OAppBorderWindow::ImplInitSettings() { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -175,29 +173,24 @@ void OAppBorderWindow::ImplInitSettings() if( true ) SetBackground( rStyleSettings.GetDialogColor() ); } -// ----------------------------------------------------------------------------- + OApplicationView* OAppBorderWindow::getView() const { return m_pView; } -// ----------------------------------------------------------------------------- OApplicationSwapWindow* OAppBorderWindow::getPanel() const { return static_cast< OApplicationSwapWindow* >( m_pPanel->getChildWindow() ); } -// ----------------------------------------------------------------------------- OApplicationDetailView* OAppBorderWindow::getDetailView() const { return m_pDetailView; } -//================================================================== // class OApplicationView -//================================================================== DBG_NAME(OApplicationView); -//------------------------------------------------------------------------------ OApplicationView::OApplicationView( Window* pParent ,const Reference< XComponentContext >& _rxOrb ,IApplicationController& _rAppController @@ -224,7 +217,6 @@ OApplicationView::OApplicationView( Window* pParent ImplInitSettings(); } -//------------------------------------------------------------------------------ OApplicationView::~OApplicationView() { DBG_DTOR(OApplicationView,NULL); @@ -238,21 +230,19 @@ OApplicationView::~OApplicationView() m_pWin = NULL; } } -// ----------------------------------------------------------------------------- + void OApplicationView::createIconAutoMnemonics( MnemonicGenerator& _rMnemonics ) { if ( m_pWin && m_pWin->getPanel() ) m_pWin->getPanel()->createIconAutoMnemonics( _rMnemonics ); } -// ----------------------------------------------------------------------------- void OApplicationView::setTaskExternalMnemonics( MnemonicGenerator& _rMnemonics ) { if ( m_pWin && m_pWin->getDetailView() ) m_pWin->getDetailView()->setTaskExternalMnemonics( _rMnemonics ); } -// ----------------------------------------------------------------------------- void OApplicationView::DataChanged( const DataChangedEvent& rDCEvt ) { ODataView::DataChanged( rDCEvt ); @@ -267,7 +257,7 @@ void OApplicationView::DataChanged( const DataChangedEvent& rDCEvt ) Invalidate(); } } -//------------------------------------------------------------------------------ + void OApplicationView::resizeDocumentView(Rectangle& _rPlayground) { if ( m_pWin && !_rPlayground.IsEmpty() ) @@ -283,7 +273,7 @@ void OApplicationView::resizeDocumentView(Rectangle& _rPlayground) _rPlayground.SetPos( _rPlayground.BottomRight() ); _rPlayground.SetSize( Size( 0, 0 ) ); } -//------------------------------------------------------------------------------ + long OApplicationView::PreNotify( NotifyEvent& rNEvt ) { switch(rNEvt.GetType()) @@ -313,7 +303,7 @@ long OApplicationView::PreNotify( NotifyEvent& rNEvt ) return ODataView::PreNotify(rNEvt); } -// ----------------------------------------------------------------------------- + IClipboardTest* OApplicationView::getActiveChild() const { IClipboardTest* pTest = NULL; @@ -321,148 +311,148 @@ IClipboardTest* OApplicationView::getActiveChild() const pTest = getDetailView(); return pTest; } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationView::isCopyAllowed() { IClipboardTest* pTest = getActiveChild(); return pTest && pTest->isCopyAllowed(); } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationView::isCutAllowed() { IClipboardTest* pTest = getActiveChild(); return pTest && pTest->isCutAllowed(); } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationView::isPasteAllowed() { IClipboardTest* pTest = getActiveChild(); return pTest && pTest->isPasteAllowed(); } -// ----------------------------------------------------------------------------- + void OApplicationView::copy() { IClipboardTest* pTest = getActiveChild(); if ( pTest ) pTest->copy(); } -// ----------------------------------------------------------------------------- + void OApplicationView::cut() { IClipboardTest* pTest = getActiveChild(); if ( pTest ) pTest->cut(); } -// ----------------------------------------------------------------------------- + void OApplicationView::paste() { IClipboardTest* pTest = getActiveChild(); if ( pTest ) pTest->paste(); } -// ----------------------------------------------------------------------------- + OUString OApplicationView::getQualifiedName( SvTreeListEntry* _pEntry ) const { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); return getDetailView()->getQualifiedName( _pEntry ); } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationView::isLeaf(SvTreeListEntry* _pEntry) const { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); return getDetailView()->isLeaf(_pEntry); } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationView::isALeafSelected() const { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); return getDetailView()->isALeafSelected(); } -// ----------------------------------------------------------------------------- + void OApplicationView::selectAll() { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); getDetailView()->selectAll(); } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationView::isSortUp() const { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); return getDetailView()->isSortUp(); } -// ----------------------------------------------------------------------------- + void OApplicationView::sortDown() { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); getDetailView()->sortDown(); } -// ----------------------------------------------------------------------------- + void OApplicationView::sortUp() { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); getDetailView()->sortUp(); } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationView::isFilled() const { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); return getDetailView()->isFilled(); } -// ----------------------------------------------------------------------------- + ElementType OApplicationView::getElementType() const { OSL_ENSURE(m_pWin && getDetailView() && getPanel(),"Detail view is NULL! -> GPF"); return getDetailView()->HasChildPathFocus() ? getDetailView()->getElementType() : getPanel()->getElementType(); } -// ----------------------------------------------------------------------------- + sal_Int32 OApplicationView::getSelectionCount() { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); return getDetailView()->getSelectionCount(); } -// ----------------------------------------------------------------------------- + sal_Int32 OApplicationView::getElementCount() { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); return getDetailView()->getElementCount(); } -// ----------------------------------------------------------------------------- + void OApplicationView::getSelectionElementNames( ::std::vector< OUString>& _rNames ) const { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); getDetailView()->getSelectionElementNames( _rNames ); } -// ----------------------------------------------------------------------------- + void OApplicationView::describeCurrentSelectionForControl( const Control& _rControl, Sequence< NamedDatabaseObject >& _out_rSelectedObjects ) { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); getDetailView()->describeCurrentSelectionForControl( _rControl, _out_rSelectedObjects ); } -// ----------------------------------------------------------------------------- + void OApplicationView::describeCurrentSelectionForType( const ElementType _eType, Sequence< NamedDatabaseObject >& _out_rSelectedObjects ) { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); getDetailView()->describeCurrentSelectionForType( _eType, _out_rSelectedObjects ); } -// ----------------------------------------------------------------------------- + void OApplicationView::selectElements(const Sequence< OUString>& _aNames) { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); getDetailView()->selectElements( _aNames ); } -// ----------------------------------------------------------------------------- + SvTreeListEntry* OApplicationView::elementAdded(ElementType eType,const OUString& _rName, const Any& _rObject ) { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); return getDetailView()->elementAdded(eType,_rName,_rObject); } -// ----------------------------------------------------------------------------- + void OApplicationView::elementRemoved(ElementType eType,const OUString& _rName ) { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); getDetailView()->elementRemoved(eType,_rName); } -// ----------------------------------------------------------------------------- + void OApplicationView::elementReplaced(ElementType _eType ,const OUString& _rOldName ,const OUString& _rNewName ) @@ -470,45 +460,45 @@ void OApplicationView::elementReplaced(ElementType _eType OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); getDetailView()->elementReplaced(_eType, _rOldName, _rNewName ); } -// ----------------------------------------------------------------------------- + void OApplicationView::clearPages(sal_Bool _bTaskAlso) { OSL_ENSURE(m_pWin && getDetailView() && getPanel(),"Detail view is NULL! -> GPF"); getPanel()->clearSelection(); getDetailView()->clearPages(_bTaskAlso); } -// ----------------------------------------------------------------------------- + void OApplicationView::selectContainer(ElementType _eType) { OSL_ENSURE(m_pWin && getPanel(),"Detail view is NULL! -> GPF"); WaitObject aWO(this); getPanel()->selectContainer(_eType); } -// ----------------------------------------------------------------------------- + SvTreeListEntry* OApplicationView::getEntry( const Point& _aPosPixel ) const { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); return getDetailView()->getEntry(_aPosPixel); } -// ----------------------------------------------------------------------------- + PreviewMode OApplicationView::getPreviewMode() { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); return getDetailView()->getPreviewMode(); } -// ----------------------------------------------------------------------------- + sal_Bool OApplicationView::isPreviewEnabled() { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); return getDetailView()->isPreviewEnabled(); } -// ----------------------------------------------------------------------------- + void OApplicationView::switchPreview(PreviewMode _eMode) { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); getDetailView()->switchPreview(_eMode); } -// ----------------------------------------------------------------------------- + void OApplicationView::showPreview(const Reference< XContent >& _xContent) { OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF"); @@ -516,7 +506,7 @@ void OApplicationView::showPreview(const Reference< XContent >& _xContent) m_xObject = NULL; getDetailView()->showPreview(_xContent); } -// ----------------------------------------------------------------------------- + void OApplicationView::showPreview( const OUString& _sDataSourceName, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection, const OUString& _sName, @@ -554,7 +544,7 @@ void OApplicationView::showPreview( const OUString& _sDataSourceName, getDetailView()->showPreview(_sDataSourceName,_sName,_bTable); } } -// ----------------------------------------------------------------------------- + void OApplicationView::GetFocus() { if ( m_eChildFocus == NONE && m_pWin ) @@ -562,13 +552,13 @@ void OApplicationView::GetFocus() m_pWin->GrabFocus(); } } -// ----------------------------------------------------------------------------- + void OApplicationView::_disposing( const ::com::sun::star::lang::EventObject& /*_rSource*/ ) { if ( m_pWin && getDetailView() ) showPreview(NULL); } -// ----------------------------------------------------------------------------- + void OApplicationView::ImplInitSettings() { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -589,6 +579,5 @@ void OApplicationView::ImplInitSettings() if( true ) SetBackground( rStyleSettings.GetFieldColor() ); } -//----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/app/AppView.hxx b/dbaccess/source/ui/app/AppView.hxx index 7c50466b5b33..3f0da9dc6a38 100644 --- a/dbaccess/source/ui/app/AppView.hxx +++ b/dbaccess/source/ui/app/AppView.hxx @@ -42,7 +42,6 @@ namespace dbaui class OApplicationDetailView; class OApplicationSwapWindow; class OTitleWindow; - //================================================================== class OAppBorderWindow : public Window { OTitleWindow* m_pPanel; @@ -66,7 +65,6 @@ namespace dbaui OApplicationDetailView* getDetailView() const; }; - //================================================================== class OApplicationView : public ODataView ,public IClipboardTest ,public ::utl::OEventListenerAdapter @@ -90,7 +88,6 @@ namespace dbaui void ImplInitSettings(); protected: - // return the Rectangle where I can paint myself virtual void resizeDocumentView(Rectangle& rRect); @@ -255,7 +252,6 @@ namespace dbaui void elementRemoved(ElementType _eType ,const OUString& _rName ); - /** changes the container which should be displayed. The select handler will also be called. @param _eType Which container to show. diff --git a/dbaccess/source/ui/app/IApplicationController.hxx b/dbaccess/source/ui/app/IApplicationController.hxx index fbcc6583ea98..8789b7437dac 100644 --- a/dbaccess/source/ui/app/IApplicationController.hxx +++ b/dbaccess/source/ui/app/IApplicationController.hxx @@ -26,10 +26,8 @@ class SvTreeListBox; -//........................................................................ namespace dbaui { -//........................................................................ class SAL_NO_VTABLE IApplicationController :public IController ,public IControlActionListener @@ -85,9 +83,7 @@ namespace dbaui ~IApplicationController() {} }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // DBA30D_IAPPLICATIONCONTROLLER_HXX diff --git a/dbaccess/source/ui/app/subcomponentmanager.cxx b/dbaccess/source/ui/app/subcomponentmanager.cxx index 727da5ad59ab..1dcbe7cdefb0 100644 --- a/dbaccess/source/ui/app/subcomponentmanager.cxx +++ b/dbaccess/source/ui/app/subcomponentmanager.cxx @@ -38,10 +38,8 @@ #include <algorithm> #include <functional> -//...................................................................................................................... namespace dbaui { -//...................................................................................................................... using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -70,12 +68,9 @@ namespace dbaui using ::com::sun::star::beans::XPropertySet; using ::com::sun::star::beans::PropertyChangeEvent; - //================================================================================================================== - //= helper structs - //================================================================================================================== + // helper structs namespace { - //.............................................................................................................. struct SubComponentDescriptor { /// the name of the sub component, empty if it is yet unsaved @@ -164,7 +159,6 @@ namespace dbaui } }; - //.............................................................................................................. struct SelectSubComponent : public ::std::unary_function< SubComponentDescriptor, Reference< XComponent > > { Reference< XComponent > operator()( const SubComponentDescriptor &_desc ) const @@ -176,10 +170,8 @@ namespace dbaui } }; - //.............................................................................................................. typedef ::std::vector< SubComponentDescriptor > SubComponents; - //.............................................................................................................. struct SubComponentMatch : public ::std::unary_function< SubComponentDescriptor, bool > { public: @@ -204,9 +196,7 @@ namespace dbaui }; } - //================================================================================================================== - //= SubComponentManager_Data - //================================================================================================================== + // SubComponentManager_Data struct SubComponentManager_Data { SubComponentManager_Data( OApplicationController& _rController, const ::comphelper::SharedMutex& _rMutex ) @@ -222,31 +212,24 @@ namespace dbaui ::osl::Mutex& getMutex() const { return m_aMutex; } }; - //================================================================================================================== - //= SubComponentManager - //================================================================================================================== - //------------------------------------------------------------------------------------------------------------------ + // SubComponentManager SubComponentManager::SubComponentManager( OApplicationController& _rController, const ::comphelper::SharedMutex& _rMutex ) :m_pData( new SubComponentManager_Data( _rController, _rMutex ) ) { } - //------------------------------------------------------------------------------------------------------------------ SubComponentManager::~SubComponentManager() { } - //------------------------------------------------------------------------------------------------------------------ void SubComponentManager::disposing() { ::osl::MutexGuard aGuard( m_pData->getMutex() ); m_pData->m_aComponents.clear(); } - //------------------------------------------------------------------------------------------------------------------ namespace { - //.............................................................................................................. bool lcl_fallbackToAnotherController( SubComponentDescriptor& _rCompDesc ) { Reference< XController > xFallback; @@ -284,7 +267,6 @@ namespace dbaui return false; } - //.............................................................................................................. bool lcl_closeComponent( const Reference< XCommandProcessor >& _rxCommandProcessor ) { bool bSuccess = false; @@ -304,7 +286,6 @@ namespace dbaui return bSuccess; } - //.............................................................................................................. bool lcl_closeComponent( const SubComponentDescriptor& _rComponent ) { if ( _rComponent.xComponentCommandProcessor.is() ) @@ -332,7 +313,6 @@ namespace dbaui return bSuccess; } - //.............................................................................................................. void lcl_notifySubComponentEvent( const SubComponentManager_Data& _rData, const sal_Char* _pAsciiEventName, const SubComponentDescriptor& _rComponent ) { @@ -352,7 +332,6 @@ namespace dbaui } } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL SubComponentManager::propertyChange( const PropertyChangeEvent& i_rEvent ) throw (RuntimeException) { if ( i_rEvent.PropertyName != PROPERTY_NAME ) @@ -383,7 +362,6 @@ namespace dbaui } } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL SubComponentManager::disposing( const EventObject& _rSource ) throw (RuntimeException) { ::osl::ClearableMutexGuard aGuard( m_pData->getMutex() ); @@ -432,7 +410,6 @@ namespace dbaui } } - //------------------------------------------------------------------------------------------------------------------ Sequence< Reference< XComponent> > SubComponentManager::getSubComponents() const { ::osl::MutexGuard aGuard( m_pData->getMutex() ); @@ -447,7 +424,6 @@ namespace dbaui return aComponents; } - //------------------------------------------------------------------------------------------------------------------ sal_Bool SubComponentManager::closeSubComponents() { SolarMutexGuard aSolarGuard; @@ -472,14 +448,12 @@ namespace dbaui return empty(); } - //------------------------------------------------------------------------------------------------------------------ bool SubComponentManager::empty() const { ::osl::MutexGuard aGuard( m_pData->getMutex() ); return m_pData->m_aComponents.empty(); } - //------------------------------------------------------------------------------------------------------------------ void SubComponentManager::onSubComponentOpened( const OUString& _rName, const sal_Int32 _nComponentType, const ElementOpenMode _eOpenMode, const Reference< XComponent >& _rxComponent ) { @@ -515,7 +489,6 @@ namespace dbaui lcl_notifySubComponentEvent( *m_pData, "OnSubComponentOpened", aElement ); } - //------------------------------------------------------------------------------------------------------------------ bool SubComponentManager::activateSubFrame( const OUString& _rName, const sal_Int32 _nComponentType, const ElementOpenMode _eOpenMode, Reference< XComponent >& o_rComponent ) const { @@ -544,7 +517,6 @@ namespace dbaui return true; } - //------------------------------------------------------------------------------------------------------------------ bool SubComponentManager::closeSubFrames( const OUString& i_rName, const sal_Int32 _nComponentType ) { ::osl::MutexGuard aGuard( m_pData->getMutex() ); @@ -566,7 +538,6 @@ namespace dbaui return true; } - //------------------------------------------------------------------------------------------------------------------ bool SubComponentManager::lookupSubComponent( const Reference< XComponent >& i_rComponent, OUString& o_rName, sal_Int32& o_rComponentType ) { @@ -594,8 +565,6 @@ namespace dbaui return false; } -//...................................................................................................................... } // namespace dbaui -//...................................................................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/app/subcomponentmanager.hxx b/dbaccess/source/ui/app/subcomponentmanager.hxx index 15a3def5f7ac..f7c3df9a77b4 100644 --- a/dbaccess/source/ui/app/subcomponentmanager.hxx +++ b/dbaccess/source/ui/app/subcomponentmanager.hxx @@ -30,17 +30,13 @@ #include <memory> -//........................................................................ namespace dbaui { -//........................................................................ struct SubComponentManager_Data; class OApplicationController; - //==================================================================== - //= SubComponentManager - //==================================================================== + // SubComponentManager typedef ::cppu::WeakImplHelper1 < ::com::sun::star::beans::XPropertyChangeListener > SubComponentManager_Base; class SubComponentManager : public SubComponentManager_Base @@ -120,9 +116,7 @@ namespace dbaui ::std::auto_ptr< SubComponentManager_Data > m_pData; }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // DBACCESS_SUBCOMPONENTMANAGER_HXX diff --git a/dbaccess/source/ui/browser/AsyncronousLink.cxx b/dbaccess/source/ui/browser/AsyncronousLink.cxx index a2c89691458f..68b554eda569 100644 --- a/dbaccess/source/ui/browser/AsyncronousLink.cxx +++ b/dbaccess/source/ui/browser/AsyncronousLink.cxx @@ -21,12 +21,9 @@ #include <vcl/svapp.hxx> #include <tools/debug.hxx> -//================================================================== -//= OAsyncronousLink -//================================================================== +// OAsyncronousLink using namespace dbaui; DBG_NAME(OAsyncronousLink) -//------------------------------------------------------------------ OAsyncronousLink::OAsyncronousLink( const Link& _rHandler ) :m_aHandler(_rHandler) ,m_aEventSafety() @@ -36,7 +33,6 @@ OAsyncronousLink::OAsyncronousLink( const Link& _rHandler ) DBG_CTOR(OAsyncronousLink,NULL); } -//------------------------------------------------------------------ OAsyncronousLink::~OAsyncronousLink() { { @@ -56,8 +52,6 @@ OAsyncronousLink::~OAsyncronousLink() DBG_DTOR(OAsyncronousLink,NULL); } - -//------------------------------------------------------------------ void OAsyncronousLink::Call( void* _pArgument ) { ::osl::MutexGuard aEventGuard( m_aEventSafety ); @@ -66,7 +60,6 @@ void OAsyncronousLink::Call( void* _pArgument ) m_nEventId = Application::PostUserEvent( LINK( this, OAsyncronousLink, OnAsyncCall ), _pArgument ); } -//------------------------------------------------------------------ void OAsyncronousLink::CancelCall() { ::osl::MutexGuard aEventGuard( m_aEventSafety ); @@ -75,7 +68,6 @@ void OAsyncronousLink::CancelCall() m_nEventId = 0; } -//------------------------------------------------------------------ IMPL_LINK(OAsyncronousLink, OnAsyncCall, void*, _pArg) { { diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 74112417c478..249d0d1ae14d 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -122,14 +122,10 @@ using namespace ::svt; #define DO_SAFE( action, message ) try { action; } catch(Exception&) { SAL_WARN("dbaccess.ui",message); } ; -//.................................................................. namespace dbaui { -//.................................................................. -//================================================================== // OParameterContinuation -//================================================================== class OParameterContinuation : public OInteraction< XInteractionSupplyParameters > { Sequence< PropertyValue > m_aValues; @@ -143,14 +139,11 @@ public: virtual void SAL_CALL setParameters( const Sequence< PropertyValue >& _rValues ) throw(RuntimeException); }; -//------------------------------------------------------------------ void SAL_CALL OParameterContinuation::setParameters( const Sequence< PropertyValue >& _rValues ) throw(RuntimeException) { m_aValues = _rValues; } - -//============================================================================== // a helper class implementing a runtime::XFormController, will be aggregated by SbaXDataBrowserController // (we can't derive from XFormController as it's base class is XTabController and the XTabController::getModel collides // with the XController::getModel implemented in our base class SbaXDataBrowserController) @@ -247,9 +240,7 @@ protected: ~FormControllerImpl(); }; - DBG_NAME(FormControllerImpl) -//------------------------------------------------------------------ SbaXDataBrowserController::FormControllerImpl::FormControllerImpl(SbaXDataBrowserController* _pOwner) :m_aActivateListeners(_pOwner->getMutex()) ,m_pOwner(_pOwner) @@ -259,221 +250,186 @@ SbaXDataBrowserController::FormControllerImpl::FormControllerImpl(SbaXDataBrowse OSL_ENSURE(m_pOwner, "SbaXDataBrowserController::FormControllerImpl::FormControllerImpl : invalid Owner !"); } -//------------------------------------------------------------------ SbaXDataBrowserController::FormControllerImpl::~FormControllerImpl() { DBG_DTOR(FormControllerImpl,NULL); } -//------------------------------------------------------------------ Reference< runtime::XFormOperations > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getFormOperations() throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::getFormOperations: not supported!" ); return NULL; } -//------------------------------------------------------------------ Reference< ::com::sun::star::awt::XControl > SbaXDataBrowserController::FormControllerImpl::getCurrentControl(void) throw( RuntimeException ) { return m_pOwner->getBrowserView() ? m_pOwner->getBrowserView()->getGridControl() : Reference< ::com::sun::star::awt::XControl > (); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addActivateListener(const Reference< ::com::sun::star::form::XFormControllerListener > & l) throw( RuntimeException ) { m_aActivateListeners.addInterface(l); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeActivateListener(const Reference< ::com::sun::star::form::XFormControllerListener > & l) throw( RuntimeException ) { m_aActivateListeners.removeInterface(l); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addChildController( const Reference< runtime::XFormController >& /*_ChildController*/ ) throw( RuntimeException, IllegalArgumentException ) { // not supported throw IllegalArgumentException( OUString(), *this, 1 ); } -//------------------------------------------------------------------ Reference< runtime::XFormControllerContext > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getContext() throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::getContext: no support!!" ); return NULL; } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setContext( const Reference< runtime::XFormControllerContext >& /*_context*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::setContext: no support!!" ); } -//------------------------------------------------------------------ Reference< XInteractionHandler > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getInteractionHandler() throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::getInteractionHandler: no support!!" ); return NULL; } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setInteractionHandler( const Reference< XInteractionHandler >& /*_interactionHandler*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::setInteractionHandler: no support!!" ); } -//------------------------------------------------------------------ Reference< XInterface > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getParent( ) throw (RuntimeException) { // don't have any parent form controllers return NULL; } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setParent( const Reference< XInterface >& /*Parent*/ ) throw (NoSupportException, RuntimeException) { throw NoSupportException( OUString(), *this ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::dispose( ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::dispose: no, you do *not* want to do this!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addEventListener( const Reference< XEventListener >& /*xListener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::addEventListener: no support!!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeEventListener( const Reference< XEventListener >& /*aListener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::removeEventListener: no support!!" ); } -//------------------------------------------------------------------ ::sal_Int32 SAL_CALL SbaXDataBrowserController::FormControllerImpl::getCount( ) throw (RuntimeException) { // no sub controllers, never return 0; } -//------------------------------------------------------------------ Any SAL_CALL SbaXDataBrowserController::FormControllerImpl::getByIndex( ::sal_Int32 /*Index*/ ) throw (IndexOutOfBoundsException, WrappedTargetException, RuntimeException) { // no sub controllers, never throw IndexOutOfBoundsException( OUString(), *this ); } -//------------------------------------------------------------------ Type SAL_CALL SbaXDataBrowserController::FormControllerImpl::getElementType( ) throw (RuntimeException) { return ::cppu::UnoType< runtime::XFormController >::get(); } -//------------------------------------------------------------------ ::sal_Bool SAL_CALL SbaXDataBrowserController::FormControllerImpl::hasElements( ) throw (RuntimeException) { // no sub controllers, never return false; } -//------------------------------------------------------------------ Reference< XEnumeration > SAL_CALL SbaXDataBrowserController::FormControllerImpl::createEnumeration( ) throw (RuntimeException) { return new ::comphelper::OEnumerationByIndex( this ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addModifyListener( const Reference< XModifyListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::addModifyListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeModifyListener( const Reference< XModifyListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::removeModifyListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addConfirmDeleteListener( const Reference< XConfirmDeleteListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::addConfirmDeleteListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeConfirmDeleteListener( const Reference< XConfirmDeleteListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::removeConfirmDeleteListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addSQLErrorListener( const Reference< XSQLErrorListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::addSQLErrorListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeSQLErrorListener( const Reference< XSQLErrorListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::removeSQLErrorListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addRowSetApproveListener( const Reference< XRowSetApproveListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::addRowSetApproveListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeRowSetApproveListener( const Reference< XRowSetApproveListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::removeRowSetApproveListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addDatabaseParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::addDatabaseParameterListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeDatabaseParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::removeDatabaseParameterListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::addParameterListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::removeParameterListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setMode( const OUString& _rMode ) throw (NoSupportException, RuntimeException) { if ( !supportsMode( _rMode ) ) throw NoSupportException(); } -//------------------------------------------------------------------ OUString SAL_CALL SbaXDataBrowserController::FormControllerImpl::getMode( ) throw (RuntimeException) { return OUString( "DataMode" ); } -//------------------------------------------------------------------ Sequence< OUString > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getSupportedModes( ) throw (RuntimeException) { Sequence< OUString > aModes(1); @@ -481,31 +437,26 @@ Sequence< OUString > SAL_CALL SbaXDataBrowserController::FormControllerImpl::get return aModes; } -//------------------------------------------------------------------ ::sal_Bool SAL_CALL SbaXDataBrowserController::FormControllerImpl::supportsMode( const OUString& aMode ) throw (RuntimeException) { return aMode.compareToAscii( "DataMode" ) == 0; } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setModel(const Reference< ::com::sun::star::awt::XTabControllerModel > & /*Model*/) throw( RuntimeException ) { SAL_WARN("dbaccess.ui","SbaXDataBrowserController::FormControllerImpl::setModel : invalid call, can't change my model !"); } -//------------------------------------------------------------------ Reference< ::com::sun::star::awt::XTabControllerModel > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getModel(void) throw( RuntimeException ) { return Reference< XTabControllerModel >(m_pOwner->getRowSet(), UNO_QUERY); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setContainer(const Reference< ::com::sun::star::awt::XControlContainer > & /*_Container*/) throw( RuntimeException ) { SAL_WARN("dbaccess.ui","SbaXDataBrowserController::FormControllerImpl::setContainer : invalid call, can't change my container !"); } -//------------------------------------------------------------------ Reference< ::com::sun::star::awt::XControlContainer > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getContainer(void) throw( RuntimeException ) { if (m_pOwner->getBrowserView()) @@ -513,7 +464,6 @@ Reference< ::com::sun::star::awt::XControlContainer > SAL_CALL SbaXDataBrowserC return Reference< ::com::sun::star::awt::XControlContainer > (); } -//------------------------------------------------------------------ Sequence< Reference< ::com::sun::star::awt::XControl > > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getControls(void) throw( RuntimeException ) { if (m_pOwner->getBrowserView()) @@ -524,48 +474,39 @@ Sequence< Reference< ::com::sun::star::awt::XControl > > SAL_CALL SbaXDataBrowse return Sequence< Reference< ::com::sun::star::awt::XControl > >(); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::autoTabOrder(void) throw( RuntimeException ) { SAL_WARN("dbaccess.ui","SbaXDataBrowserController::FormControllerImpl::autoTabOrder : nothing to do (always have only one control) !"); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::activateTabOrder(void) throw( RuntimeException ) { SAL_WARN("dbaccess.ui","SbaXDataBrowserController::FormControllerImpl::activateTabOrder : nothing to do (always have only one control) !"); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::activateFirst(void) throw( RuntimeException ) { if (m_pOwner->getBrowserView()) m_pOwner->getBrowserView()->getVclControl()->ActivateCell(); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::activateLast(void) throw( RuntimeException ) { if (m_pOwner->getBrowserView()) m_pOwner->getBrowserView()->getVclControl()->ActivateCell(); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::frameAction(const ::com::sun::star::frame::FrameActionEvent& /*aEvent*/) throw( RuntimeException ) { } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::disposing(const ::com::sun::star::lang::EventObject& /*Source*/) throw( RuntimeException ) { // nothing to do // we don't add ourself as listener to any broadcasters, so we are not resposible for removing us } -//================================================================== -//= SbaXDataBrowserController -//================================================================== -//------------------------------------------------------------------ +// SbaXDataBrowserController Sequence< Type > SAL_CALL SbaXDataBrowserController::getTypes( ) throw (RuntimeException) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::getTypes" ); @@ -575,7 +516,6 @@ Sequence< Type > SAL_CALL SbaXDataBrowserController::getTypes( ) throw (Runtime ); } -//------------------------------------------------------------------ Sequence< sal_Int8 > SAL_CALL SbaXDataBrowserController::getImplementationId( ) throw (RuntimeException) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::getImplementationId" ); @@ -592,7 +532,6 @@ Sequence< sal_Int8 > SAL_CALL SbaXDataBrowserController::getImplementationId( ) return pId->getImplementationId(); } -//------------------------------------------------------------------ Any SAL_CALL SbaXDataBrowserController::queryInterface(const Type& _rType) throw (RuntimeException) { // check for our additional interfaces @@ -607,7 +546,6 @@ Any SAL_CALL SbaXDataBrowserController::queryInterface(const Type& _rType) throw } DBG_NAME(SbaXDataBrowserController) -//------------------------------------------------------------------------------ SbaXDataBrowserController::SbaXDataBrowserController(const Reference< ::com::sun::star::uno::XComponentContext >& _rM) :SbaXDataBrowserController_Base(_rM) ,m_nRowSetPrivileges(0) @@ -638,7 +576,6 @@ SbaXDataBrowserController::SbaXDataBrowserController(const Reference< ::com::sun m_aInvalidateClipboard.SetTimeout(300); } -//------------------------------------------------------------------------------ SbaXDataBrowserController::~SbaXDataBrowserController() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::~SbaXDataBrowserController" ); @@ -653,7 +590,6 @@ SbaXDataBrowserController::~SbaXDataBrowserController() DBG_DTOR(SbaXDataBrowserController,NULL); } -// ----------------------------------------------------------------------- void SbaXDataBrowserController::startFrameListening( const Reference< XFrame >& _rxFrame ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::startFrameListening" ); @@ -667,7 +603,6 @@ void SbaXDataBrowserController::startFrameListening( const Reference< XFrame >& _rxFrame->addFrameActionListener( xAggListener ); } -// ----------------------------------------------------------------------- void SbaXDataBrowserController::stopFrameListening( const Reference< XFrame >& _rxFrame ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::stopFrameListening" ); @@ -681,7 +616,6 @@ void SbaXDataBrowserController::stopFrameListening( const Reference< XFrame >& _ _rxFrame->removeFrameActionListener( xAggListener ); } -// ----------------------------------------------------------------------------- void SbaXDataBrowserController::onStartLoading( const Reference< XLoadable >& _rxLoadable ) { m_bLoadCanceled = sal_False; @@ -692,7 +626,6 @@ void SbaXDataBrowserController::onStartLoading( const Reference< XLoadable >& _r xWarnings->clearWarnings(); } -// ----------------------------------------------------------------------------- void SbaXDataBrowserController::impl_checkForCannotSelectUnfiltered( const SQLExceptionInfo& _rError ) { ::connectivity::SQLError aError( getORB() ); @@ -704,7 +637,6 @@ void SbaXDataBrowserController::impl_checkForCannotSelectUnfiltered( const SQLEx } } -// ----------------------------------------------------------------------------- sal_Bool SbaXDataBrowserController::reloadForm( const Reference< XLoadable >& _rxLoadable ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::reloadForm" ); @@ -765,11 +697,9 @@ sal_Bool SbaXDataBrowserController::reloadForm( const Reference< XLoadable >& _r return _rxLoadable->isLoaded(); } -// ----------------------------------------------------------------------------- void SbaXDataBrowserController::initFormatter() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::initFormatter" ); - // --------------------------------------------------------------- // create a formatter working with the connections format supplier Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier(::dbtools::getNumberFormats(::dbtools::getConnection(m_xRowSet), sal_True, getORB())); @@ -783,7 +713,7 @@ void SbaXDataBrowserController::initFormatter() else // clear the formatter m_xFormatter = NULL; } -// ----------------------------------------------------------------------------- + void SbaXDataBrowserController::describeSupportedFeatures() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::describeSupportedFeatures" ); @@ -807,11 +737,10 @@ void SbaXDataBrowserController::describeSupportedFeatures() implDescribeSupportedFeature( ".uno:FormSlots/deleteRecord", SID_FM_DELETEROWS, CommandGroup::EDIT ); implDescribeSupportedFeature( ".uno:FormSlots/insertRecord", ID_BROWSER_INSERT_ROW, CommandGroup::INSERT ); } -//------------------------------------------------------------------------------ + sal_Bool SbaXDataBrowserController::Construct(Window* pParent) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::Construct" ); - // --------------------------------------------- // create/initialize the form and the grid model m_xRowSet = CreateForm(); if (!m_xRowSet.is()) @@ -830,7 +759,6 @@ sal_Bool SbaXDataBrowserController::Construct(Window* pParent) // set the formatter if available initFormatter(); - // --------------------------------------------------------------- // we want to have a grid with a "flat" border Reference< XPropertySet > xGridSet(m_xGridModel, UNO_QUERY); @@ -845,7 +773,6 @@ sal_Bool SbaXDataBrowserController::Construct(Window* pParent) xNameCont->insertByName(OUString(sText), makeAny(m_xGridModel)); } - // --------------- // create the view setView( * new UnoDataBrowserView( pParent, *this, getORB() ) ); if (!getBrowserView()) @@ -890,7 +817,6 @@ sal_Bool SbaXDataBrowserController::Construct(Window* pParent) OSL_ENSURE(pVclGrid, "SbaXDataBrowserController::Construct : have no VCL control !"); pVclGrid->SetMasterListener(this); - // -------------------------- // add listeners ... // ... to the form model @@ -920,31 +846,28 @@ sal_Bool SbaXDataBrowserController::Construct(Window* pParent) addModelListeners(getControlModel()); addControlListeners(getBrowserView()->getGridControl()); - // ------------- // load the form return LoadForm(); } -//------------------------------------------------------------------------------ sal_Bool SbaXDataBrowserController::LoadForm() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::LoadForm" ); reloadForm( m_xLoadable ); return sal_True; } -//------------------------------------------------------------------------------ + void SbaXDataBrowserController::AddColumnListener(const Reference< XPropertySet > & /*xCol*/) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::AddColumnListener" ); // we're not interested in any column properties ... } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::RemoveColumnListener(const Reference< XPropertySet > & /*xCol*/) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::RemoveColumnListener" ); } -//------------------------------------------------------------------------------ + Reference< XRowSet > SbaXDataBrowserController::CreateForm() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::CreateForm" ); @@ -953,7 +876,6 @@ Reference< XRowSet > SbaXDataBrowserController::CreateForm() UNO_QUERY); } -//------------------------------------------------------------------------------ Reference< ::com::sun::star::form::XFormComponent > SbaXDataBrowserController::CreateGridModel() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::CreateGridModel" ); @@ -962,7 +884,6 @@ Reference< ::com::sun::star::form::XFormComponent > SbaXDataBrowserController:: UNO_QUERY); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::addModelListeners(const Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::addModelListeners" ); @@ -979,7 +900,6 @@ void SbaXDataBrowserController::addModelListeners(const Reference< ::com::sun::s xReset->addResetListener((::com::sun::star::form::XResetListener*)this); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::removeModelListeners(const Reference< XControlModel > & _xGridControlModel) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::removeModelListeners" ); @@ -1004,7 +924,6 @@ void SbaXDataBrowserController::removeModelListeners(const Reference< XControlMo xReset->removeResetListener( this ); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::addControlListeners(const Reference< ::com::sun::star::awt::XControl > & _xGridControl) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::addControlListeners" ); @@ -1024,7 +943,6 @@ void SbaXDataBrowserController::addControlListeners(const Reference< ::com::sun: xWindow->addFocusListener(this); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::removeControlListeners(const Reference< ::com::sun::star::awt::XControl > & _xGridControl) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::removeControlListeners" ); @@ -1041,7 +959,6 @@ void SbaXDataBrowserController::removeControlListeners(const Reference< ::com::s xWindow->removeFocusListener(this); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::focusGained(const FocusEvent& /*e*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::focusGained" ); @@ -1052,7 +969,6 @@ void SAL_CALL SbaXDataBrowserController::focusGained(const FocusEvent& /*e*/) th static_cast<XFormControllerListener*>(aIter.next())->formActivated(aEvt); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::focusLost(const FocusEvent& e) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::focusLost" ); @@ -1087,21 +1003,18 @@ void SAL_CALL SbaXDataBrowserController::focusLost(const FocusEvent& e) throw( R SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::focusLost : why is my control not commitable ?"); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::disposingGridControl(const ::com::sun::star::lang::EventObject& /*Source*/) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::disposingGridControl" ); removeControlListeners(getBrowserView()->getGridControl()); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::disposingGridModel(const ::com::sun::star::lang::EventObject& /*Source*/) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::disposingGridModel" ); removeModelListeners(getControlModel()); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::disposingFormModel(const ::com::sun::star::lang::EventObject& Source) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::disposingFormModel" ); @@ -1130,14 +1043,12 @@ void SbaXDataBrowserController::disposingFormModel(const ::com::sun::star::lang: xFormParameter->removeParameterListener((::com::sun::star::form::XDatabaseParameterListener*)this); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::disposingColumnModel(const ::com::sun::star::lang::EventObject& Source) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::disposingColumnModel" ); RemoveColumnListener(Reference< XPropertySet > (Source.Source, UNO_QUERY)); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::disposing(const EventObject& Source) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::disposing" ); @@ -1178,7 +1089,6 @@ void SbaXDataBrowserController::disposing(const EventObject& Source) throw( Runt SbaXDataBrowserController_Base::OGenericUnoController::disposing( Source ); } -// ----------------------------------------------------------------------- void SAL_CALL SbaXDataBrowserController::setIdentifier( const OUString& _Identifier ) throw (RuntimeException) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::setIdentifier" ); @@ -1186,7 +1096,6 @@ void SAL_CALL SbaXDataBrowserController::setIdentifier( const OUString& _Identif m_sModuleIdentifier = _Identifier; } -// ----------------------------------------------------------------------- OUString SAL_CALL SbaXDataBrowserController::getIdentifier( ) throw (RuntimeException) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::getIdentifier" ); @@ -1194,7 +1103,6 @@ OUString SAL_CALL SbaXDataBrowserController::getIdentifier( ) throw (RuntimeExc return m_sModuleIdentifier; } -// ----------------------------------------------------------------------- void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) throw ( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::propertyChange" ); @@ -1222,7 +1130,6 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t InvalidateAll(); } - if (evt.PropertyName.equals(PROPERTY_FILTER)) { InvalidateFeature(ID_BROWSER_REMOVEFILTER); @@ -1247,14 +1154,12 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t } } -//------------------------------------------------------------------------ void SbaXDataBrowserController::modified(const ::com::sun::star::lang::EventObject& /*aEvent*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::modified" ); setCurrentModified( sal_True ); } -// ----------------------------------------------------------------------- void SbaXDataBrowserController::elementInserted(const ::com::sun::star::container::ContainerEvent& evt) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::elementInserted" ); @@ -1265,7 +1170,6 @@ void SbaXDataBrowserController::elementInserted(const ::com::sun::star::containe AddColumnListener(xNewColumn); } -// ----------------------------------------------------------------------- void SbaXDataBrowserController::elementRemoved(const ::com::sun::star::container::ContainerEvent& evt) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::elementRemoved" ); @@ -1276,7 +1180,6 @@ void SbaXDataBrowserController::elementRemoved(const ::com::sun::star::container RemoveColumnListener(xOldColumn); } -// ----------------------------------------------------------------------- void SbaXDataBrowserController::elementReplaced(const ::com::sun::star::container::ContainerEvent& evt) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::elementReplaced" ); @@ -1291,7 +1194,6 @@ void SbaXDataBrowserController::elementReplaced(const ::com::sun::star::containe AddColumnListener(xNewColumn); } -// ----------------------------------------------------------------------- sal_Bool SbaXDataBrowserController::suspend(sal_Bool /*bSuspend*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::suspend" ); @@ -1303,7 +1205,7 @@ sal_Bool SbaXDataBrowserController::suspend(sal_Bool /*bSuspend*/) throw( Runtim sal_Bool bSuccess = SaveModified(); return bSuccess; } -// ----------------------------------------------------------------------- + void SbaXDataBrowserController::disposing() { // the base class @@ -1370,7 +1272,7 @@ void SbaXDataBrowserController::disposing() m_xParser.clear(); // don't dispose, just reset - it's owned by the RowSet } -//------------------------------------------------------------------------------ + void SbaXDataBrowserController::frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::frameAction" ); @@ -1408,7 +1310,6 @@ void SbaXDataBrowserController::frameAction(const ::com::sun::star::frame::Frame } } -//------------------------------------------------------------------------------ IMPL_LINK( SbaXDataBrowserController, OnAsyncDisplayError, void*, /* _pNotInterestedIn */ ) { if ( m_aCurrentError.isValid() ) @@ -1419,7 +1320,6 @@ IMPL_LINK( SbaXDataBrowserController, OnAsyncDisplayError, void*, /* _pNotIntere return 0L; } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::errorOccured(const ::com::sun::star::sdb::SQLErrorEvent& aEvent) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::errorOccurred" ); @@ -1441,7 +1341,6 @@ void SbaXDataBrowserController::errorOccured(const ::com::sun::star::sdb::SQLErr } } -//------------------------------------------------------------------------------ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::form::DatabaseParameterEvent& aEvent) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::approveParameter" ); @@ -1518,15 +1417,12 @@ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::for return sal_True; } - -//------------------------------------------------------------------------------ sal_Bool SbaXDataBrowserController::approveReset(const ::com::sun::star::lang::EventObject& /*rEvent*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::approveReset" ); return sal_True; } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::resetted(const ::com::sun::star::lang::EventObject& rEvent) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::resetted" ); @@ -1535,7 +1431,6 @@ void SbaXDataBrowserController::resetted(const ::com::sun::star::lang::EventObje setCurrentModified( sal_False ); } -//------------------------------------------------------------------------------ sal_Bool SbaXDataBrowserController::confirmDelete(const ::com::sun::star::sdb::RowChangeEvent& /*aEvent*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::confirmDelete" ); @@ -1544,7 +1439,7 @@ sal_Bool SbaXDataBrowserController::confirmDelete(const ::com::sun::star::sdb::R return sal_True; } -//------------------------------------------------------------------------------ + FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::GetState" ); @@ -1771,7 +1666,6 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const return aReturn; } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::applyParserOrder(const OUString& _rOldOrder,const Reference< XSingleSelectQueryComposer >& _xParser) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::applyParserOrder" ); @@ -1813,7 +1707,6 @@ void SbaXDataBrowserController::applyParserOrder(const OUString& _rOldOrder,cons setCurrentColumnPosition(nPos); } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::applyParserFilter(const OUString& _rOldFilter, sal_Bool _bOldFilterApplied,const ::OUString& _sOldHaving,const Reference< XSingleSelectQueryComposer >& _xParser) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::applyParserFilter" ); @@ -1862,7 +1755,6 @@ void SbaXDataBrowserController::applyParserFilter(const OUString& _rOldFilter, s setCurrentColumnPosition(nPos); } -//------------------------------------------------------------------------------ Reference< XSingleSelectQueryComposer > SbaXDataBrowserController::createParser_nothrow() { Reference< XSingleSelectQueryComposer > xComposer; @@ -1906,7 +1798,7 @@ Reference< XSingleSelectQueryComposer > SbaXDataBrowserController::createParser_ } return xComposer; } -//------------------------------------------------------------------------------ + void SbaXDataBrowserController::ExecuteFilterSortCrit(sal_Bool bFilter) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::ExecuteFilterSortCrit" ); @@ -1970,7 +1862,6 @@ void SbaXDataBrowserController::ExecuteFilterSortCrit(sal_Bool bFilter) ::comphelper::disposeComponent(xParser); } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::ExecuteSearch() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::ExecuteSearch" ); @@ -2029,7 +1920,6 @@ void SbaXDataBrowserController::ExecuteSearch() xModelSet->setPropertyValue("CursorColor", Any()); } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< PropertyValue >& _rArgs) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::Execute" ); @@ -2330,7 +2220,6 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property } } -//------------------------------------------------------------------------------ sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::SaveModified" ); @@ -2381,7 +2270,6 @@ sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor) return bResult; } -//------------------------------------------------------------------------------ sal_Bool SbaXDataBrowserController::CommitCurrent() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::CommitCurrent" ); @@ -2403,7 +2291,6 @@ sal_Bool SbaXDataBrowserController::CommitCurrent() return sal_True; } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::setCurrentModified( sal_Bool _bSet ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::setCurrentModified" ); @@ -2412,14 +2299,12 @@ void SbaXDataBrowserController::setCurrentModified( sal_Bool _bSet ) InvalidateFeature( ID_BROWSER_UNDORECORD ); } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::RowChanged() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::RowChanged" ); setCurrentModified( sal_False ); } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::ColumnChanged() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::ColumnChanged" ); @@ -2433,14 +2318,12 @@ void SbaXDataBrowserController::ColumnChanged() setCurrentModified( sal_False ); } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::SelectionChanged() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::SelectionChanged" ); // not interested in } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::CellActivated() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::CellActivated" ); @@ -2448,7 +2331,6 @@ void SbaXDataBrowserController::CellActivated() OnInvalidateClipboard( NULL ); } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::CellDeactivated() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::CellDeactivated" ); @@ -2456,14 +2338,12 @@ void SbaXDataBrowserController::CellDeactivated() OnInvalidateClipboard( NULL ); } -//------------------------------------------------------------------------------ IMPL_LINK_NOARG(SbaXDataBrowserController, OnClipboardChanged) { SolarMutexGuard aGuard; return OnInvalidateClipboard( NULL ); } -//------------------------------------------------------------------------------ IMPL_LINK(SbaXDataBrowserController, OnInvalidateClipboard, AutoTimer*, _pTimer) { InvalidateFeature(ID_BROWSER_CUT); @@ -2480,7 +2360,6 @@ IMPL_LINK(SbaXDataBrowserController, OnInvalidateClipboard, AutoTimer*, _pTimer) return 0L; } -// ------------------------------------------------------------------------- Reference< XPropertySet > SbaXDataBrowserController::getBoundField(sal_uInt16 nViewPos) const { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::SaveData" ); @@ -2508,7 +2387,6 @@ Reference< XPropertySet > SbaXDataBrowserController::getBoundField(sal_uInt16 n return xEmptyReturn; } -//------------------------------------------------------------------------------ IMPL_LINK(SbaXDataBrowserController, OnSearchContextRequest, FmSearchContext*, pContext) { Reference< ::com::sun::star::container::XIndexAccess > xPeerContainer(getBrowserView()->getGridControl(), UNO_QUERY); @@ -2555,7 +2433,6 @@ IMPL_LINK(SbaXDataBrowserController, OnSearchContextRequest, FmSearchContext*, p return pContext->arrFields.size(); } -//------------------------------------------------------------------------------ IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation*, pInfo) { Reference< ::com::sun::star::sdbcx::XRowLocate > xCursor(getRowSet(), UNO_QUERY); @@ -2593,7 +2470,6 @@ IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation*, pIn return 0; } -//------------------------------------------------------------------------------ IMPL_LINK(SbaXDataBrowserController, OnCanceledNotFound, FmFoundRecordInformation*, pInfo) { Reference< ::com::sun::star::sdbcx::XRowLocate > xCursor(getRowSet(), UNO_QUERY); @@ -2626,7 +2502,6 @@ IMPL_LINK(SbaXDataBrowserController, OnCanceledNotFound, FmFoundRecordInformatio return 0L; } -//------------------------------------------------------------------------------ IMPL_LINK_NOARG(SbaXDataBrowserController, OnAsyncGetCellFocus) { SbaGridControl* pVclGrid = getBrowserView() ? getBrowserView()->getVclControl() : NULL; @@ -2643,7 +2518,6 @@ IMPL_LINK_NOARG(SbaXDataBrowserController, OnAsyncGetCellFocus) return 0L; } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::criticalFail() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::criticalFail" ); @@ -2651,7 +2525,6 @@ void SbaXDataBrowserController::criticalFail() m_nRowSetPrivileges = 0; } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::LoadFinished(sal_Bool /*bWasSynch*/) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::LoadFinished" ); @@ -2670,26 +2543,22 @@ void SbaXDataBrowserController::LoadFinished(sal_Bool /*bWasSynch*/) DBG_UNHANDLED_EXCEPTION(); } - // -------------------------------- // switch the control to alive mode getBrowserView()->getGridControl()->setDesignMode(sal_False); - // ------------------------------- initializeParser(); - // ------------------------------- InvalidateAll(); m_aAsyncGetCellFocus.Call(); } } -// ----------------------------------------------------------------------------- + void SbaXDataBrowserController::initializeParser() const { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::initializeParser" ); if ( !m_xParser.is() ) { - // ---------------------------------------------- // create a parser (needed for filtering/sorting) try { @@ -2708,7 +2577,7 @@ void SbaXDataBrowserController::initializeParser() const } } } -//------------------------------------------------------------------------------ + void SbaXDataBrowserController::loaded(const EventObject& /*aEvent*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::loaded" ); @@ -2716,14 +2585,12 @@ void SbaXDataBrowserController::loaded(const EventObject& /*aEvent*/) throw( Run // we're loading within an separate thread and have a handling for it's "finished event" } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::unloading(const EventObject& /*aEvent*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::unloading" ); // not interested in } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::unloaded(const EventObject& /*aEvent*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::unloaded" ); @@ -2736,14 +2603,12 @@ void SbaXDataBrowserController::unloaded(const EventObject& /*aEvent*/) throw( R // bound-field-dependent slots .... } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::reloading(const EventObject& /*aEvent*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::reloading" ); // not interested in } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::reloaded(const EventObject& /*aEvent*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::reloaded" ); @@ -2754,7 +2619,7 @@ void SbaXDataBrowserController::reloaded(const EventObject& /*aEvent*/) throw( R // the one we're interested in) we give them time to do what they want to before invalidating our // bound-field-dependent slots .... } -//------------------------------------------------------------------------------ + void SbaXDataBrowserController::enterFormAction() { if ( !m_nFormActionNestingLevel ) @@ -2764,7 +2629,6 @@ void SbaXDataBrowserController::enterFormAction() ++m_nFormActionNestingLevel; } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::leaveFormAction() { OSL_ENSURE( m_nFormActionNestingLevel > 0, "SbaXDataBrowserController::leaveFormAction : invalid call !" ); @@ -2777,14 +2641,12 @@ void SbaXDataBrowserController::leaveFormAction() m_aAsyncDisplayError.Call(); } -// ------------------------------------------------------------------------- sal_Bool SbaXDataBrowserController::isLoaded() const { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::isLoaded" ); return m_xLoadable.is() && m_xLoadable->isLoaded(); } -// ------------------------------------------------------------------------- sal_Bool SbaXDataBrowserController::isValidCursor() const { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::isValidCursor" ); @@ -2807,7 +2669,6 @@ sal_Bool SbaXDataBrowserController::isValidCursor() const return bIsValid; } -// ----------------------------------------------------------------------------- sal_Int16 SbaXDataBrowserController::getCurrentColumnPosition() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::getCurrentColumnPosition" ); @@ -2821,7 +2682,7 @@ sal_Int16 SbaXDataBrowserController::getCurrentColumnPosition() catch(Exception&) {} return nViewPos; } -// ----------------------------------------------------------------------------- + void SbaXDataBrowserController::setCurrentColumnPosition( sal_Int16 _nPos ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::setCurrentColumnPosition" ); @@ -2833,7 +2694,7 @@ void SbaXDataBrowserController::setCurrentColumnPosition( sal_Int16 _nPos ) } catch(Exception&) {} } -// ----------------------------------------------------------------------------- + void SbaXDataBrowserController::BeforeDrop() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::BeforeDrop" ); @@ -2841,7 +2702,7 @@ void SbaXDataBrowserController::BeforeDrop() if (xFormError.is()) xFormError->removeSQLErrorListener((::com::sun::star::sdb::XSQLErrorListener*)this); } -// ----------------------------------------------------------------------------- + void SbaXDataBrowserController::AfterDrop() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::AfterDrop" ); @@ -2849,7 +2710,7 @@ void SbaXDataBrowserController::AfterDrop() if (xFormError.is()) xFormError->addSQLErrorListener((::com::sun::star::sdb::XSQLErrorListener*)this); } -// ----------------------------------------------------------------------------- + void SbaXDataBrowserController::addColumnListeners(const Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::addColumnListeners" ); @@ -2865,14 +2726,13 @@ void SbaXDataBrowserController::addColumnListeners(const Reference< ::com::sun:: } } } -// ----------------------------------------------------------------------------- + sal_Bool SbaXDataBrowserController::InitializeGridModel(const Reference< ::com::sun::star::form::XFormComponent > & /*xGrid*/) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::InitializeGridModel" ); return sal_True; } -//.................................................................. + } // namespace dbaui -//.................................................................. /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx index fa47c37ba7e5..488142c4f2ef 100644 --- a/dbaccess/source/ui/browser/brwview.cxx +++ b/dbaccess/source/ui/browser/brwview.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "brwctrlr.hxx" #include "brwview.hxx" #include "sbagrid.hxx" @@ -32,7 +31,6 @@ #include "UITools.hxx" #include <osl/diagnose.h> - using namespace dbaui; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdb; @@ -41,7 +39,6 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; - namespace { sal_Bool isGrabVclControlFocusAllowed(const UnoDataBrowserView* _pView) @@ -64,12 +61,10 @@ namespace return bGrabFocus; } } -//================================================================== -//= UnoDataBrowserView -//================================================================== + +// UnoDataBrowserView DBG_NAME(UnoDataBrowserView) -// ------------------------------------------------------------------------- UnoDataBrowserView::UnoDataBrowserView( Window* pParent, IController& _rController, const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext) @@ -82,7 +77,7 @@ UnoDataBrowserView::UnoDataBrowserView( Window* pParent, DBG_CTOR(UnoDataBrowserView,NULL); } -// ------------------------------------------------------------------------- + void UnoDataBrowserView::Construct(const Reference< ::com::sun::star::awt::XControlModel >& xModel) { try @@ -120,7 +115,7 @@ void UnoDataBrowserView::Construct(const Reference< ::com::sun::star::awt::XCont throw; } } -// ------------------------------------------------------------------------- + UnoDataBrowserView::~UnoDataBrowserView() { { @@ -145,7 +140,7 @@ UnoDataBrowserView::~UnoDataBrowserView() DBG_DTOR(UnoDataBrowserView,NULL); } -// ----------------------------------------------------------------------------- + IMPL_LINK( UnoDataBrowserView, SplitHdl, void*, /*NOINTERESTEDIN*/ ) { long nYPos = m_pSplitter->GetPosPixel().Y(); @@ -154,14 +149,14 @@ IMPL_LINK( UnoDataBrowserView, SplitHdl, void*, /*NOINTERESTEDIN*/ ) return 0L; } -// ------------------------------------------------------------------------- + void UnoDataBrowserView::setSplitter(Splitter* _pSplitter) { m_pSplitter = _pSplitter; m_pSplitter->SetSplitHdl( LINK( this, UnoDataBrowserView, SplitHdl ) ); LINK( this, UnoDataBrowserView, SplitHdl ).Call(m_pSplitter); } -// ------------------------------------------------------------------------- + void UnoDataBrowserView::setTreeView(DBTreeView* _pTreeView) { if (m_pTreeView != _pTreeView) @@ -174,7 +169,7 @@ void UnoDataBrowserView::setTreeView(DBTreeView* _pTreeView) m_pTreeView = _pTreeView; } } -// ------------------------------------------------------------------------- + void UnoDataBrowserView::showStatus( const OUString& _rStatus ) { if (_rStatus.isEmpty()) @@ -190,7 +185,6 @@ void UnoDataBrowserView::showStatus( const OUString& _rStatus ) } } -// ------------------------------------------------------------------------- void UnoDataBrowserView::hideStatus() { if (!m_pStatus || !m_pStatus->IsVisible()) @@ -201,7 +195,6 @@ void UnoDataBrowserView::hideStatus() Update(); } -// ------------------------------------------------------------------------- void UnoDataBrowserView::resizeDocumentView(Rectangle& _rPlayground) { Point aSplitPos; @@ -258,13 +251,11 @@ void UnoDataBrowserView::resizeDocumentView(Rectangle& _rPlayground) _rPlayground.SetSize( Size( 0, 0 ) ); } -//------------------------------------------------------------------ sal_uInt16 UnoDataBrowserView::View2ModelPos(sal_uInt16 nPos) const { return m_pVclControl ? m_pVclControl->GetModelColumnPos(m_pVclControl->GetColumnIdFromViewPos(nPos)) : -1; } -// ----------------------------------------------------------------------------- SbaGridControl* UnoDataBrowserView::getVclControl() const { if ( !m_pVclControl ) @@ -287,7 +278,7 @@ SbaGridControl* UnoDataBrowserView::getVclControl() const } return m_pVclControl; } -// ----------------------------------------------------------------------------- + void UnoDataBrowserView::GetFocus() { ODataView::GetFocus(); @@ -306,13 +297,13 @@ void UnoDataBrowserView::GetFocus() m_pTreeView->GrabFocus(); } } -// ----------------------------------------------------------------------------- + void UnoDataBrowserView::_disposing( const ::com::sun::star::lang::EventObject& /*_rSource*/ ) { stopComponentListening(Reference<XComponent>(VCLUnoHelper::GetInterface(m_pVclControl),UNO_QUERY)); m_pVclControl = NULL; } -// ------------------------------------------------------------------------- + long UnoDataBrowserView::PreNotify( NotifyEvent& rNEvt ) { long nDone = 0L; @@ -340,7 +331,6 @@ long UnoDataBrowserView::PreNotify( NotifyEvent& rNEvt ) } DBG_NAME(BrowserViewStatusDisplay) -// ----------------------------------------------------------------------------- BrowserViewStatusDisplay::BrowserViewStatusDisplay( UnoDataBrowserView* _pView, const OUString& _rStatus ) :m_pView(_pView) { @@ -350,7 +340,6 @@ BrowserViewStatusDisplay::BrowserViewStatusDisplay( UnoDataBrowserView* _pView, m_pView->showStatus(_rStatus); } -// ----------------------------------------------------------------------------- BrowserViewStatusDisplay::~BrowserViewStatusDisplay( ) { if (m_pView) @@ -358,6 +347,5 @@ BrowserViewStatusDisplay::~BrowserViewStatusDisplay( ) DBG_DTOR(BrowserViewStatusDisplay,NULL); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx index 90ee541463b0..45340ecb014e 100644 --- a/dbaccess/source/ui/browser/dataview.cxx +++ b/dbaccess/source/ui/browser/dataview.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <dbaccess/dataview.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <comphelper/types.hxx> @@ -30,19 +29,15 @@ #include <svtools/imgdef.hxx> #include <tools/diagnose_ex.h> -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::util; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::frame; - //===================================================================== - //= ColorChanger - //===================================================================== + // ColorChanger class ColorChanger { protected: @@ -64,7 +59,6 @@ namespace dbaui }; DBG_NAME(ODataView) - // ------------------------------------------------------------------------- ODataView::ODataView( Window* pParent, IController& _rController, const Reference< XComponentContext >& _rxContext, @@ -80,12 +74,10 @@ namespace dbaui m_aSeparator.Show(); } - // ------------------------------------------------------------------------- void ODataView::Construct() { } - // ------------------------------------------------------------------------- ODataView::~ODataView() { DBG_DTOR(ODataView,NULL); @@ -93,15 +85,12 @@ namespace dbaui m_rController.release(); } - // ------------------------------------------------------------------------- void ODataView::resizeDocumentView( Rectangle& /*_rPlayground*/ ) { } - // ------------------------------------------------------------------------- void ODataView::Paint( const Rectangle& _rRect ) { - //................................................................. // draw the background { ColorChanger aColors( this, COL_TRANSPARENT, GetSettings().GetStyleSettings().GetFaceColor() ); @@ -112,7 +101,6 @@ namespace dbaui Window::Paint( _rRect ); } - // ------------------------------------------------------------------------- void ODataView::resizeAll( const Rectangle& _rPlayground ) { Rectangle aPlayground( _rPlayground ); @@ -126,13 +114,11 @@ namespace dbaui resizeDocumentView( aPlayground ); } - // ------------------------------------------------------------------------- void ODataView::Resize() { Window::Resize(); resizeAll( Rectangle( Point( 0, 0), GetSizePixel() ) ); } - // ----------------------------------------------------------------------------- long ODataView::PreNotify( NotifyEvent& _rNEvt ) { bool bHandled = false; @@ -155,7 +141,6 @@ namespace dbaui } return bHandled ? 1L : Window::PreNotify( _rNEvt ); } - // ----------------------------------------------------------------------------- void ODataView::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); @@ -187,7 +172,6 @@ namespace dbaui } } } - // ----------------------------------------------------------------------------- void ODataView::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); @@ -202,14 +186,12 @@ namespace dbaui m_rController.notifyHiContrastChanged(); } } - // ----------------------------------------------------------------------------- void ODataView::attachFrame(const Reference< XFrame >& _xFrame) { m_pAccel->init(m_xContext, _xFrame); } -//......................................................................... } + // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/dbexchange.cxx b/dbaccess/source/ui/browser/dbexchange.cxx index 16f966ba3225..32c05ce9608f 100644 --- a/dbaccess/source/ui/browser/dbexchange.cxx +++ b/dbaccess/source/ui/browser/dbexchange.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbexchange.hxx" #include <sot/formats.hxx> #include <sot/storage.hxx> @@ -31,7 +30,6 @@ #include "UITools.hxx" #include <comphelper/processfactory.hxx> - namespace dbaui { using namespace ::com::sun::star::uno; @@ -59,7 +57,6 @@ namespace dbaui } } - // ----------------------------------------------------------------------------- ODataClipboard::ODataClipboard( const OUString& _rDatasource, const sal_Int32 _nCommandType, @@ -80,7 +77,6 @@ namespace dbaui osl_atomic_decrement( &m_refCount ); } - // ----------------------------------------------------------------------------- ODataClipboard::ODataClipboard( const OUString& _rDatasource, const sal_Int32 _nCommandType, @@ -95,7 +91,6 @@ namespace dbaui m_pRtf.set( new ORTFImportExport( getDescriptor(),_rxORB, _rxFormatter ) ); } - // ----------------------------------------------------------------------------- ODataClipboard::ODataClipboard( const Reference< XPropertySet >& i_rAliveForm, const Sequence< Any >& i_rSelectedRows, const sal_Bool i_bBookmarkSelection, @@ -139,7 +134,6 @@ namespace dbaui osl_atomic_decrement( &m_refCount ); } - // ----------------------------------------------------------------------------- sal_Bool ODataClipboard::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& /*rFlavor*/ ) { if (nUserObjectId == SOT_FORMAT_RTF || nUserObjectId == SOT_FORMATSTR_ID_HTML ) @@ -154,7 +148,6 @@ namespace dbaui return sal_False; } - // ----------------------------------------------------------------------------- void ODataClipboard::AddSupportedFormats() { if ( m_pRtf.is() ) @@ -166,7 +159,6 @@ namespace dbaui ODataAccessObjectTransferable::AddSupportedFormats(); } - // ----------------------------------------------------------------------------- sal_Bool ODataClipboard::GetData( const DataFlavor& rFlavor ) { const sal_uLong nFormat = SotExchange::GetFormat(rFlavor); @@ -186,7 +178,6 @@ namespace dbaui return ODataAccessObjectTransferable::GetData( rFlavor ); } - // ----------------------------------------------------------------------------- void ODataClipboard::ObjectReleased() { if ( m_pHtml.is() ) @@ -216,7 +207,6 @@ namespace dbaui ODataAccessObjectTransferable::ObjectReleased( ); } - // ----------------------------------------------------------------------------- void SAL_CALL ODataClipboard::disposing( const ::com::sun::star::lang::EventObject& i_rSource ) throw (::com::sun::star::uno::RuntimeException) { ODataAccessDescriptor& rDescriptor( getDescriptor() ); @@ -250,5 +240,4 @@ namespace dbaui } } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx index 23845e080f71..4983681d79fb 100644 --- a/dbaccess/source/ui/browser/dbloader.cxx +++ b/dbaccess/source/ui/browser/dbloader.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbu_reghelper.hxx" #include "dbustrings.hrc" #include "UITools.hxx" @@ -92,6 +91,7 @@ public: const Reference< XLoadEventListener > & _rListener) throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL cancel(void) throw(); }; + DBG_NAME(DBContentLoader) DBContentLoader::DBContentLoader(const Reference< XComponentContext >& _rxContext) @@ -100,31 +100,28 @@ DBContentLoader::DBContentLoader(const Reference< XComponentContext >& _rxContex DBG_CTOR(DBContentLoader,NULL); } -// ------------------------------------------------------------------------- DBContentLoader::~DBContentLoader() { DBG_DTOR(DBContentLoader,NULL); } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + extern "C" void SAL_CALL createRegistryInfo_DBContentLoader() { static ::dbaui::OMultiInstanceAutoRegistration< DBContentLoader > aAutoRegistration; } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL DBContentLoader::Create( const Reference< XMultiServiceFactory > & rSMgr ) { return *(new DBContentLoader(comphelper::getComponentContext(rSMgr))); } -// ------------------------------------------------------------------------- + // XServiceInfo OUString SAL_CALL DBContentLoader::getImplementationName() throw( ) { return getImplementationName_Static(); } -// ------------------------------------------------------------------------- // XServiceInfo sal_Bool SAL_CALL DBContentLoader::supportsService(const OUString& ServiceName) throw( ) @@ -137,13 +134,13 @@ sal_Bool SAL_CALL DBContentLoader::supportsService(const OUString& ServiceName) return sal_True; return sal_False; } -// ------------------------------------------------------------------------- + // XServiceInfo Sequence< OUString > SAL_CALL DBContentLoader::getSupportedServiceNames(void) throw( ) { return getSupportedServiceNames_Static(); } -// ------------------------------------------------------------------------- + // ORegistryServiceManager_Static Sequence< OUString > DBContentLoader::getSupportedServiceNames_Static(void) throw( ) { @@ -152,7 +149,7 @@ Sequence< OUString > DBContentLoader::getSupportedServiceNames_Static(void) thro aSNS.getArray()[1] = OUString("com.sun.star.sdb.ContentLoader"); return aSNS; } -// ------------------------------------------------------------------------- + extern "C" void SAL_CALL writeDBLoaderInfo(void* pRegistryKey) { Reference< XRegistryKey> xKey(reinterpret_cast< XRegistryKey*>(pRegistryKey)); @@ -171,7 +168,6 @@ extern "C" void SAL_CALL writeDBLoaderInfo(void* pRegistryKey) xNewKey->setAsciiValue( OUString(".component:DB*") ); } -// ----------------------------------------------------------------------- void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OUString& rURL, const Sequence< PropertyValue >& rArgs, const Reference< XLoadEventListener > & rListener) throw(::com::sun::star::uno::RuntimeException) @@ -335,7 +331,6 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU rListener->loadCancelled( this ); } -// ----------------------------------------------------------------------- void DBContentLoader::cancel(void) throw() { } diff --git a/dbaccess/source/ui/browser/dbtreemodel.cxx b/dbaccess/source/ui/browser/dbtreemodel.cxx index 617af275375e..a321c068f62d 100644 --- a/dbaccess/source/ui/browser/dbtreemodel.cxx +++ b/dbaccess/source/ui/browser/dbtreemodel.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbtreemodel.hxx" #include "dbu_resource.hrc" #include <osl/diagnose.h> @@ -25,13 +24,11 @@ namespace dbaui { DBG_NAME(DBTreeListUserData) - //------------------------------------------------------------------------ DBTreeListUserData::DBTreeListUserData() :eType(SbaTableQueryBrowser::etQuery) { DBG_CTOR(DBTreeListUserData,NULL); } - //------------------------------------------------------------------------ DBTreeListUserData::~DBTreeListUserData() { DBG_DTOR(DBTreeListUserData,NULL); diff --git a/dbaccess/source/ui/browser/dbtreeview.cxx b/dbaccess/source/ui/browser/dbtreeview.cxx index 895fd3db50c9..0914360af0a8 100644 --- a/dbaccess/source/ui/browser/dbtreeview.cxx +++ b/dbaccess/source/ui/browser/dbtreeview.cxx @@ -17,25 +17,20 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbtreeview.hxx" #include <svtools/treelistbox.hxx> #include "dbtreelistbox.hxx" #include "dbtreemodel.hxx" #include "dbaccess_helpid.hrc" -// ......................................................................... namespace dbaui { -// ......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; DBG_NAME(DBTreeView) -//======================================================================== // class DBTreeView -//======================================================================== DBTreeView::DBTreeView( Window* pParent, WinBits nBits) : Window( pParent, nBits ) , m_pTreeListBox(NULL) @@ -50,8 +45,6 @@ DBTreeView::DBTreeView( Window* pParent, WinBits nBits) m_pTreeListBox->Show(); } -// ----------------------------------------------------------------------------- - DBTreeView::~DBTreeView() { DBG_DTOR(DBTreeView,NULL); @@ -67,24 +60,22 @@ DBTreeView::~DBTreeView() } } -// ----------------------------------------------------------------------------- void DBTreeView::SetPreExpandHandler(const Link& _rHdl) { m_pTreeListBox->SetPreExpandHandler(_rHdl); } -// ----------------------------------------------------------------------------- void DBTreeView::setCopyHandler(const Link& _rHdl) { m_pTreeListBox->setCopyHandler(_rHdl); } -// ----------------------------------------------------------------------------- + void DBTreeView::Resize() { Window::Resize(); m_pTreeListBox->SetPosSizePixel(Point(0,0),GetOutputSizePixel()); } -// ------------------------------------------------------------------------- + void DBTreeView::setModel(SvTreeList* _pTreeModel) { if (_pTreeModel) @@ -92,12 +83,11 @@ void DBTreeView::setModel(SvTreeList* _pTreeModel) m_pTreeListBox->SetModel(_pTreeModel); } -// ------------------------------------------------------------------------- void DBTreeView::setSelChangeHdl( const Link& _rHdl ) { m_pTreeListBox->SetSelChangeHdl( _rHdl ); } -// ----------------------------------------------------------------------------- + void DBTreeView::GetFocus() { Window::GetFocus(); @@ -105,10 +95,6 @@ void DBTreeView::GetFocus() m_pTreeListBox->GrabFocus(); } - -// ......................................................................... } // namespace dbaui -// ......................................................................... - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/dbtreeview.hxx b/dbaccess/source/ui/browser/dbtreeview.hxx index 3232f6f16013..3e4649e178fd 100644 --- a/dbaccess/source/ui/browser/dbtreeview.hxx +++ b/dbaccess/source/ui/browser/dbtreeview.hxx @@ -26,9 +26,7 @@ class SvTreeList; namespace dbaui { class DBTreeListBox; - // ------------------ // - DBTreeView - - // ------------------ class DBTreeView : public Window { @@ -52,7 +50,6 @@ namespace dbaui void setCopyHandler(const Link& _rHdl); - void setModel(SvTreeList* _pTreeModel); void setSelChangeHdl(const Link& _rHdl); diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx index b7014655590e..6fe80d83f8c6 100644 --- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx +++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "unodatbr.hxx" #include "browserids.hxx" #include "listviewitems.hxx" @@ -33,11 +32,8 @@ using namespace ::com::sun::star::frame; using namespace ::dbtools; using namespace ::svx; -// ......................................................................... namespace dbaui { -// ......................................................................... -// ----------------------------------------------------------------------------- SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getChildType( SvTreeListEntry* _pEntry ) const { OSL_ENSURE(isContainer(_pEntry), "SbaTableQueryBrowser::getChildType: invalid entry!"); @@ -53,13 +49,11 @@ SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getChildType( SvTreeListEn return etUnknown; } -// ----------------------------------------------------------------------------- OUString SbaTableQueryBrowser::GetEntryText( SvTreeListEntry* _pEntry ) const { return m_pTreeView->getListBox().GetEntryText(_pEntry); } -// ----------------------------------------------------------------------------- SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType( const SvTreeListEntry* _pEntry ) const { if (!_pEntry) @@ -105,7 +99,7 @@ SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType( const SvTree return etQueryContainer; } -//------------------------------------------------------------------------------ + void SbaTableQueryBrowser::select(SvTreeListEntry* _pEntry, sal_Bool _bSelect) { SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL; @@ -119,7 +113,6 @@ void SbaTableQueryBrowser::select(SvTreeListEntry* _pEntry, sal_Bool _bSelect) } } -//------------------------------------------------------------------------------ void SbaTableQueryBrowser::selectPath(SvTreeListEntry* _pEntry, sal_Bool _bSelect) { while (_pEntry) @@ -128,7 +121,7 @@ void SbaTableQueryBrowser::selectPath(SvTreeListEntry* _pEntry, sal_Bool _bSelec _pEntry = m_pTreeModel->GetParent(_pEntry); } } -//------------------------------------------------------------------------------ + sal_Bool SbaTableQueryBrowser::isSelected(SvTreeListEntry* _pEntry) const { SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL; @@ -139,7 +132,7 @@ sal_Bool SbaTableQueryBrowser::isSelected(SvTreeListEntry* _pEntry) const } return sal_False; } -//------------------------------------------------------------------------------ + void SbaTableQueryBrowser::SelectionChanged() { if ( !m_bShowMenu ) @@ -151,7 +144,7 @@ void SbaTableQueryBrowser::SelectionChanged() InvalidateFeature(ID_BROWSER_COPY); InvalidateFeature(ID_BROWSER_CUT); } -//------------------------------------------------------------------------------ + void SbaTableQueryBrowser::describeSupportedFeatures() { SbaXDataBrowserController::describeSupportedFeatures(); @@ -176,7 +169,6 @@ void SbaTableQueryBrowser::describeSupportedFeatures() implDescribeSupportedFeature( ".uno:DBRebuildData", ID_BROWSER_REFRESH_REBUILD, CommandGroup::DATA ); } -// ----------------------------------------------------------------------------- sal_Int32 SbaTableQueryBrowser::getDatabaseObjectType( EntryType _eType ) { switch ( _eType ) @@ -194,7 +186,6 @@ sal_Int32 SbaTableQueryBrowser::getDatabaseObjectType( EntryType _eType ) return DatabaseObject::TABLE; } -// ----------------------------------------------------------------------------- void SbaTableQueryBrowser::notifyHiContrastChanged() { if ( m_pTreeView ) @@ -251,9 +242,7 @@ void SbaTableQueryBrowser::notifyHiContrastChanged() } } } -// ----------------------------------------------------------------------------- -// ......................................................................... + } // namespace dbaui -// ......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx index 9f3f2985aa81..e4d02c99bd6a 100644 --- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx +++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbexchange.hxx" #include "dbtreelistbox.hxx" #include "dbtreemodel.hxx" @@ -41,10 +40,8 @@ #include "svtools/treelistentry.hxx" #include <functional> -// ......................................................................... namespace dbaui { -// ......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdb; @@ -63,7 +60,6 @@ namespace dbaui using namespace ::dbtools; using namespace ::svx; - // ----------------------------------------------------------------------------- TransferableHelper* SbaTableQueryBrowser::implCopyObject( SvTreeListEntry* _pApplyTo, sal_Int32 _nCommandType, sal_Bool _bAllowConnection ) { try @@ -95,7 +91,6 @@ namespace dbaui } return NULL; } - // ----------------------------------------------------------------------------- sal_Int8 SbaTableQueryBrowser::queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) { // check if we're a table or query container @@ -119,7 +114,6 @@ namespace dbaui return DND_ACTION_NONE; } - // ----------------------------------------------------------------------------- sal_Int8 SbaTableQueryBrowser::executeDrop( const ExecuteDropEvent& _rEvt ) { SvTreeListEntry* pHitEntry = m_pTreeView->getListBox().GetEntry( _rEvt.maPosPixel ); @@ -133,12 +127,10 @@ namespace dbaui // a TransferableDataHelper for accessing the dropped data TransferableDataHelper aDroppedData(_rEvt.maDropEvent.Transferable); - // reset the data of the previous async drop (if any) if ( m_nAsyncDrop ) Application::RemoveUserEvent(m_nAsyncDrop); - m_nAsyncDrop = 0; m_aAsyncDrop.aDroppedData.clear(); m_aAsyncDrop.nType = E_TABLE; @@ -148,7 +140,6 @@ namespace dbaui m_aAsyncDrop.pDroppedAt = NULL; m_aAsyncDrop.aUrl = OUString(); - // loop through the available formats and see what we can do ... // first we have to check if it is our own format, if not we have to copy the stream :-( if ( ODataAccessObjectTransferable::canExtractObjectDescriptor(aDroppedData.GetDataFlavorExVector()) ) @@ -179,7 +170,6 @@ namespace dbaui return DND_ACTION_NONE; } - // ----------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::requestDrag( sal_Int8 /*_nAction*/, const Point& _rPosPixel ) { // get the affected list entry @@ -202,7 +192,6 @@ namespace dbaui return NULL != pTransfer; } - // ----------------------------------------------------------------------------- IMPL_LINK(SbaTableQueryBrowser, OnCopyEntry, void*, /*NOTINTERESIN*/) { SvTreeListEntry* pSelected = m_pTreeView->getListBox().FirstSelected(); @@ -210,13 +199,11 @@ namespace dbaui copyEntry( pSelected ); return 0; } - // ----------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::isEntryCopyAllowed(SvTreeListEntry* _pEntry) const { EntryType eType = getEntryType(_pEntry); return ( eType == etTableOrView || eType == etQuery ); } - // ----------------------------------------------------------------------------- void SbaTableQueryBrowser::copyEntry(SvTreeListEntry* _pEntry) { TransferableHelper* pTransfer = NULL; @@ -227,7 +214,6 @@ namespace dbaui if (pTransfer) pTransfer->CopyToClipboard(getView()); } - // ----------------------------------------------------------------------------- IMPL_LINK( SbaTableQueryBrowser, OnAsyncDrop, void*, /*NOTINTERESTEDIN*/ ) { m_nAsyncDrop = 0; @@ -248,7 +234,6 @@ namespace dbaui return 0L; } - // ----------------------------------------------------------------------------- void SbaTableQueryBrowser::clearTreeModel() { if (m_pTreeModel) @@ -279,8 +264,6 @@ namespace dbaui } m_pCurrentlyDisplayed = NULL; } -// ......................................................................... } // namespace dbaui -// ......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx index b45555b18fb7..42c6fccebeb8 100644 --- a/dbaccess/source/ui/browser/exsrcbrw.cxx +++ b/dbaccess/source/ui/browser/exsrcbrw.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "exsrcbrw.hxx" #include <com/sun/star/form/FormComponentType.hpp> #include <com/sun/star/util/XURLTransformer.hpp> @@ -42,14 +41,12 @@ using namespace ::com::sun::star::form; using namespace ::com::sun::star::frame; using namespace dbaui; -//============================================================================== -//= SbaExternalSourceBrowser -//============================================================================== +// SbaExternalSourceBrowser extern "C" void SAL_CALL createRegistryInfo_OFormGridView() { static OMultiInstanceAutoRegistration< SbaExternalSourceBrowser > aAutoRegistration; } -//------------------------------------------------------------------------------ + Any SAL_CALL SbaExternalSourceBrowser::queryInterface(const Type& _rType) throw (RuntimeException) { Any aRet = SbaXDataBrowserController::queryInterface(_rType); @@ -60,8 +57,8 @@ Any SAL_CALL SbaExternalSourceBrowser::queryInterface(const Type& _rType) throw return aRet; } + DBG_NAME(SbaExternalSourceBrowser) -//------------------------------------------------------------------------------ SbaExternalSourceBrowser::SbaExternalSourceBrowser(const Reference< ::com::sun::star::uno::XComponentContext >& _rM) :SbaXDataBrowserController(_rM) ,m_aModifyListeners(getMutex()) @@ -72,54 +69,50 @@ SbaExternalSourceBrowser::SbaExternalSourceBrowser(const Reference< ::com::sun:: } -//------------------------------------------------------------------------------ SbaExternalSourceBrowser::~SbaExternalSourceBrowser() { DBG_DTOR(SbaExternalSourceBrowser,NULL); } -//------------------------------------------------------------------------- ::comphelper::StringSequence SAL_CALL SbaExternalSourceBrowser::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); } -// ------------------------------------------------------------------------- + OUString SbaExternalSourceBrowser::getImplementationName_Static() throw(RuntimeException) { return OUString("org.openoffice.comp.dbu.OFormGridView"); } -//------------------------------------------------------------------------- + ::comphelper::StringSequence SbaExternalSourceBrowser::getSupportedServiceNames_Static() throw(RuntimeException) { ::comphelper::StringSequence aSupported(1); aSupported.getArray()[0] = OUString("com.sun.star.sdb.FormGridView"); return aSupported; } -//------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL SbaExternalSourceBrowser::Create(const Reference<XMultiServiceFactory >& _rxFactory) { return *(new SbaExternalSourceBrowser( comphelper::getComponentContext(_rxFactory))); } -//------------------------------------------------------------------------- + OUString SAL_CALL SbaExternalSourceBrowser::getImplementationName() throw(RuntimeException) { return getImplementationName_Static(); } -//------------------------------------------------------------------------------ + Reference< XRowSet > SbaExternalSourceBrowser::CreateForm() { m_pDataSourceImpl = new SbaXFormAdapter(); return m_pDataSourceImpl; } -//------------------------------------------------------------------------------ sal_Bool SbaExternalSourceBrowser::InitializeForm(const Reference< XPropertySet > & /*i_formProperties*/) { return sal_True; } -//------------------------------------------------------------------ sal_Bool SbaExternalSourceBrowser::LoadForm() { // as we don't have a main form (yet), we have nothing to do @@ -127,8 +120,6 @@ sal_Bool SbaExternalSourceBrowser::LoadForm() return sal_True; } - -//------------------------------------------------------------------ void SbaExternalSourceBrowser::modified(const ::com::sun::star::lang::EventObject& aEvent) throw( RuntimeException ) { SbaXDataBrowserController::modified(aEvent); @@ -140,7 +131,6 @@ void SbaExternalSourceBrowser::modified(const ::com::sun::star::lang::EventObjec ((::com::sun::star::util::XModifyListener*)aIt.next())->modified(aEvt); } -//------------------------------------------------------------------ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::URL& aURL, const Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) throw(::com::sun::star::uno::RuntimeException) { const ::com::sun::star::beans::PropertyValue* pArguments = aArgs.getConstArray(); @@ -250,7 +240,6 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U SbaXDataBrowserController::dispatch(aURL, aArgs); } -//------------------------------------------------------------------ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrowser::queryDispatch(const ::com::sun::star::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( RuntimeException ) { Reference< ::com::sun::star::frame::XDispatch > xReturn; @@ -304,7 +293,6 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrows return xReturn; } -//------------------------------------------------------------------ void SAL_CALL SbaExternalSourceBrowser::disposing() { // say our modify listeners goodbye @@ -317,19 +305,16 @@ void SAL_CALL SbaExternalSourceBrowser::disposing() SbaXDataBrowserController::disposing(); } -//------------------------------------------------------------------ void SAL_CALL SbaExternalSourceBrowser::addModifyListener(const Reference< ::com::sun::star::util::XModifyListener > & aListener) throw( RuntimeException ) { m_aModifyListeners.addInterface(aListener); } -//------------------------------------------------------------------ void SAL_CALL SbaExternalSourceBrowser::removeModifyListener(const Reference< ::com::sun::star::util::XModifyListener > & aListener) throw( RuntimeException ) { m_aModifyListeners.removeInterface(aListener); } -//------------------------------------------------------------------ void SAL_CALL SbaExternalSourceBrowser::unloading(const ::com::sun::star::lang::EventObject& aEvent) throw( RuntimeException ) { if (m_pDataSourceImpl && (m_pDataSourceImpl->getAttachedForm() == aEvent.Source)) @@ -340,7 +325,6 @@ void SAL_CALL SbaExternalSourceBrowser::unloading(const ::com::sun::star::lang:: SbaXDataBrowserController::unloading(aEvent); } -//------------------------------------------------------------------ void SbaExternalSourceBrowser::Attach(const Reference< XRowSet > & xMaster) { Any aOldPos; @@ -414,20 +398,17 @@ void SbaExternalSourceBrowser::Attach(const Reference< XRowSet > & xMaster) } } -//------------------------------------------------------------------ void SbaExternalSourceBrowser::ClearView() { // set a new (empty) datasource Attach(Reference< XRowSet > ()); - // clear all cols in the grid Reference< ::com::sun::star::container::XIndexContainer > xColContainer(getControlModel(), UNO_QUERY); while (xColContainer->getCount() > 0) xColContainer->removeByIndex(0); } -//------------------------------------------------------------------ void SAL_CALL SbaExternalSourceBrowser::disposing(const ::com::sun::star::lang::EventObject& Source) throw( RuntimeException ) { if (m_pDataSourceImpl && (m_pDataSourceImpl->getAttachedForm() == Source.Source)) @@ -438,7 +419,6 @@ void SAL_CALL SbaExternalSourceBrowser::disposing(const ::com::sun::star::lang:: SbaXDataBrowserController::disposing(Source); } -//------------------------------------------------------------------ void SbaExternalSourceBrowser::startListening() { if (m_pDataSourceImpl && m_pDataSourceImpl->getAttachedForm().is()) @@ -448,7 +428,6 @@ void SbaExternalSourceBrowser::startListening() } } -//------------------------------------------------------------------ void SbaExternalSourceBrowser::stopListening() { if (m_pDataSourceImpl && m_pDataSourceImpl->getAttachedForm().is()) @@ -458,7 +437,4 @@ void SbaExternalSourceBrowser::stopListening() } } -//================================================================== -//================================================================== - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx index 913287396e10..cb8a74a4c8cd 100644 --- a/dbaccess/source/ui/browser/formadapter.cxx +++ b/dbaccess/source/ui/browser/formadapter.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "formadapter.hxx" #include <tools/debug.hxx> #include <osl/diagnose.h> @@ -36,12 +35,9 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; -//================================================================== // SbaXFormAdapter -//================================================================== DBG_NAME(SbaXFormAdapter) -// ------------------------------------------------------------------------- SbaXFormAdapter::SbaXFormAdapter() :m_aLoadListeners(*this, m_aMutex) ,m_aRowSetListeners(*this, m_aMutex) @@ -61,14 +57,12 @@ SbaXFormAdapter::SbaXFormAdapter() } -// ------------------------------------------------------------------------- SbaXFormAdapter::~SbaXFormAdapter() { DBG_DTOR(SbaXFormAdapter,NULL); } -// ------------------------------------------------------------------------- Sequence< Type > SAL_CALL SbaXFormAdapter::getTypes( ) throw (RuntimeException) { return ::comphelper::concatSequences( @@ -78,7 +72,6 @@ Sequence< Type > SAL_CALL SbaXFormAdapter::getTypes( ) throw (RuntimeException) ); } -// ------------------------------------------------------------------------- Sequence< sal_Int8 > SAL_CALL SbaXFormAdapter::getImplementationId( ) throw (RuntimeException) { static ::cppu::OImplementationId * pId = 0; @@ -94,7 +87,6 @@ Sequence< sal_Int8 > SAL_CALL SbaXFormAdapter::getImplementationId( ) throw (Ru return pId->getImplementationId(); } -// ------------------------------------------------------------------------- Any SAL_CALL SbaXFormAdapter::queryInterface(const Type& _rType) throw (RuntimeException) { Any aReturn = SbaXFormAdapter_BASE1::queryInterface( _rType ); @@ -108,7 +100,6 @@ Any SAL_CALL SbaXFormAdapter::queryInterface(const Type& _rType) throw (RuntimeE return aReturn; } -// ------------------------------------------------------------------------- void SbaXFormAdapter::StopListening() { // log off all our multiplexers @@ -141,7 +132,6 @@ void SbaXFormAdapter::StopListening() xComp->removeEventListener((::com::sun::star::lang::XEventListener*)(::com::sun::star::beans::XPropertyChangeListener*)this); } -// ------------------------------------------------------------------------- void SbaXFormAdapter::StartListening() { // log off all our multiplexers @@ -175,7 +165,6 @@ void SbaXFormAdapter::StartListening() xComp->addEventListener((::com::sun::star::lang::XEventListener*)(::com::sun::star::beans::XPropertyChangeListener*)this); } -// ------------------------------------------------------------------------- void SbaXFormAdapter::AttachForm(const Reference< ::com::sun::star::sdbc::XRowSet >& xNewMaster) { if (xNewMaster == m_xMainForm) @@ -220,7 +209,6 @@ void SbaXFormAdapter::AttachForm(const Reference< ::com::sun::star::sdbc::XRowSe } // ::com::sun::star::sdbc::XCloseable -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::close() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XCloseable > xIface(m_xMainForm, UNO_QUERY); @@ -229,7 +217,6 @@ void SAL_CALL SbaXFormAdapter::close() throw( ::com::sun::star::sdbc::SQLExcepti } // ::com::sun::star::sdbc::XResultSetMetaDataSupplier -// ------------------------------------------------------------------------- Reference< ::com::sun::star::sdbc::XResultSetMetaData > SAL_CALL SbaXFormAdapter::getMetaData() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XResultSetMetaDataSupplier > xIface(m_xMainForm, UNO_QUERY); @@ -239,7 +226,6 @@ Reference< ::com::sun::star::sdbc::XResultSetMetaData > SAL_CALL SbaXFormAdapter } // ::com::sun::star::sdbc::XColumnLocate -// ------------------------------------------------------------------------- sal_Int32 SAL_CALL SbaXFormAdapter::findColumn(const OUString& columnName) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XColumnLocate > xIface(m_xMainForm, UNO_QUERY); @@ -249,7 +235,6 @@ sal_Int32 SAL_CALL SbaXFormAdapter::findColumn(const OUString& columnName) throw } // ::com::sun::star::sdbcx::XColumnsSupplier -// ------------------------------------------------------------------------- Reference< ::com::sun::star::container::XNameAccess > SAL_CALL SbaXFormAdapter::getColumns() throw( RuntimeException ) { Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xIface(m_xMainForm, UNO_QUERY); @@ -259,7 +244,6 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL SbaXFormAdapter:: } // ::com::sun::star::sdbc::XRow -// ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaXFormAdapter::wasNull() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -267,7 +251,7 @@ sal_Bool SAL_CALL SbaXFormAdapter::wasNull() throw( ::com::sun::star::sdbc::SQLE return xIface->wasNull(); return sal_True; } -// ------------------------------------------------------------------------- + OUString SAL_CALL SbaXFormAdapter::getString(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -275,7 +259,7 @@ OUString SAL_CALL SbaXFormAdapter::getString(sal_Int32 columnIndex) throw( ::com return xIface->getString(columnIndex); return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::getBoolean(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -283,15 +267,16 @@ sal_Bool SAL_CALL SbaXFormAdapter::getBoolean(sal_Int32 columnIndex) throw( ::co return xIface->getBoolean(columnIndex); return sal_False; } -// ------------------------------------------------------------------------- + sal_Int8 SAL_CALL SbaXFormAdapter::getByte(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) + { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) return xIface->getByte(columnIndex); return 0; } -// ------------------------------------------------------------------------- + sal_Int16 SAL_CALL SbaXFormAdapter::getShort(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -299,7 +284,7 @@ sal_Int16 SAL_CALL SbaXFormAdapter::getShort(sal_Int32 columnIndex) throw( ::com return xIface->getShort(columnIndex); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL SbaXFormAdapter::getInt(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -307,7 +292,7 @@ sal_Int32 SAL_CALL SbaXFormAdapter::getInt(sal_Int32 columnIndex) throw( ::com:: return xIface->getInt(columnIndex); return 0; } -// ------------------------------------------------------------------------- + sal_Int64 SAL_CALL SbaXFormAdapter::getLong(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -315,7 +300,7 @@ sal_Int64 SAL_CALL SbaXFormAdapter::getLong(sal_Int32 columnIndex) throw( ::com: return xIface->getLong(columnIndex); return 0; } -// ------------------------------------------------------------------------- + float SAL_CALL SbaXFormAdapter::getFloat(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -323,7 +308,7 @@ float SAL_CALL SbaXFormAdapter::getFloat(sal_Int32 columnIndex) throw( ::com::su return xIface->getFloat(columnIndex); return 0.0; } -// ------------------------------------------------------------------------- + double SAL_CALL SbaXFormAdapter::getDouble(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -331,7 +316,7 @@ double SAL_CALL SbaXFormAdapter::getDouble(sal_Int32 columnIndex) throw( ::com:: return xIface->getDouble(columnIndex); return 0.0; } -// ------------------------------------------------------------------------- + Sequence< sal_Int8 > SAL_CALL SbaXFormAdapter::getBytes(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -339,7 +324,7 @@ Sequence< sal_Int8 > SAL_CALL SbaXFormAdapter::getBytes(sal_Int32 columnIndex) t return xIface->getBytes(columnIndex); return Sequence <sal_Int8> (); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Date SAL_CALL SbaXFormAdapter::getDate(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -347,7 +332,7 @@ Sequence< sal_Int8 > SAL_CALL SbaXFormAdapter::getBytes(sal_Int32 columnIndex) t return xIface->getDate(columnIndex); return ::com::sun::star::util::Date(); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Time SAL_CALL SbaXFormAdapter::getTime(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -355,7 +340,7 @@ Sequence< sal_Int8 > SAL_CALL SbaXFormAdapter::getBytes(sal_Int32 columnIndex) t return xIface->getTime(columnIndex); return ::com::sun::star::util::Time(); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::DateTime SAL_CALL SbaXFormAdapter::getTimestamp(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -363,7 +348,7 @@ Sequence< sal_Int8 > SAL_CALL SbaXFormAdapter::getBytes(sal_Int32 columnIndex) t return xIface->getTimestamp(columnIndex); return ::com::sun::star::util::DateTime(); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL SbaXFormAdapter::getBinaryStream(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -371,7 +356,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL SbaXFormAdapter::getBin return xIface->getBinaryStream(columnIndex); return Reference< ::com::sun::star::io::XInputStream > (); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL SbaXFormAdapter::getCharacterStream(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -379,7 +364,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL SbaXFormAdapter::getCha return xIface->getCharacterStream(columnIndex); return Reference< ::com::sun::star::io::XInputStream > (); } -// ------------------------------------------------------------------------- + Any SAL_CALL SbaXFormAdapter::getObject(sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& typeMap) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -387,7 +372,7 @@ Any SAL_CALL SbaXFormAdapter::getObject(sal_Int32 columnIndex, const Reference< return xIface->getObject(columnIndex, typeMap); return Any(); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::sdbc::XRef > SAL_CALL SbaXFormAdapter::getRef(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -395,7 +380,7 @@ Reference< ::com::sun::star::sdbc::XRef > SAL_CALL SbaXFormAdapter::getRef(sal_I return xIface->getRef(columnIndex); return Reference< ::com::sun::star::sdbc::XRef > (); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::sdbc::XBlob > SAL_CALL SbaXFormAdapter::getBlob(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -403,7 +388,7 @@ Reference< ::com::sun::star::sdbc::XBlob > SAL_CALL SbaXFormAdapter::getBlob(sal return xIface->getBlob(columnIndex); return Reference< ::com::sun::star::sdbc::XBlob > (); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::sdbc::XClob > SAL_CALL SbaXFormAdapter::getClob(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -411,7 +396,7 @@ Reference< ::com::sun::star::sdbc::XClob > SAL_CALL SbaXFormAdapter::getClob(sal return xIface->getClob(columnIndex); return Reference< ::com::sun::star::sdbc::XClob > (); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::sdbc::XArray > SAL_CALL SbaXFormAdapter::getArray(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -421,7 +406,6 @@ Reference< ::com::sun::star::sdbc::XArray > SAL_CALL SbaXFormAdapter::getArray(s } // ::com::sun::star::sdbcx::XRowLocate -// ------------------------------------------------------------------------- Any SAL_CALL SbaXFormAdapter::getBookmark() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbcx::XRowLocate > xIface(m_xMainForm, UNO_QUERY); @@ -429,7 +413,7 @@ Any SAL_CALL SbaXFormAdapter::getBookmark() throw( ::com::sun::star::sdbc::SQLEx return xIface->getBookmark(); return Any(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::moveToBookmark(const Any& bookmark) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbcx::XRowLocate > xIface(m_xMainForm, UNO_QUERY); @@ -437,7 +421,7 @@ sal_Bool SAL_CALL SbaXFormAdapter::moveToBookmark(const Any& bookmark) throw( :: return xIface->moveToBookmark(bookmark); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::moveRelativeToBookmark(const Any& bookmark, sal_Int32 rows) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbcx::XRowLocate > xIface(m_xMainForm, UNO_QUERY); @@ -445,7 +429,7 @@ sal_Bool SAL_CALL SbaXFormAdapter::moveRelativeToBookmark(const Any& bookmark, s return xIface->moveRelativeToBookmark(bookmark,rows); return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL SbaXFormAdapter::compareBookmarks(const Any& _first, const Any& _second) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbcx::XRowLocate > xIface(m_xMainForm, UNO_QUERY); @@ -454,7 +438,6 @@ sal_Int32 SAL_CALL SbaXFormAdapter::compareBookmarks(const Any& _first, const An return 0; } -// ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaXFormAdapter::hasOrderedBookmarks() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbcx::XRowLocate > xIface(m_xMainForm, UNO_QUERY); @@ -463,7 +446,6 @@ sal_Bool SAL_CALL SbaXFormAdapter::hasOrderedBookmarks() throw( ::com::sun::star return sal_False; } -// ------------------------------------------------------------------------- sal_Int32 SAL_CALL SbaXFormAdapter::hashBookmark(const Any& bookmark) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbcx::XRowLocate > xIface(m_xMainForm, UNO_QUERY); @@ -473,119 +455,118 @@ sal_Int32 SAL_CALL SbaXFormAdapter::hashBookmark(const Any& bookmark) throw( ::c } // ::com::sun::star::sdbc::XRowUpdate -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::updateNull(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateNull(columnIndex); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateBoolean(sal_Int32 columnIndex, sal_Bool x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateBoolean(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateByte(sal_Int32 columnIndex, sal_Int8 x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateByte(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateShort(sal_Int32 columnIndex, sal_Int16 x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateShort(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateInt(sal_Int32 columnIndex, sal_Int32 x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateInt(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateLong(sal_Int32 columnIndex, sal_Int64 x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateLong(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateFloat(sal_Int32 columnIndex, float x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateFloat(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateDouble(sal_Int32 columnIndex, double x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateDouble(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateString(sal_Int32 columnIndex, const OUString& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateString(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateBytes(sal_Int32 columnIndex, const Sequence< sal_Int8 >& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateBytes(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateDate(sal_Int32 columnIndex, const ::com::sun::star::util::Date& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateDate(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateTime(sal_Int32 columnIndex, const ::com::sun::star::util::Time& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateTime(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateTimestamp(sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateTimestamp(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateBinaryStream(sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateBinaryStream(columnIndex, x, length); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateCharacterStream(sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateCharacterStream(columnIndex, x, length); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateObject(sal_Int32 columnIndex, const Any& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateObject(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateNumericObject(sal_Int32 columnIndex, const Any& x, sal_Int32 scale) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); @@ -594,124 +575,122 @@ void SAL_CALL SbaXFormAdapter::updateNumericObject(sal_Int32 columnIndex, const } // ::com::sun::star::sdbc::XResultSet -// ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaXFormAdapter::next() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->next(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::isBeforeFirst() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->isBeforeFirst(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::isAfterLast() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->isAfterLast(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::isFirst() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->isFirst(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::isLast() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->isLast(); return sal_False; } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::beforeFirst() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) m_xMainForm->beforeFirst(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::afterLast() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) m_xMainForm->afterLast(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::first() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->first(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::last() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->last(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL SbaXFormAdapter::getRow() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->getRow(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::absolute(sal_Int32 row) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->absolute(row); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::relative(sal_Int32 rows) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->relative(rows); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::previous() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->previous(); return sal_False; } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::refreshRow() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) m_xMainForm->refreshRow(); } -// ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaXFormAdapter::rowUpdated() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->rowUpdated(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::rowInserted() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->rowInserted(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::rowDeleted() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->rowDeleted(); return sal_False; } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL SbaXFormAdapter::getStatement() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) @@ -720,42 +699,41 @@ Reference< XInterface > SAL_CALL SbaXFormAdapter::getStatement() throw( ::com::s } // ::com::sun::star::sdbc::XResultSetUpdate -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::insertRow() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XResultSetUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->insertRow(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateRow() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XResultSetUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateRow(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::deleteRow() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XResultSetUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->deleteRow(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::cancelRowUpdates() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XResultSetUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->cancelRowUpdates(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::moveToInsertRow() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XResultSetUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->moveToInsertRow(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::moveToCurrentRow() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XResultSetUpdate > xIface(m_xMainForm, UNO_QUERY); @@ -764,17 +742,15 @@ void SAL_CALL SbaXFormAdapter::moveToCurrentRow() throw( ::com::sun::star::sdbc: } // ::com::sun::star::sdbc::XRowSet -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::execute() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) m_xMainForm->execute(); } -// ------------------------------------------------------------------------- + IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, sdbc, RowSetListener, m_aRowSetListeners, ::com::sun::star::sdbc::XRowSet, m_xMainForm) // ::com::sun::star::sdbcx::XDeleteRows -// ------------------------------------------------------------------------- Sequence<sal_Int32> SAL_CALL SbaXFormAdapter::deleteRows(const Sequence< Any >& rows) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbcx::XDeleteRows > xIface(m_xMainForm, UNO_QUERY); @@ -784,7 +760,6 @@ Sequence<sal_Int32> SAL_CALL SbaXFormAdapter::deleteRows(const Sequence< Any >& } // ::com::sun::star::sdbc::XWarningsSupplier -// ------------------------------------------------------------------------- Any SAL_CALL SbaXFormAdapter::getWarnings() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XWarningsSupplier > xIface(m_xMainForm, UNO_QUERY); @@ -792,7 +767,7 @@ Any SAL_CALL SbaXFormAdapter::getWarnings() throw( ::com::sun::star::sdbc::SQLEx return xIface->getWarnings(); return Any(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::clearWarnings() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XWarningsSupplier > xIface(m_xMainForm, UNO_QUERY); @@ -801,15 +776,12 @@ void SAL_CALL SbaXFormAdapter::clearWarnings() throw( ::com::sun::star::sdbc::SQ } // ::com::sun::star::sdb::XRowSetApproveBroadcaster -// ------------------------------------------------------------------------- IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, sdb, RowSetApproveListener, m_aRowSetApproveListeners, ::com::sun::star::sdb::XRowSetApproveBroadcaster, m_xMainForm) // com::sun::star::sdbc::XSQLErrorBroadcaster -// ------------------------------------------------------------------------- IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, sdb, SQLErrorListener, m_aErrorListeners, ::com::sun::star::sdb::XSQLErrorBroadcaster, m_xMainForm) // ::com::sun::star::sdb::XResultSetAccess -// ------------------------------------------------------------------------- Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL SbaXFormAdapter::createResultSet() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdb::XResultSetAccess > xIface(m_xMainForm, UNO_QUERY); @@ -819,28 +791,27 @@ Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL SbaXFormAdapter::create } // com::sun::star::form::XLoadable -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::load() throw( RuntimeException ) { Reference< ::com::sun::star::form::XLoadable > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->load(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::unload() throw( RuntimeException ) { Reference< ::com::sun::star::form::XLoadable > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->unload(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::reload() throw( RuntimeException ) { Reference< ::com::sun::star::form::XLoadable > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->reload(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::isLoaded() throw( RuntimeException ) { Reference< ::com::sun::star::form::XLoadable > xIface(m_xMainForm, UNO_QUERY); @@ -848,165 +819,164 @@ sal_Bool SAL_CALL SbaXFormAdapter::isLoaded() throw( RuntimeException ) return xIface->isLoaded(); return sal_False; } -// ------------------------------------------------------------------------- + IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, form, LoadListener, m_aLoadListeners, ::com::sun::star::form::XLoadable, m_xMainForm) // ::com::sun::star::sdbc::XParameters -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setNull(sal_Int32 parameterIndex, sal_Int32 sqlType) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setNull(parameterIndex, sqlType); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setObjectNull(sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString& typeName) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setObjectNull(parameterIndex, sqlType, typeName); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setBoolean(sal_Int32 parameterIndex, sal_Bool x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setBoolean(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setByte(sal_Int32 parameterIndex, sal_Int8 x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setByte(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setShort(sal_Int32 parameterIndex, sal_Int16 x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setShort(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setInt(sal_Int32 parameterIndex, sal_Int32 x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setInt(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setLong(sal_Int32 parameterIndex, sal_Int64 x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setLong(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setFloat(sal_Int32 parameterIndex, float x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setFloat(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setDouble(sal_Int32 parameterIndex, double x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setDouble(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setString(sal_Int32 parameterIndex, const OUString& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setString(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setBytes(sal_Int32 parameterIndex, const Sequence< sal_Int8 >& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setBytes(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setDate(sal_Int32 parameterIndex, const ::com::sun::star::util::Date& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setDate(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setTime(sal_Int32 parameterIndex, const ::com::sun::star::util::Time& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setTime(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setTimestamp(sal_Int32 parameterIndex, const ::com::sun::star::util::DateTime& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setTimestamp(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setBinaryStream(sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setBinaryStream(parameterIndex, x, length); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setCharacterStream(sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setCharacterStream(parameterIndex, x, length); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setObject(sal_Int32 parameterIndex, const Any& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setObject(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setObjectWithInfo(sal_Int32 parameterIndex, const Any& x, sal_Int32 targetSqlType, sal_Int32 scale) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setObjectWithInfo(parameterIndex, x, targetSqlType, scale); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setRef(sal_Int32 parameterIndex, const Reference< ::com::sun::star::sdbc::XRef >& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setRef(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setBlob(sal_Int32 parameterIndex, const Reference< ::com::sun::star::sdbc::XBlob >& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setBlob(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setClob(sal_Int32 parameterIndex, const Reference< ::com::sun::star::sdbc::XClob >& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setClob(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setArray(sal_Int32 parameterIndex, const Reference< ::com::sun::star::sdbc::XArray >& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setArray(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::clearParameters() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); @@ -1015,7 +985,6 @@ void SAL_CALL SbaXFormAdapter::clearParameters() throw( ::com::sun::star::sdbc:: } // ::com::sun::star::form::XDatabaseParameterBroadcaster -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::addParameterListener(const Reference< ::com::sun::star::form::XDatabaseParameterListener >& aListener) throw( RuntimeException ) { m_aParameterListeners.addInterface(aListener); @@ -1027,7 +996,6 @@ void SAL_CALL SbaXFormAdapter::addParameterListener(const Reference< ::com::sun: } } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::removeParameterListener(const Reference< ::com::sun::star::form::XDatabaseParameterListener >& aListener) throw( RuntimeException ) { if (m_aParameterListeners.getLength() == 1) @@ -1040,20 +1008,17 @@ void SAL_CALL SbaXFormAdapter::removeParameterListener(const Reference< ::com::s } // ::com::sun::star::container::XChild -// ------------------------------------------------------------------------- Reference< XInterface > SAL_CALL SbaXFormAdapter::getParent() throw( RuntimeException ) { return m_xParent; } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setParent(const Reference< XInterface >& Parent) throw( ::com::sun::star::lang::NoSupportException, RuntimeException ) { m_xParent = Parent; } // ::com::sun::star::form::XSubmit -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::submit(const Reference< ::com::sun::star::awt::XControl >& aControl, const ::com::sun::star::awt::MouseEvent& aMouseEvt) throw( RuntimeException ) { Reference< ::com::sun::star::form::XSubmit > xSubmit(m_xMainForm, UNO_QUERY); @@ -1064,59 +1029,50 @@ void SAL_CALL SbaXFormAdapter::submit(const Reference< ::com::sun::star::awt::XC IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, form, SubmitListener, m_aSubmitListeners, ::com::sun::star::form::XSubmit, m_xMainForm) // ::com::sun::star::awt::XTabControllerModel -// ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaXFormAdapter::getGroupControl() throw( RuntimeException ) { OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroupControl : not supported !"); return sal_False; } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setGroupControl(sal_Bool /*GroupControl*/) throw( RuntimeException ) { OSL_FAIL("SAL_CALL SbaXFormAdapter::setGroupControl : not supported !"); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setControlModels(const Sequence< Reference< ::com::sun::star::awt::XControlModel > >& /*Controls*/) throw( RuntimeException ) { OSL_FAIL("SAL_CALL SbaXFormAdapter::setControlModels : not supported !"); } -// ------------------------------------------------------------------------- Sequence< Reference< ::com::sun::star::awt::XControlModel > > SAL_CALL SbaXFormAdapter::getControlModels() throw( RuntimeException ) { OSL_FAIL("SAL_CALL SbaXFormAdapter::getControlModels : not supported !"); return Sequence< Reference< ::com::sun::star::awt::XControlModel > >(); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setGroup(const Sequence< Reference< ::com::sun::star::awt::XControlModel > >& /*_rGroup*/, const OUString& /*GroupName*/) throw( RuntimeException ) { OSL_FAIL("SAL_CALL SbaXFormAdapter::setGroup : not supported !"); } -// ------------------------------------------------------------------------- sal_Int32 SAL_CALL SbaXFormAdapter::getGroupCount() throw( RuntimeException ) { OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroupCount : not supported !"); return 0; } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::getGroup(sal_Int32 /*nGroup*/, Sequence< Reference< ::com::sun::star::awt::XControlModel > >& /*_rGroup*/, OUString& /*Name*/) throw( RuntimeException ) { OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroup : not supported !"); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::getGroupByName(const OUString& /*Name*/, Sequence< Reference< ::com::sun::star::awt::XControlModel > >& /*_rGroup*/) throw( RuntimeException ) { OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroupByName : not supported !"); } // ::com::sun::star::lang::XComponent -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::dispose() throw( RuntimeException ) { // log off all multiplexers @@ -1160,20 +1116,17 @@ void SAL_CALL SbaXFormAdapter::dispose() throw( RuntimeException ) m_aChildren.clear(); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::addEventListener(const Reference< ::com::sun::star::lang::XEventListener >& xListener) throw( RuntimeException ) { m_aDisposeListeners.addInterface(xListener); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::removeEventListener(const Reference< ::com::sun::star::lang::XEventListener >& aListener) throw( RuntimeException ) { m_aDisposeListeners.removeInterface(aListener); } // ::com::sun::star::beans::XFastPropertySet -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setFastPropertyValue(sal_Int32 nHandle, const Any& aValue) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { Reference< ::com::sun::star::beans::XFastPropertySet > xSet(m_xMainForm, UNO_QUERY); @@ -1206,7 +1159,6 @@ void SAL_CALL SbaXFormAdapter::setFastPropertyValue(sal_Int32 nHandle, const Any xSet->setFastPropertyValue(nHandle, aValue); } -// ------------------------------------------------------------------------- Any SAL_CALL SbaXFormAdapter::getFastPropertyValue(sal_Int32 nHandle) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { Reference< ::com::sun::star::beans::XFastPropertySet > xSet(m_xMainForm, UNO_QUERY); @@ -1219,20 +1171,17 @@ Any SAL_CALL SbaXFormAdapter::getFastPropertyValue(sal_Int32 nHandle) throw( ::c } // ::com::sun::star::container::XNamed -// ------------------------------------------------------------------------- OUString SAL_CALL SbaXFormAdapter::getName() throw( RuntimeException ) { return ::comphelper::getString(getPropertyValue(PROPERTY_NAME)); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setName(const OUString& aName) throw( RuntimeException ) { setPropertyValue(PROPERTY_NAME, makeAny(aName)); } // ::com::sun::star::io::XPersistObject -// ------------------------------------------------------------------------- OUString SAL_CALL SbaXFormAdapter::getServiceName() throw( RuntimeException ) { Reference< ::com::sun::star::io::XPersistObject > xPersist(m_xMainForm, UNO_QUERY); @@ -1241,7 +1190,6 @@ OUString SAL_CALL SbaXFormAdapter::getServiceName() throw( RuntimeException ) return OUString(); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::write(const Reference< ::com::sun::star::io::XObjectOutputStream >& _rxOutStream) throw( ::com::sun::star::io::IOException, RuntimeException ) { Reference< ::com::sun::star::io::XPersistObject > xPersist(m_xMainForm, UNO_QUERY); @@ -1249,7 +1197,6 @@ void SAL_CALL SbaXFormAdapter::write(const Reference< ::com::sun::star::io::XObj xPersist->write(_rxOutStream); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::read(const Reference< ::com::sun::star::io::XObjectInputStream >& _rxInStream) throw( ::com::sun::star::io::IOException, RuntimeException ) { Reference< ::com::sun::star::io::XPersistObject > xPersist(m_xMainForm, UNO_QUERY); @@ -1258,7 +1205,6 @@ void SAL_CALL SbaXFormAdapter::read(const Reference< ::com::sun::star::io::XObje } // ::com::sun::star::beans::XMultiPropertySet -// ------------------------------------------------------------------------- Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL SbaXFormAdapter::getPropertySetInfo() throw( RuntimeException ) { Reference< ::com::sun::star::beans::XMultiPropertySet > xSet(m_xMainForm, UNO_QUERY); @@ -1284,7 +1230,6 @@ Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL SbaXFormAdapter: return xReturn; } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setPropertyValues(const Sequence< OUString >& PropertyNames, const Sequence< Any >& Values) throw( ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { Reference< ::com::sun::star::beans::XMultiPropertySet > xSet(m_xMainForm, UNO_QUERY); @@ -1292,7 +1237,6 @@ void SAL_CALL SbaXFormAdapter::setPropertyValues(const Sequence< OUString >& Pro xSet->setPropertyValues(PropertyNames, Values); } -// ------------------------------------------------------------------------- Sequence< Any > SAL_CALL SbaXFormAdapter::getPropertyValues(const Sequence< OUString >& aPropertyNames) throw( RuntimeException ) { Reference< ::com::sun::star::beans::XMultiPropertySet > xSet(m_xMainForm, UNO_QUERY); @@ -1315,7 +1259,6 @@ Sequence< Any > SAL_CALL SbaXFormAdapter::getPropertyValues(const Sequence< OUSt return aReturn; } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::addPropertiesChangeListener(const Sequence< OUString>& /*aPropertyNames*/, const Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener) throw( RuntimeException ) { // we completely ignore the property names, _all_ changes of _all_ properties will be forwarded to _all_ listeners @@ -1329,7 +1272,6 @@ void SAL_CALL SbaXFormAdapter::addPropertiesChangeListener(const Sequence< OUStr } } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::removePropertiesChangeListener(const Reference< ::com::sun::star::beans::XPropertiesChangeListener >& Listener) throw( RuntimeException ) { if (m_aPropertiesChangeListeners.getLength() == 1) @@ -1341,7 +1283,6 @@ void SAL_CALL SbaXFormAdapter::removePropertiesChangeListener(const Reference< : m_aPropertiesChangeListeners.removeInterface(Listener); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::firePropertiesChangeEvent(const Sequence< OUString >& aPropertyNames, const Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener) throw( RuntimeException ) { Reference< ::com::sun::star::beans::XMultiPropertySet > xSet(m_xMainForm, UNO_QUERY); @@ -1349,9 +1290,7 @@ void SAL_CALL SbaXFormAdapter::firePropertiesChangeEvent(const Sequence< OUStrin xSet->firePropertiesChangeEvent(aPropertyNames, xListener); } - // ::com::sun::star::beans::XPropertySet -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setPropertyValue(const OUString& aPropertyName, const Any& aValue) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { Reference< ::com::sun::star::beans::XPropertySet > xSet(m_xMainForm, UNO_QUERY); @@ -1365,7 +1304,6 @@ void SAL_CALL SbaXFormAdapter::setPropertyValue(const OUString& aPropertyName, c xSet->setPropertyValue(aPropertyName, aValue); } -// ------------------------------------------------------------------------- Any SAL_CALL SbaXFormAdapter::getPropertyValue(const OUString& PropertyName) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { Reference< ::com::sun::star::beans::XPropertySet > xSet(m_xMainForm, UNO_QUERY); @@ -1383,7 +1321,6 @@ IMPLEMENT_PROPERTY_LISTENER_ADMINISTRATION(SbaXFormAdapter, PropertyChangeListen IMPLEMENT_PROPERTY_LISTENER_ADMINISTRATION(SbaXFormAdapter, VetoableChangeListener, m_aVetoablePropertyChangeListeners, ::com::sun::star::beans::XPropertySet, m_xMainForm); // ::com::sun::star::util::XCancellable -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::cancel() throw( RuntimeException ) { Reference< ::com::sun::star::util::XCancellable > xCancel(m_xMainForm, UNO_QUERY); @@ -1393,7 +1330,6 @@ void SAL_CALL SbaXFormAdapter::cancel() throw( RuntimeException ) } // ::com::sun::star::beans::XPropertyState -// ------------------------------------------------------------------------- ::com::sun::star::beans::PropertyState SAL_CALL SbaXFormAdapter::getPropertyState(const OUString& PropertyName) throw( ::com::sun::star::beans::UnknownPropertyException, RuntimeException ) { Reference< ::com::sun::star::beans::XPropertyState > xState(m_xMainForm, UNO_QUERY); @@ -1402,7 +1338,6 @@ void SAL_CALL SbaXFormAdapter::cancel() throw( RuntimeException ) return ::com::sun::star::beans::PropertyState_DEFAULT_VALUE; } -// ------------------------------------------------------------------------- Sequence< ::com::sun::star::beans::PropertyState> SAL_CALL SbaXFormAdapter::getPropertyStates(const Sequence< OUString >& aPropertyName) throw( ::com::sun::star::beans::UnknownPropertyException, RuntimeException ) { Reference< ::com::sun::star::beans::XPropertyState > xState(m_xMainForm, UNO_QUERY); @@ -1417,7 +1352,6 @@ Sequence< ::com::sun::star::beans::PropertyState> SAL_CALL SbaXFormAdapter::getP return aReturn; } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setPropertyToDefault(const OUString& PropertyName) throw( ::com::sun::star::beans::UnknownPropertyException, RuntimeException ) { Reference< ::com::sun::star::beans::XPropertyState > xState(m_xMainForm, UNO_QUERY); @@ -1425,7 +1359,6 @@ void SAL_CALL SbaXFormAdapter::setPropertyToDefault(const OUString& PropertyName xState->setPropertyToDefault(PropertyName); } -// ------------------------------------------------------------------------- Any SAL_CALL SbaXFormAdapter::getPropertyDefault(const OUString& aPropertyName) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { Reference< ::com::sun::star::beans::XPropertyState > xState(m_xMainForm, UNO_QUERY); @@ -1435,7 +1368,6 @@ Any SAL_CALL SbaXFormAdapter::getPropertyDefault(const OUString& aPropertyName) } // ::com::sun::star::form::XReset -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::reset() throw( RuntimeException ) { Reference< ::com::sun::star::form::XReset > xReset(m_xMainForm, UNO_QUERY); @@ -1446,7 +1378,6 @@ void SAL_CALL SbaXFormAdapter::reset() throw( RuntimeException ) IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, form, ResetListener, m_aResetListeners, ::com::sun::star::form::XReset, m_xMainForm) // ::com::sun::star::container::XNameContainer -// ------------------------------------------------------------------------- void SbaXFormAdapter::implInsert(const Any& aElement, sal_Int32 nIndex, const OUString* pNewElName) throw( ::com::sun::star::lang::IllegalArgumentException ) { // extract the form component @@ -1506,7 +1437,6 @@ void SbaXFormAdapter::implInsert(const Any& aElement, sal_Int32 nIndex, const OU ((::com::sun::star::container::XContainerListener*)aIt.next())->elementInserted(aEvt); } -// ------------------------------------------------------------------------- sal_Int32 SbaXFormAdapter::implGetPos(const OUString& rName) { ::std::vector< OUString>::iterator aIter = ::std::find_if( m_aChildNames.begin(), @@ -1519,13 +1449,11 @@ sal_Int32 SbaXFormAdapter::implGetPos(const OUString& rName) return -1; } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::insertByName(const OUString& aName, const Any& aElement) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { implInsert(aElement, m_aChildren.size(), &aName); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::removeByName(const OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { sal_Int32 nPos = implGetPos(Name); @@ -1537,7 +1465,6 @@ void SAL_CALL SbaXFormAdapter::removeByName(const OUString& Name) throw( ::com:: } // ::com::sun::star::container::XNameReplace -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::replaceByName(const OUString& aName, const Any& aElement) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { sal_Int32 nPos = implGetPos(aName); @@ -1549,7 +1476,6 @@ void SAL_CALL SbaXFormAdapter::replaceByName(const OUString& aName, const Any& a } // ::com::sun::star::container::XNameAccess -// ------------------------------------------------------------------------- Any SAL_CALL SbaXFormAdapter::getByName(const OUString& aName) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { sal_Int32 nPos = implGetPos(aName); @@ -1560,36 +1486,30 @@ Any SAL_CALL SbaXFormAdapter::getByName(const OUString& aName) throw( ::com::sun return makeAny(m_aChildren[nPos]); } -// ------------------------------------------------------------------------- Sequence< OUString > SAL_CALL SbaXFormAdapter::getElementNames() throw( RuntimeException ) { OUString *pChildNames = m_aChildNames.empty() ? 0 : &m_aChildNames[0]; return Sequence< OUString >(pChildNames, m_aChildNames.size()); } -// ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaXFormAdapter::hasByName(const OUString& aName) throw( RuntimeException ) { return (-1 != implGetPos(aName)); } // ::com::sun::star::container::XElementAccess -// ------------------------------------------------------------------------- Type SAL_CALL SbaXFormAdapter::getElementType() throw(RuntimeException) { return ::getCppuType( static_cast< Reference< ::com::sun::star::form::XFormComponent >* >(NULL)); } -// ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaXFormAdapter::hasElements() throw(RuntimeException) { return m_aChildren.size() > 0; } - // ::com::sun::star::container::XIndexContainer -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::insertByIndex(sal_Int32 _rIndex, const Any& Element) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { if ( ( _rIndex < 0 ) || ( (size_t)_rIndex >= m_aChildren.size() ) ) @@ -1597,7 +1517,6 @@ void SAL_CALL SbaXFormAdapter::insertByIndex(sal_Int32 _rIndex, const Any& Eleme implInsert(Element, _rIndex); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::removeByIndex(sal_Int32 _rIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { if ( ( _rIndex < 0 ) || ( (size_t)_rIndex >= m_aChildren.size() ) ) @@ -1627,7 +1546,6 @@ void SAL_CALL SbaXFormAdapter::removeByIndex(sal_Int32 _rIndex) throw( ::com::su } // ::com::sun::star::container::XIndexReplace -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::replaceByIndex(sal_Int32 _rIndex, const Any& Element) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { if ( ( _rIndex < 0 ) || ( (size_t)_rIndex >= m_aChildren.size() ) ) @@ -1690,13 +1608,11 @@ void SAL_CALL SbaXFormAdapter::replaceByIndex(sal_Int32 _rIndex, const Any& Elem } // ::com::sun::star::container::XIndexAccess -// ------------------------------------------------------------------------- sal_Int32 SAL_CALL SbaXFormAdapter::getCount() throw( RuntimeException ) { return m_aChildren.size(); } -// ------------------------------------------------------------------------- Any SAL_CALL SbaXFormAdapter::getByIndex(sal_Int32 _rIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { if ( ( _rIndex < 0 ) || ( (size_t)_rIndex >= m_aChildren.size() ) ) @@ -1707,27 +1623,23 @@ Any SAL_CALL SbaXFormAdapter::getByIndex(sal_Int32 _rIndex) throw( ::com::sun::s } // ::com::sun::star::container::XContainer -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::addContainerListener(const Reference< ::com::sun::star::container::XContainerListener >& xListener) throw( RuntimeException ) { m_aContainerListeners.addInterface(xListener); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::removeContainerListener(const Reference< ::com::sun::star::container::XContainerListener >& xListener) throw( RuntimeException ) { m_aContainerListeners.removeInterface(xListener); } // ::com::sun::star::container::XEnumerationAccess -// ------------------------------------------------------------------------- Reference< ::com::sun::star::container::XEnumeration > SAL_CALL SbaXFormAdapter::createEnumeration() throw( RuntimeException ) { return new ::comphelper::OEnumerationByName(this); } // ::com::sun::star::beans::XPropertyChangeListener -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw( RuntimeException ) { if (evt.PropertyName.equals(PROPERTY_NAME)) @@ -1746,7 +1658,6 @@ void SAL_CALL SbaXFormAdapter::propertyChange(const ::com::sun::star::beans::Pro } // ::com::sun::star::lang::XEventListener -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::disposing(const ::com::sun::star::lang::EventObject& Source) throw( RuntimeException ) { // was it our main form ? @@ -1759,7 +1670,5 @@ void SAL_CALL SbaXFormAdapter::disposing(const ::com::sun::star::lang::EventObje if(aIter != m_aChildren.end()) removeByIndex(aIter - m_aChildren.begin()); } -// ----------------------------------------------------------------------------- - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index 2b2a9f77dbb0..8a604022f7aa 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -73,17 +73,13 @@ using namespace ::com::sun::star::awt; using namespace ::dbtools; using namespace ::comphelper; -// ------------------------------------------------------------------------- #define ALL_FEATURES -1 #define FIRST_USER_DEFINED_FEATURE ( ::std::numeric_limits< sal_uInt16 >::max() - 1000 ) #define LAST_USER_DEFINED_FEATURE ( ::std::numeric_limits< sal_uInt16 >::max() ) -// ------------------------------------------------------------------------- typedef ::boost::unordered_map< sal_Int16, sal_Int16 > CommandHashMap; typedef ::std::list< DispatchInformation > DispatchInfoList; - -// ------------------------------------------------------------------------- const OUString& getConfirmDeletionURL() { static const OUString sConfirmDeletionURL( ".uno:FormSlots/ConfirmDeletion" ); @@ -93,9 +89,7 @@ const OUString& getConfirmDeletionURL() namespace dbaui { -//========================================================================== -//= UserDefinedFeatures -//========================================================================== +// UserDefinedFeatures class UserDefinedFeatures { public: @@ -108,13 +102,11 @@ private: ::com::sun::star::uno::WeakReference< XController > m_aController; }; -//-------------------------------------------------------------------------- UserDefinedFeatures::UserDefinedFeatures( const Reference< XController >& _rxController ) :m_aController( _rxController ) { } -//-------------------------------------------------------------------------- FeatureState UserDefinedFeatures::getState( const URL& /*_rFeatureURL*/ ) { // for now, enable all the time @@ -125,7 +117,6 @@ FeatureState UserDefinedFeatures::getState( const URL& /*_rFeatureURL*/ ) return aState; } -//-------------------------------------------------------------------------- void UserDefinedFeatures::execute( const URL& _rFeatureURL, const Sequence< PropertyValue>& _rArgs ) { try @@ -153,9 +144,7 @@ void UserDefinedFeatures::execute( const URL& _rFeatureURL, const Sequence< Prop } } -//========================================================================== -//= OGenericUnoController_Data -//========================================================================== +// OGenericUnoController_Data struct OGenericUnoController_Data { ::sfx2::UserInputInterception m_aUserInputInterception; @@ -168,11 +157,8 @@ struct OGenericUnoController_Data } }; -//========================================================================== -//= OGenericUnoController -//========================================================================== +// OGenericUnoController DBG_NAME(OGenericUnoController) -// ------------------------------------------------------------------------- OGenericUnoController::OGenericUnoController(const Reference< XComponentContext >& _rM) :OGenericUnoController_Base( getMutex() ) ,m_pView(NULL) @@ -235,14 +221,12 @@ OGenericUnoController::OGenericUnoController() #endif -// ----------------------------------------------------------------------------- OGenericUnoController::~OGenericUnoController() { DBG_DTOR(OGenericUnoController,NULL); } -// ----------------------------------------------------------------------------- sal_Bool OGenericUnoController::Construct(Window* /*pParent*/) { OSL_ENSURE( getView(), "the view is NULL!" ); @@ -271,18 +255,18 @@ sal_Bool OGenericUnoController::Construct(Window* /*pParent*/) return sal_True; } -//------------------------------------------------------------------------------ + IMPL_LINK_NOARG(OGenericUnoController, OnAsyncInvalidateAll) { if ( !OGenericUnoController_Base::rBHelper.bInDispose && !OGenericUnoController_Base::rBHelper.bDisposed ) InvalidateFeature_Impl(); return 0L; } -// ----------------------------------------------------------------------------- + void OGenericUnoController::impl_initialize() { } -// ------------------------------------------------------------------------- + void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArguments ) throw(Exception, RuntimeException) { SolarMutexGuard aSolarGuard; @@ -341,40 +325,35 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen } } -//------------------------------------------------------------------------------ void SAL_CALL OGenericUnoController::acquire( ) throw () { OGenericUnoController_Base::acquire(); } -//------------------------------------------------------------------------------ void SAL_CALL OGenericUnoController::release( ) throw () { OGenericUnoController_Base::release(); } -// ------------------------------------------------------------------------- void OGenericUnoController::startFrameListening( const Reference< XFrame >& _rxFrame ) { if ( _rxFrame.is() ) _rxFrame->addFrameActionListener( this ); } -// ------------------------------------------------------------------------- void OGenericUnoController::stopFrameListening( const Reference< XFrame >& _rxFrame ) { if ( _rxFrame.is() ) _rxFrame->removeFrameActionListener( this ); } -// ------------------------------------------------------------------------- void OGenericUnoController::disposing(const EventObject& Source) throw( RuntimeException ) { // our frame ? if ( Source.Source == getFrame() ) stopFrameListening( getFrame() ); } -//------------------------------------------------------------------------ + void OGenericUnoController::modified(const EventObject& aEvent) throw( RuntimeException ) { ::osl::MutexGuard aGuard( getMutex() ); @@ -389,19 +368,17 @@ void OGenericUnoController::modified(const EventObject& aEvent) throw( RuntimeEx InvalidateFeature(ID_BROWSER_SAVEDOC); InvalidateFeature(ID_BROWSER_UNDO); } -// ----------------------------------------------------------------------- + Reference< XWindow > SAL_CALL OGenericUnoController::getComponentWindow() throw (RuntimeException) { return VCLUnoHelper::GetInterface( getView() ); } -// ----------------------------------------------------------------------- OUString SAL_CALL OGenericUnoController::getViewControllerName() throw (::com::sun::star::uno::RuntimeException) { return OUString( "Default" ); } -// ----------------------------------------------------------------------- Sequence< PropertyValue > SAL_CALL OGenericUnoController::getCreationArguments() throw (RuntimeException) { // currently we do not support any creation args, so anything passed to XModel2::createViewController would be @@ -409,7 +386,6 @@ Sequence< PropertyValue > SAL_CALL OGenericUnoController::getCreationArguments() return Sequence< PropertyValue >(); } -// ----------------------------------------------------------------------- void OGenericUnoController::attachFrame( const Reference< XFrame >& _rxFrame ) throw( RuntimeException ) { SolarMutexGuard aSolarGuard; @@ -425,7 +401,6 @@ void OGenericUnoController::attachFrame( const Reference< XFrame >& _rxFrame ) t getView()->attachFrame( xFrame ); } -// ----------------------------------------------------------------------------- struct CommandCollector : public ::std::unary_function< SupportedFeatures::value_type, void> { sal_uInt16 m_nFeature; @@ -443,12 +418,10 @@ struct CommandCollector : public ::std::unary_function< SupportedFeatures::value } }; -// ----------------------------------------------------------------------- namespace { typedef ::std::vector< Any > States; - // ................................................................... void lcl_notifyMultipleStates( XStatusListener& _rListener, FeatureStateEvent& _rEvent, const States& _rStates ) { for ( States::const_iterator state = _rStates.begin(); @@ -461,7 +434,6 @@ namespace } } - // ................................................................... void lcl_collectStates( const FeatureState& _rFeatureState, States& _out_rStates ) { // order matters, due to a bug in framework which resets the check state when any non-boolean event @@ -483,7 +455,6 @@ namespace } } -// ----------------------------------------------------------------------- void OGenericUnoController::ImplBroadcastFeatureState(const OUString& _rFeature, const Reference< XStatusListener > & xListener, sal_Bool _bIgnoreCache) { sal_uInt16 nFeat = m_aSupportedFeatures[ _rFeature ].nFeatureId; @@ -549,7 +520,6 @@ void OGenericUnoController::ImplBroadcastFeatureState(const OUString& _rFeature, } -//------------------------------------------------------------------------------ sal_Bool OGenericUnoController::isFeatureSupported( sal_Int32 _nId ) { SupportedFeatures::iterator aFeaturePos = ::std::find_if( @@ -561,13 +531,11 @@ sal_Bool OGenericUnoController::isFeatureSupported( sal_Int32 _nId ) return ( m_aSupportedFeatures.end() != aFeaturePos && !aFeaturePos->first.isEmpty()); } -// ----------------------------------------------------------------------- void OGenericUnoController::InvalidateFeature(const OUString& _rURLPath, const Reference< XStatusListener > & _xListener, sal_Bool _bForceBroadcast) { ImplInvalidateFeature( m_aSupportedFeatures[ _rURLPath ].nFeatureId, _xListener, _bForceBroadcast ); } -// ----------------------------------------------------------------------------- void OGenericUnoController::InvalidateFeature_Impl() { #ifdef DBG_UTIL @@ -624,7 +592,6 @@ void OGenericUnoController::InvalidateFeature_Impl() #endif } -// ----------------------------------------------------------------------- void OGenericUnoController::ImplInvalidateFeature( sal_Int32 _nId, const Reference< XStatusListener >& _xListener, sal_Bool _bForceBroadcast ) { #if OSL_DEBUG_LEVEL > 0 @@ -655,22 +622,18 @@ void OGenericUnoController::ImplInvalidateFeature( sal_Int32 _nId, const Referen m_aAsyncInvalidateAll.Call(); } -// ----------------------------------------------------------------------- void OGenericUnoController::InvalidateFeature(sal_uInt16 _nId, const Reference< XStatusListener > & _xListener, sal_Bool _bForceBroadcast) { ImplInvalidateFeature( _nId, _xListener, _bForceBroadcast ); } -// ----------------------------------------------------------------------- void OGenericUnoController::InvalidateAll() { ImplInvalidateFeature( ALL_FEATURES, NULL, sal_True ); } -// ----------------------------------------------------------------------------- void OGenericUnoController::InvalidateAll_Impl() { - // --------------------------------- // invalidate all supported features for ( SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.begin(); @@ -688,7 +651,6 @@ void OGenericUnoController::InvalidateAll_Impl() } } -// ----------------------------------------------------------------------- Reference< XDispatch > OGenericUnoController::queryDispatch(const URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( RuntimeException ) { Reference< XDispatch > xReturn; @@ -716,7 +678,6 @@ Reference< XDispatch > OGenericUnoController::queryDispatch(const URL& aURL, co return xReturn; } -// ----------------------------------------------------------------------- Sequence< Reference< XDispatch > > OGenericUnoController::queryDispatches(const Sequence< DispatchDescriptor >& aDescripts) throw( RuntimeException ) { Sequence< Reference< XDispatch > > aReturn; @@ -737,31 +698,26 @@ Sequence< Reference< XDispatch > > OGenericUnoController::queryDispatches(const return aReturn; } -// ----------------------------------------------------------------------- Reference< XDispatchProvider > OGenericUnoController::getSlaveDispatchProvider(void) throw( RuntimeException ) { return m_xSlaveDispatcher; } -// ----------------------------------------------------------------------- void OGenericUnoController::setSlaveDispatchProvider(const Reference< XDispatchProvider > & _xNewProvider) throw( RuntimeException ) { m_xSlaveDispatcher = _xNewProvider; } -// ----------------------------------------------------------------------- Reference< XDispatchProvider > OGenericUnoController::getMasterDispatchProvider(void) throw( RuntimeException ) { return m_xMasterDispatcher; } -// ----------------------------------------------------------------------- void OGenericUnoController::setMasterDispatchProvider(const Reference< XDispatchProvider > & _xNewProvider) throw( RuntimeException ) { m_xMasterDispatcher = _xNewProvider; } -// ----------------------------------------------------------------------- void OGenericUnoController::dispatch(const URL& _aURL, const Sequence< PropertyValue >& aArgs) throw(RuntimeException) { SolarMutexGuard aSolarGuard; @@ -782,7 +738,6 @@ void OGenericUnoController::dispatch(const URL& _aURL, const Sequence< PropertyV executeChecked(_aURL,aArgs); } -// ----------------------------------------------------------------------- void OGenericUnoController::addStatusListener(const Reference< XStatusListener > & aListener, const URL& _rURL) throw(RuntimeException) { // parse the ULR now and here, this saves later parsing in each notification round @@ -798,7 +753,6 @@ void OGenericUnoController::addStatusListener(const Reference< XStatusListener > // force the new state to be broadcast to the new listener } -// ----------------------------------------------------------------------- void OGenericUnoController::removeStatusListener(const Reference< XStatusListener > & aListener, const URL& _rURL) throw(RuntimeException) { DispatchIterator iterSearch = m_arrStatusListener.begin(); @@ -842,7 +796,7 @@ void OGenericUnoController::removeStatusListener(const Reference< XStatusListene ::std::bind2nd(FindFeatureListener(),aListener)) ,m_aFeaturesToInvalidate.end()); } -// ----------------------------------------------------------------------------- + void OGenericUnoController::releaseNumberForComponent() { try @@ -856,7 +810,7 @@ void OGenericUnoController::releaseNumberForComponent() // NII } } -// ----------------------------------------------------------------------- + void OGenericUnoController::disposing() { { @@ -892,21 +846,18 @@ void OGenericUnoController::disposing() m_aInitParameters.clear(); } -// ----------------------------------------------------------------------------- void SAL_CALL OGenericUnoController::addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) { // disambiguate OGenericUnoController_Base::WeakComponentImplHelperBase::addEventListener( xListener ); } -// ----------------------------------------------------------------------------- void SAL_CALL OGenericUnoController::removeEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) { // disambiguate OGenericUnoController_Base::WeakComponentImplHelperBase::removeEventListener( xListener ); } -//------------------------------------------------------------------------------ void OGenericUnoController::frameAction(const FrameActionEvent& aEvent) throw( RuntimeException ) { ::osl::MutexGuard aGuard( getMutex() ); @@ -914,7 +865,6 @@ void OGenericUnoController::frameAction(const FrameActionEvent& aEvent) throw( R m_aCurrentFrame.frameAction( aEvent.Action ); } -//------------------------------------------------------------------------------ void OGenericUnoController::implDescribeSupportedFeature( const sal_Char* _pAsciiCommandURL, sal_uInt16 _nFeatureId, sal_Int16 _nCommandGroup ) { @@ -935,7 +885,6 @@ void OGenericUnoController::implDescribeSupportedFeature( const sal_Char* _pAsci m_aSupportedFeatures[ aFeature.Command ] = aFeature; } -//------------------------------------------------------------------------------ void OGenericUnoController::describeSupportedFeatures() { // add all supported features @@ -946,7 +895,6 @@ void OGenericUnoController::describeSupportedFeatures() implDescribeSupportedFeature( ".uno:DSBEditDoc", ID_BROWSER_EDITDOC, CommandGroup::DOCUMENT ); } -//------------------------------------------------------------------------------ FeatureState OGenericUnoController::GetState( sal_uInt16 _nId ) const { FeatureState aReturn; @@ -966,7 +914,6 @@ FeatureState OGenericUnoController::GetState( sal_uInt16 _nId ) const return aReturn; } -//------------------------------------------------------------------------------ void OGenericUnoController::Execute( sal_uInt16 _nId, const Sequence< PropertyValue>& _rArgs ) { OSL_ENSURE( isUserDefinedFeature( _nId ), @@ -977,7 +924,6 @@ void OGenericUnoController::Execute( sal_uInt16 _nId, const Sequence< PropertyVa m_pData->m_aUserDefinedFeatures.execute( getURLForId( _nId ), _rArgs ); } -//------------------------------------------------------------------------------ URL OGenericUnoController::getURLForId(sal_Int32 _nId) const { URL aReturn; @@ -998,13 +944,11 @@ URL OGenericUnoController::getURLForId(sal_Int32 _nId) const return aReturn; } -//------------------------------------------------------------------------- bool OGenericUnoController::isUserDefinedFeature( const sal_uInt16 _nFeatureId ) const { return ( _nFeatureId >= FIRST_USER_DEFINED_FEATURE ) && ( _nFeatureId < LAST_USER_DEFINED_FEATURE ); } -//------------------------------------------------------------------------- bool OGenericUnoController::isUserDefinedFeature( const OUString& _rFeatureURL ) const { SupportedFeatures::const_iterator pos = m_aSupportedFeatures.find( _rFeatureURL ); @@ -1014,7 +958,6 @@ bool OGenericUnoController::isUserDefinedFeature( const OUString& _rFeatureURL ) return ( pos != m_aSupportedFeatures.end() ) ? isUserDefinedFeature( pos->second.nFeatureId ) : false; } -//------------------------------------------------------------------------- sal_Bool SAL_CALL OGenericUnoController::supportsService(const OUString& ServiceName) throw(RuntimeException) { Sequence< OUString > aSupported(getSupportedServiceNames()); @@ -1027,7 +970,6 @@ sal_Bool SAL_CALL OGenericUnoController::supportsService(const OUString& Service return pArray != pArrayEnd; } -// ----------------------------------------------------------------------------- void OGenericUnoController::startConnectionListening(const Reference< XConnection >& _rxConnection) { // we have to remove ourself before dispoing the connection @@ -1036,7 +978,6 @@ void OGenericUnoController::startConnectionListening(const Reference< XConnectio xComponent->addEventListener(static_cast<XFrameActionListener*>(this)); } -// ----------------------------------------------------------------------------- void OGenericUnoController::stopConnectionListening(const Reference< XConnection >& _rxConnection) { // we have to remove ourself before dispoing the connection @@ -1044,7 +985,7 @@ void OGenericUnoController::stopConnectionListening(const Reference< XConnection if (xComponent.is()) xComponent->removeEventListener(static_cast<XFrameActionListener*>(this)); } -// ----------------------------------------------------------------------------- + Reference< XConnection > OGenericUnoController::connect( const Reference< XDataSource>& _xDataSource, ::dbtools::SQLExceptionInfo* _pErrorInfo ) { @@ -1056,7 +997,7 @@ Reference< XConnection > OGenericUnoController::connect( const Reference< XDataS return xConnection; } -// ----------------------------------------------------------------------------- + Reference< XConnection > OGenericUnoController::connect( const OUString& _rDataSourceName, const OUString& _rContextInformation, ::dbtools::SQLExceptionInfo* _pErrorInfo ) { @@ -1069,12 +1010,11 @@ Reference< XConnection > OGenericUnoController::connect( const OUString& _rDataS return xConnection; } -// ----------------------------------------------------------------------------- void OGenericUnoController::showError(const SQLExceptionInfo& _rInfo) { ::dbaui::showError(_rInfo,getView(),getORB()); } -// ----------------------------------------------------------------------------- + Reference< XLayoutManager > OGenericUnoController::getLayoutManager(const Reference< XFrame >& _xFrame) const { Reference< XPropertySet > xPropSet( _xFrame, UNO_QUERY ); @@ -1091,7 +1031,7 @@ Reference< XLayoutManager > OGenericUnoController::getLayoutManager(const Refere } return xLayoutManager; } -// ----------------------------------------------------------------------------- + void OGenericUnoController::loadMenu(const Reference< XFrame >& _xFrame) { Reference< XLayoutManager > xLayoutManager = getLayoutManager(_xFrame); @@ -1107,18 +1047,16 @@ void OGenericUnoController::loadMenu(const Reference< XFrame >& _xFrame) onLoadedMenu( xLayoutManager ); } -// ----------------------------------------------------------------------------- void OGenericUnoController::onLoadedMenu(const Reference< XLayoutManager >& /*_xLayoutManager*/) { // not interested in } -// ----------------------------------------------------------------------------- void OGenericUnoController::closeTask() { m_aAsyncCloseTask.Call(); } -// ----------------------------------------------------------------------------- + IMPL_LINK_NOARG(OGenericUnoController, OnAsyncCloseTask) { if ( !OGenericUnoController_Base::rBHelper.bInDispose ) @@ -1135,42 +1073,38 @@ IMPL_LINK_NOARG(OGenericUnoController, OnAsyncCloseTask) } return 0L; } -// ----------------------------------------------------------------------------- + Any SAL_CALL OGenericUnoController::getViewData(void) throw( RuntimeException ) { return Any(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OGenericUnoController::restoreViewData(const Any& /*Data*/) throw( RuntimeException ) { } -// ----------------------------------------------------------------------------- Reference< XModel > SAL_CALL OGenericUnoController::getModel(void) throw( RuntimeException ) { return Reference< XModel >(); } -// ----------------------------------------------------------------------------- Reference< XFrame > SAL_CALL OGenericUnoController::getFrame(void) throw( RuntimeException ) { ::osl::MutexGuard aGuard( getMutex() ); return m_aCurrentFrame.getFrame(); } -// ----------------------------------------------------------------------------- sal_Bool SAL_CALL OGenericUnoController::attachModel(const Reference< XModel > & /*xModel*/) throw( RuntimeException ) { SAL_WARN("dbaccess.ui", "OGenericUnoController::attachModel: not supported!" ); return sal_False; } -// ----------------------------------------------------------------------------- void OGenericUnoController::executeUnChecked(sal_uInt16 _nCommandId, const Sequence< PropertyValue >& aArgs) { Execute(_nCommandId, aArgs); } -// ----------------------------------------------------------------------------- + void OGenericUnoController::executeUnChecked(const util::URL& _rCommand, const Sequence< PropertyValue >& aArgs) { OSL_PRECOND( !m_aSupportedFeatures.empty(), "OGenericUnoController::executeUnChecked: shouldn't this be filled at construction time?" ); @@ -1181,7 +1115,7 @@ void OGenericUnoController::executeUnChecked(const util::URL& _rCommand, const S if (aIter != m_aSupportedFeatures.end()) Execute( aIter->second.nFeatureId, aArgs ); } -// ----------------------------------------------------------------------------- + void OGenericUnoController::executeChecked(const util::URL& _rCommand, const Sequence< PropertyValue >& aArgs) { OSL_PRECOND( !m_aSupportedFeatures.empty(), "OGenericUnoController::executeChecked: shouldn't this be filled at construction time?" ); @@ -1196,8 +1130,7 @@ void OGenericUnoController::executeChecked(const util::URL& _rCommand, const Seq Execute( nFeatureId, aArgs ); } } -// ----------------------------------------------------------------------------- -//------------------------------------------------------------------------------ + namespace { OUString lcl_getModuleHelpModuleName( const Reference< XFrame >& _rxFrame ) @@ -1308,8 +1241,6 @@ namespace } } -// ----------------------------------------------------------------------------- - void OGenericUnoController::openHelpAgent(OUString const& _suHelpStringURL ) { OUString suURL(_suHelpStringURL); @@ -1353,7 +1284,7 @@ void OGenericUnoController::openHelpAgent( const URL& _rURL ) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + Reference< awt::XWindow> OGenericUnoController::getTopMostContainerWindow() const { Reference< ::com::sun::star::awt::XWindow> xWindow; @@ -1373,7 +1304,7 @@ Reference< awt::XWindow> OGenericUnoController::getTopMostContainerWindow() cons } return xWindow; } -// ----------------------------------------------------------------------------- + Reference< XTitle > OGenericUnoController::impl_getTitleHelper_throw() { SolarMutexGuard aSolarGuard; @@ -1394,7 +1325,6 @@ Reference< XTitle > OGenericUnoController::impl_getTitleHelper_throw() return m_xTitleHelper; } -//============================================================================= // XTitle OUString SAL_CALL OGenericUnoController::getTitle() throw (RuntimeException) @@ -1405,7 +1335,6 @@ OUString SAL_CALL OGenericUnoController::getTitle() return getPrivateTitle() + impl_getTitleHelper_throw()->getTitle (); } -//============================================================================= // XTitle void SAL_CALL OGenericUnoController::setTitle(const OUString& sTitle) throw (RuntimeException) @@ -1416,7 +1345,6 @@ void SAL_CALL OGenericUnoController::setTitle(const OUString& sTitle) impl_getTitleHelper_throw()->setTitle (sTitle); } -//============================================================================= // XTitleChangeBroadcaster void SAL_CALL OGenericUnoController::addTitleChangeListener(const Reference< XTitleChangeListener >& xListener) throw (RuntimeException) @@ -1426,7 +1354,6 @@ void SAL_CALL OGenericUnoController::addTitleChangeListener(const Reference< XTi xBroadcaster->addTitleChangeListener (xListener); } -// ----------------------------------------------------------------------------- void SAL_CALL OGenericUnoController::removeTitleChangeListener(const Reference< XTitleChangeListener >& xListener) throw (RuntimeException) { @@ -1435,49 +1362,40 @@ void SAL_CALL OGenericUnoController::removeTitleChangeListener(const Reference< xBroadcaster->removeTitleChangeListener (xListener); } -// ============================================================================= // XUserInputInterception -// ----------------------------------------------------------------------------- void SAL_CALL OGenericUnoController::addKeyHandler( const Reference< XKeyHandler >& _rxHandler ) throw (RuntimeException) { if ( _rxHandler.is() ) m_pData->m_aUserInputInterception.addKeyHandler( _rxHandler ); } -// ----------------------------------------------------------------------------- void SAL_CALL OGenericUnoController::removeKeyHandler( const Reference< XKeyHandler >& _rxHandler ) throw (RuntimeException) { m_pData->m_aUserInputInterception.removeKeyHandler( _rxHandler ); } -// ----------------------------------------------------------------------------- void SAL_CALL OGenericUnoController::addMouseClickHandler( const Reference< XMouseClickHandler >& _rxHandler ) throw (RuntimeException) { if ( _rxHandler.is() ) m_pData->m_aUserInputInterception.addMouseClickHandler( _rxHandler ); } -// ----------------------------------------------------------------------------- void SAL_CALL OGenericUnoController::removeMouseClickHandler( const Reference< XMouseClickHandler >& _rxHandler ) throw (RuntimeException) { m_pData->m_aUserInputInterception.removeMouseClickHandler( _rxHandler ); } -// ============================================================================= -// ----------------------------------------------------------------------------- void OGenericUnoController::executeChecked(sal_uInt16 _nCommandId, const Sequence< PropertyValue >& aArgs) { if ( isCommandEnabled(_nCommandId) ) Execute(_nCommandId, aArgs); } -// ----------------------------------------------------------------------------- sal_Bool OGenericUnoController::isCommandEnabled(sal_uInt16 _nCommandId) const { return GetState( _nCommandId ).bEnabled; } -// ----------------------------------------------------------------------------- sal_uInt16 OGenericUnoController::registerCommandURL( const OUString& _rCompleteCommandURL ) { if ( _rCompleteCommandURL.isEmpty() ) @@ -1506,37 +1424,32 @@ sal_uInt16 OGenericUnoController::registerCommandURL( const OUString& _rComplete return nFeatureId; } -// ----------------------------------------------------------------------------- void OGenericUnoController::notifyHiContrastChanged() { } -// ----------------------------------------------------------------------------- sal_Bool OGenericUnoController::isDataSourceReadOnly() const { return sal_False; } -// ----------------------------------------------------------------------------- Reference< XController > OGenericUnoController::getXController() throw( RuntimeException ) { return this; } -// ----------------------------------------------------------------------------- bool OGenericUnoController::interceptUserInput( const NotifyEvent& _rEvent ) { return m_pData->m_aUserInputInterception.handleNotifyEvent( _rEvent ); } -// ----------------------------------------------------------------------------- sal_Bool OGenericUnoController::isCommandChecked(sal_uInt16 _nCommandId) const { FeatureState aState = GetState( _nCommandId ); return aState.bChecked && (sal_Bool)*aState.bChecked; } -// ----------------------------------------------------------------------------- + sal_Bool OGenericUnoController::isCommandEnabled( const OUString& _rCompleteCommandURL ) const { OSL_ENSURE( !_rCompleteCommandURL.isEmpty(), "OGenericUnoController::isCommandEnabled: Empty command url!" ); @@ -1549,7 +1462,6 @@ sal_Bool OGenericUnoController::isCommandEnabled( const OUString& _rCompleteComm return bIsEnabled; } -// ----------------------------------------------------------------------------- Sequence< ::sal_Int16 > SAL_CALL OGenericUnoController::getSupportedCommandGroups() throw (RuntimeException) { CommandHashMap aCmdHashMap; @@ -1580,7 +1492,6 @@ namespace }; } -// ----------------------------------------------------------------------------- Sequence< DispatchInformation > SAL_CALL OGenericUnoController::getConfigurableDispatchInformation( ::sal_Int16 CommandGroup ) throw (RuntimeException) { DispatchInfoList aInformationList; @@ -1606,25 +1517,24 @@ Sequence< DispatchInformation > SAL_CALL OGenericUnoController::getConfigurableD return aInformation; } -// ----------------------------------------------------------------------------- + void OGenericUnoController::fillSupportedFeatures() { #ifdef DBG_UTIL m_bDescribingSupportedFeatures = true; #endif describeSupportedFeatures(); -// ----------------------------------------------------------------------------- #ifdef DBG_UTIL m_bDescribingSupportedFeatures = false; #endif } - void SAL_CALL OGenericUnoController::dispose() throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aSolarGuard; OGenericUnoController_Base::dispose(); } + } // namespace dbaui /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index f4b59c71b9ed..f7ef34c06c8f 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "sbagrid.hrc" #include <svx/svxids.hrc> @@ -105,37 +104,29 @@ extern "C" void SAL_CALL createRegistryInfo_SbaXGridControl() { static OMultiInstanceAutoRegistration< SbaXGridControl > aAutoRegistration; } -//------------------------------------------------------------------------- + ::comphelper::StringSequence SAL_CALL SbaXGridControl::getSupportedServiceNames() throw() { return getSupportedServiceNames_Static(); } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL SbaXGridControl::Create(const Reference<XMultiServiceFactory >& _rxFactory) { return *(new SbaXGridControl( comphelper::getComponentContext(_rxFactory) )); } -//------------------------------------------------------------------ - -//------------------------------------------------------------------ -//======================================================================================= // SbaXGridControl -//======================================================================================= -//------------------------------------------------------------------------------ OUString SAL_CALL SbaXGridControl::getImplementationName() throw() { return getImplementationName_Static(); } -//------------------------------------------------------------------------------ OUString SbaXGridControl::getImplementationName_Static() throw( RuntimeException ) { return OUString("com.sun.star.comp.dbu.SbaXGridControl"); } -//------------------------------------------------------------------------------ Sequence< OUString> SbaXGridControl::getSupportedServiceNames_Static(void) throw( RuntimeException ) { Sequence< OUString> aSupported(3); @@ -144,21 +135,19 @@ Sequence< OUString> SbaXGridControl::getSupportedServiceNames_Static(void) throw aSupported[2] = OUString("com.sun.star.awt.UnoControl"); return aSupported; } + DBG_NAME(SbaXGridControl ); -//--------------------------------------------------------------------------------------- SbaXGridControl::SbaXGridControl(const Reference< XComponentContext >& _rM) : FmXGridControl(_rM) { DBG_CTOR(SbaXGridControl ,NULL); } -//--------------------------------------------------------------------------------------- SbaXGridControl::~SbaXGridControl() { DBG_DTOR(SbaXGridControl ,NULL); } -//--------------------------------------------------------------------------------------- FmXGridPeer* SbaXGridControl::imp_CreatePeer(Window* pParent) { FmXGridPeer* pReturn = new SbaXGridPeer(m_xContext); @@ -183,14 +172,12 @@ FmXGridPeer* SbaXGridControl::imp_CreatePeer(Window* pParent) return pReturn; } -//------------------------------------------------------------------------------ Any SAL_CALL SbaXGridControl::queryInterface(const Type& _rType) throw (RuntimeException) { Any aRet = FmXGridControl::queryInterface(_rType); return aRet.hasValue() ? aRet : ::cppu::queryInterface(_rType,(::com::sun::star::frame::XDispatch*)this); } -//------------------------------------------------------------------------------ Sequence< Type > SAL_CALL SbaXGridControl::getTypes( ) throw (RuntimeException) { Sequence< Type > aTypes = FmXGridControl::getTypes(); @@ -202,7 +189,6 @@ Sequence< Type > SAL_CALL SbaXGridControl::getTypes( ) throw (RuntimeException) return aTypes; } -//------------------------------------------------------------------------------ Sequence< sal_Int8 > SAL_CALL SbaXGridControl::getImplementationId( ) throw (RuntimeException) { static ::cppu::OImplementationId * pId = 0; @@ -218,7 +204,6 @@ Sequence< sal_Int8 > SAL_CALL SbaXGridControl::getImplementationId( ) throw (Ru return pId->getImplementationId(); } -//--------------------------------------------------------------------------------------- void SAL_CALL SbaXGridControl::createPeer(const Reference< ::com::sun::star::awt::XToolkit > & rToolkit, const Reference< ::com::sun::star::awt::XWindowPeer > & rParentPeer) throw( RuntimeException ) { FmXGridControl::createPeer(rToolkit, rParentPeer); @@ -238,14 +223,13 @@ void SAL_CALL SbaXGridControl::createPeer(const Reference< ::com::sun::star::awt } } -//--------------------------------------------------------------------------------------- void SAL_CALL SbaXGridControl::dispatch(const ::com::sun::star::util::URL& aURL, const Sequence< PropertyValue >& aArgs) throw( RuntimeException ) { Reference< ::com::sun::star::frame::XDispatch > xDisp(getPeer(), UNO_QUERY); if (xDisp.is()) xDisp->dispatch(aURL, aArgs); } -//--------------------------------------------------------------------------------------- + void SAL_CALL SbaXGridControl::addStatusListener( const Reference< XStatusListener > & _rxListener, const URL& _rURL ) throw( RuntimeException ) { ::osl::MutexGuard aGuard( GetMutex() ); @@ -274,7 +258,6 @@ void SAL_CALL SbaXGridControl::addStatusListener( const Reference< XStatusListen } } -//--------------------------------------------------------------------------------------- void SAL_CALL SbaXGridControl::removeStatusListener(const Reference< ::com::sun::star::frame::XStatusListener > & _rxListener, const ::com::sun::star::util::URL& _rURL) throw( RuntimeException ) { ::osl::MutexGuard aGuard( GetMutex() ); @@ -294,7 +277,6 @@ void SAL_CALL SbaXGridControl::removeStatusListener(const Reference< ::com::sun: pMultiplexer->removeInterface( _rxListener ); } -//--------------------------------------------------------------------------------------- void SAL_CALL SbaXGridControl::dispose(void) throw( RuntimeException ) { SolarMutexGuard aGuard; @@ -318,11 +300,8 @@ void SAL_CALL SbaXGridControl::dispose(void) throw( RuntimeException ) FmXGridControl::dispose(); } -//======================================================================================= // SbaXGridPeer -//======================================================================================= DBG_NAME(SbaXGridPeer ) -//--------------------------------------------------------------------------------------- SbaXGridPeer::SbaXGridPeer(const Reference< XComponentContext >& _rM) : FmXGridPeer(_rM) ,m_aStatusListeners(m_aMutex) @@ -330,13 +309,11 @@ SbaXGridPeer::SbaXGridPeer(const Reference< XComponentContext >& _rM) DBG_CTOR(SbaXGridPeer ,NULL); } -//--------------------------------------------------------------------------------------- SbaXGridPeer::~SbaXGridPeer() { DBG_DTOR(SbaXGridPeer ,NULL); } -//--------------------------------------------------------------------------------------- void SAL_CALL SbaXGridPeer::dispose(void) throw( RuntimeException ) { EventObject aEvt(*this); @@ -346,7 +323,6 @@ void SAL_CALL SbaXGridPeer::dispose(void) throw( RuntimeException ) FmXGridPeer::dispose(); } -//--------------------------------------------------------------------------------------- void SbaXGridPeer::NotifyStatusChanged(const ::com::sun::star::util::URL& _rUrl, const Reference< ::com::sun::star::frame::XStatusListener > & xControl) { SbaGridControl* pGrid = (SbaGridControl*) GetWindow(); @@ -379,7 +355,6 @@ void SbaXGridPeer::NotifyStatusChanged(const ::com::sun::star::util::URL& _rUrl, } } -//------------------------------------------------------------------------------ Any SAL_CALL SbaXGridPeer::queryInterface(const Type& _rType) throw (RuntimeException) { Any aRet = ::cppu::queryInterface(_rType,(::com::sun::star::frame::XDispatch*)this); @@ -388,7 +363,6 @@ Any SAL_CALL SbaXGridPeer::queryInterface(const Type& _rType) throw (RuntimeExce return FmXGridPeer::queryInterface(_rType); } -//--------------------------------------------------------------------------------------- Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaXGridPeer::queryDispatch(const ::com::sun::star::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( RuntimeException ) { if ( ( aURL.Complete == ".uno:GridSlots/BrowserAttribs" ) || ( aURL.Complete == ".uno:GridSlots/RowHeight" ) @@ -401,7 +375,6 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaXGridPeer::queryDis return FmXGridPeer::queryDispatch(aURL, aTargetFrameName, nSearchFlags); } -//--------------------------------------------------------------------------------------- IMPL_LINK( SbaXGridPeer, OnDispatchEvent, void*, /*NOTINTERESTEDIN*/ ) { SbaGridControl* pGrid = static_cast< SbaGridControl* >( GetWindow() ); @@ -425,7 +398,6 @@ IMPL_LINK( SbaXGridPeer, OnDispatchEvent, void*, /*NOTINTERESTEDIN*/ ) return 0; } -//--------------------------------------------------------------------------------------- SbaXGridPeer::DispatchType SbaXGridPeer::classifyDispatchURL( const URL& _rURL ) { DispatchType eURLType = dtUnknown; @@ -440,7 +412,6 @@ SbaXGridPeer::DispatchType SbaXGridPeer::classifyDispatchURL( const URL& _rURL ) return eURLType; } -//--------------------------------------------------------------------------------------- void SAL_CALL SbaXGridPeer::dispatch(const URL& aURL, const Sequence< PropertyValue >& aArgs) throw( RuntimeException ) { SbaGridControl* pGrid = (SbaGridControl*)GetWindow(); @@ -539,7 +510,6 @@ void SAL_CALL SbaXGridPeer::dispatch(const URL& aURL, const Sequence< PropertyVa } } -//--------------------------------------------------------------------------------------- void SAL_CALL SbaXGridPeer::addStatusListener(const Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( RuntimeException ) { ::cppu::OInterfaceContainerHelper* pCont = m_aStatusListeners.getContainer(aURL); @@ -550,7 +520,6 @@ void SAL_CALL SbaXGridPeer::addStatusListener(const Reference< ::com::sun::star: NotifyStatusChanged(aURL, xControl); } -//--------------------------------------------------------------------------------------- void SAL_CALL SbaXGridPeer::removeStatusListener(const Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( RuntimeException ) { ::cppu::OInterfaceContainerHelper* pCont = m_aStatusListeners.getContainer(aURL); @@ -579,7 +548,6 @@ Sequence< Type > SAL_CALL SbaXGridPeer::getTypes() throw (RuntimeException) } // return implementation specific data -//------------------------------------------------------------------ sal_Int64 SAL_CALL SbaXGridPeer::getSomething( const Sequence< sal_Int8 > & rId ) throw(::com::sun::star::uno::RuntimeException) { if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) @@ -588,7 +556,6 @@ sal_Int64 SAL_CALL SbaXGridPeer::getSomething( const Sequence< sal_Int8 > & rId return FmXGridPeer::getSomething(rId); } -//--------------------------------------------------------------------------------------- SbaXGridPeer* SbaXGridPeer::getImplementation(const Reference< XInterface >& _rxIFace) { Reference< XUnoTunnel > xTunnel( @@ -598,24 +565,19 @@ SbaXGridPeer* SbaXGridPeer::getImplementation(const Reference< XInterface >& _rx return NULL; } -//--------------------------------------------------------------------------------------- FmGridControl* SbaXGridPeer::imp_CreateControl(Window* pParent, WinBits nStyle) { return new SbaGridControl( m_xContext, pParent, this, nStyle); } -//================================================================== // SbaGridHeader -//================================================================== -//--------------------------------------------------------------------------------------- SbaGridHeader::SbaGridHeader(BrowseBox* pParent, WinBits nWinBits) :FmGridHeader(pParent, nWinBits) ,DragSourceHelper(this) { } -//--------------------------------------------------------------------------------------- void SbaGridHeader::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) { SolarMutexGuard aGuard; @@ -624,7 +586,6 @@ void SbaGridHeader::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) ImplStartColumnDrag( _nAction, _rPosPixel ); } -//--------------------------------------------------------------------------------------- void SbaGridHeader::MouseButtonDown( const MouseEvent& _rMEvt ) { if (_rMEvt.IsLeft()) @@ -638,7 +599,6 @@ void SbaGridHeader::MouseButtonDown( const MouseEvent& _rMEvt ) FmGridHeader::MouseButtonDown(_rMEvt); } -//--------------------------------------------------------------------------------------- sal_Bool SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMousePos) { sal_uInt16 nId = GetItemId(_rMousePos); @@ -672,7 +632,6 @@ sal_Bool SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMo return sal_False; } -//--------------------------------------------------------------------------------------- void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMenu) { FmGridHeader::PreExecuteColumnContextMenu(nColId, rMenu); @@ -730,7 +689,6 @@ void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rM } } -//--------------------------------------------------------------------------------------- void SbaGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMenu& rMenu, sal_uInt16 nExecutionResult) { switch (nExecutionResult) @@ -762,11 +720,8 @@ void SbaGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupM } } -//================================================================== // SbaGridControl -//================================================================== DBG_NAME(SbaGridControl ); -//--------------------------------------------------------------------------------------- SbaGridControl::SbaGridControl(Reference< XComponentContext > _rM, Window* pParent, FmXGridPeer* _pPeer, WinBits nBits) :FmGridControl(_rM,pParent, _pPeer, nBits) @@ -778,7 +733,6 @@ SbaGridControl::SbaGridControl(Reference< XComponentContext > _rM, DBG_CTOR(SbaGridControl ,NULL); } -//--------------------------------------------------------------------------------------- SbaGridControl::~SbaGridControl() { DBG_DTOR(SbaGridControl ,NULL); @@ -786,13 +740,11 @@ SbaGridControl::~SbaGridControl() Application::RemoveUserEvent(m_nAsyncDropEvent); } -//--------------------------------------------------------------------------------------- BrowserHeader* SbaGridControl::imp_CreateHeaderBar(BrowseBox* pParent) { return new SbaGridHeader(pParent); } -//--------------------------------------------------------------------------------------- CellController* SbaGridControl::GetController(long nRow, sal_uInt16 nCol) { if ( m_bActivatingForDrop ) @@ -801,7 +753,6 @@ CellController* SbaGridControl::GetController(long nRow, sal_uInt16 nCol) return FmGridControl::GetController(nRow, nCol); } -//--------------------------------------------------------------------------------------- void SbaGridControl::PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu) { FmGridControl::PreExecuteRowContextMenu(nRow, rMenu); @@ -828,7 +779,6 @@ void SbaGridControl::PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu) } } -//------------------------------------------------------------------------------ SvNumberFormatter* SbaGridControl::GetDatasourceFormatter() { Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier = ::dbtools::getNumberFormats(::dbtools::getConnection(Reference< XRowSet > (getDataSource(),UNO_QUERY)), sal_True, getContext()); @@ -841,7 +791,6 @@ SvNumberFormatter* SbaGridControl::GetDatasourceFormatter() return pFormatter; } -//------------------------------------------------------------------------------ void SbaGridControl::SetColWidth(sal_uInt16 nColId) { // get the (UNO) column model @@ -876,7 +825,6 @@ void SbaGridControl::SetColWidth(sal_uInt16 nColId) } } -//------------------------------------------------------------------------------ void SbaGridControl::SetRowHeight() { Reference< XPropertySet > xCols(GetPeer()->getColumns(), UNO_QUERY); @@ -917,7 +865,6 @@ void SbaGridControl::SetRowHeight() } } -//------------------------------------------------------------------------------ void SbaGridControl::SetColAttrs(sal_uInt16 nColId) { SvNumberFormatter* pFormatter = GetDatasourceFormatter(); @@ -937,8 +884,6 @@ void SbaGridControl::SetColAttrs(sal_uInt16 nColId) ::dbaui::callColumnFormatDialog(xAffectedCol,xField,pFormatter,this);//(Window::GetSettings().GetLanguage()); } - -//------------------------------------------------------------------------------ void SbaGridControl::SetBrowserAttrs() { Reference< XPropertySet > xGridModel(GetPeer()->getColumns(), UNO_QUERY); @@ -957,7 +902,6 @@ void SbaGridControl::SetBrowserAttrs() } } -//--------------------------------------------------------------------------------------- void SbaGridControl::PostExecuteRowContextMenu(sal_uInt16 nRow, const PopupMenu& rMenu, sal_uInt16 nExecutionResult) { switch (nExecutionResult) @@ -978,7 +922,6 @@ void SbaGridControl::PostExecuteRowContextMenu(sal_uInt16 nRow, const PopupMenu& } } -//--------------------------------------------------------------------------------------- void SbaGridControl::Select() { // Some selection has changed ... @@ -988,13 +931,11 @@ void SbaGridControl::Select() m_pMasterListener->SelectionChanged(); } -//--------------------------------------------------------------------------------------- void SbaGridControl::CursorMoved() { FmGridControl::CursorMoved(); } -//--------------------------------------------------------------------------------------- void SbaGridControl::ActivateCell(long nRow, sal_uInt16 nCol, sal_Bool bSetCellFocus /*= sal_True*/ ) { FmGridControl::ActivateCell(nRow, nCol, bSetCellFocus); @@ -1002,7 +943,6 @@ void SbaGridControl::ActivateCell(long nRow, sal_uInt16 nCol, sal_Bool bSetCellF m_pMasterListener->CellActivated(); } -//--------------------------------------------------------------------------------------- void SbaGridControl::DeactivateCell(sal_Bool bUpdate /*= sal_True*/) { FmGridControl::DeactivateCell(bUpdate); @@ -1010,35 +950,30 @@ void SbaGridControl::DeactivateCell(sal_Bool bUpdate /*= sal_True*/) m_pMasterListener->CellDeactivated(); } -//--------------------------------------------------------------------------------------- void SbaGridControl::onRowChange() { if ( m_pMasterListener ) m_pMasterListener->RowChanged(); } -//--------------------------------------------------------------------------------------- void SbaGridControl::onColumnChange() { if ( m_pMasterListener ) m_pMasterListener->ColumnChanged(); } -//--------------------------------------------------------------------------------------- void SbaGridControl::BeforeDrop() { if (m_pMasterListener) m_pMasterListener->BeforeDrop(); } -//--------------------------------------------------------------------------------------- + void SbaGridControl::AfterDrop() { if (m_pMasterListener) m_pMasterListener->AfterDrop(); } - -//------------------------------------------------------------------------------ Reference< XPropertySet > SbaGridControl::getField(sal_uInt16 nModelPos) { Reference< XPropertySet > xEmptyReturn; @@ -1063,7 +998,6 @@ Reference< XPropertySet > SbaGridControl::getField(sal_uInt16 nModelPos) return xEmptyReturn; } -//--------------------------------------------------------------------------------------- sal_Bool SbaGridControl::IsReadOnlyDB() const { // assume yes if anything fails @@ -1090,7 +1024,6 @@ sal_Bool SbaGridControl::IsReadOnlyDB() const return bDBIsReadOnly; } -//--------------------------------------------------------------------------------------- void SbaGridControl::MouseButtonDown( const BrowserMouseEvent& rMEvt) { long nRow = GetRowAtYPosPixel(rMEvt.GetPosPixel().Y()); @@ -1106,7 +1039,6 @@ void SbaGridControl::MouseButtonDown( const BrowserMouseEvent& rMEvt) FmGridControl::MouseButtonDown(rMEvt); } -//--------------------------------------------------------------------------------------- void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) { SolarMutexGuard aGuard; @@ -1200,13 +1132,11 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) FmGridControl::StartDrag(_nAction, _rPosPixel); } -//------------------------------------------------------------------------------ void SbaGridControl::Command(const CommandEvent& rEvt) { FmGridControl::Command(rEvt); } -// ----------------------------------------------------------------------- void SbaGridControl::DoColumnDrag(sal_uInt16 nColumnPos) { Reference< XPropertySet > xDataSource(getDataSource(), UNO_QUERY); @@ -1243,20 +1173,17 @@ void SbaGridControl::DoColumnDrag(sal_uInt16 nColumnPos) pDataTransfer->StartDrag(this, DND_ACTION_COPY | DND_ACTION_LINK); } -// ----------------------------------------------------------------------- void SbaGridControl::CopySelectedRowsToClipboard() { OSL_ENSURE( GetSelectRowCount() > 0, "SbaGridControl::CopySelectedRowsToClipboard: invalid call!" ); implTransferSelectedRows( (sal_Int16)FirstSelectedRow(), true ); } -// ----------------------------------------------------------------------- void SbaGridControl::DoRowDrag( sal_Int16 nRowPos ) { implTransferSelectedRows( nRowPos, false ); } -// ----------------------------------------------------------------------- void SbaGridControl::implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfClipboardFalseIfDrag ) { Reference< XPropertySet > xForm( getDataSource(), UNO_QUERY ); @@ -1295,7 +1222,6 @@ void SbaGridControl::implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfC } } -// ----------------------------------------------------------------------- void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos) { // the only thing to do here is dragging the pure cell text @@ -1321,6 +1247,7 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos) } } + /// unary_function Functor object for class ZZ returntype is void struct SbaGridControlPrec : ::std::unary_function<DataFlavorExVector::value_type,bool> { @@ -1342,7 +1269,6 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos) return false; } }; -//------------------------------------------------------------------------------ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) { sal_Int8 nAction = DND_ACTION_NONE; @@ -1438,7 +1364,6 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) return (DND_ACTION_NONE != nAction) ? nAction : FmGridControl::AcceptDrop(rEvt); } -//------------------------------------------------------------------------------ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt ) { // we need some properties of our data source @@ -1508,7 +1433,6 @@ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt ) return DND_ACTION_NONE; } -//------------------------------------------------------------------------------ Reference< XPropertySet > SbaGridControl::getDataSource() const { Reference< XPropertySet > xReturn; @@ -1520,7 +1444,7 @@ Reference< XPropertySet > SbaGridControl::getDataSource() const return xReturn; } -// ----------------------------------------------------------------------------- + IMPL_LINK(SbaGridControl, AsynchDropEvent, void*, /*EMPTY_ARG*/) { m_nAsyncDropEvent = 0; @@ -1567,7 +1491,7 @@ IMPL_LINK(SbaGridControl, AsynchDropEvent, void*, /*EMPTY_ARG*/) return 0L; } -// ------------------------------------------------------------------------- + OUString SbaGridControl::GetAccessibleObjectDescription( ::svt::AccessibleBrowseBoxObjType eObjType,sal_Int32 _nPosition) const { OUString sRet; @@ -1580,11 +1504,10 @@ OUString SbaGridControl::GetAccessibleObjectDescription( ::svt::AccessibleBrowse sRet = FmGridControl::GetAccessibleObjectDescription( eObjType,_nPosition); return sRet; } -// ----------------------------------------------------------------------------- + void SbaGridControl::DeleteSelectedRows() { FmGridControl::DeleteSelectedRows(); } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/sbamultiplex.cxx b/dbaccess/source/ui/browser/sbamultiplex.cxx index 00ff65d0d007..1f4e91ed60fd 100644 --- a/dbaccess/source/ui/browser/sbamultiplex.cxx +++ b/dbaccess/source/ui/browser/sbamultiplex.cxx @@ -17,13 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "sbamultiplex.hxx" using namespace dbaui; -//================================================================== // the listener multiplexers -//================================================================== // XStatusListener IMPLEMENT_LISTENER_MULTIPLEXER_CORE(SbaXStatusMultiplexer, ::com::sun::star::frame::XStatusListener) diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 57634c90e89e..84e0d7b59794 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "browserids.hxx" #include "dbaccess_helpid.hrc" #include "dbexchange.hxx" @@ -153,23 +152,18 @@ using namespace ::dbtools; using namespace ::comphelper; using namespace ::svx; -// ......................................................................... namespace dbaui { -// ......................................................................... namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject; namespace DatabaseObjectContainer = ::com::sun::star::sdb::application::DatabaseObjectContainer; -//================================================================== -//= SbaTableQueryBrowser -//================================================================== -// ------------------------------------------------------------------------- +// SbaTableQueryBrowser extern "C" void SAL_CALL createRegistryInfo_OBrowser() { static OMultiInstanceAutoRegistration< SbaTableQueryBrowser > aAutoRegistration; } -// ------------------------------------------------------------------------- + void SafeAddPropertyListener(const Reference< XPropertySet > & xSet, const OUString& rPropName, XPropertyChangeListener* pListener) { Reference< XPropertySetInfo > xInfo = xSet->getPropertySetInfo(); @@ -177,36 +171,35 @@ void SafeAddPropertyListener(const Reference< XPropertySet > & xSet, const OUStr xSet->addPropertyChangeListener(rPropName, pListener); } -// ------------------------------------------------------------------------- void SafeRemovePropertyListener(const Reference< XPropertySet > & xSet, const OUString& rPropName, XPropertyChangeListener* pListener) { Reference< XPropertySetInfo > xInfo = xSet->getPropertySetInfo(); if (xInfo->hasPropertyByName(rPropName)) xSet->removePropertyChangeListener(rPropName, pListener); } -//------------------------------------------------------------------------- + OUString SAL_CALL SbaTableQueryBrowser::getImplementationName() throw(RuntimeException) { return getImplementationName_Static(); } -//------------------------------------------------------------------------- + ::comphelper::StringSequence SAL_CALL SbaTableQueryBrowser::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); } -// ------------------------------------------------------------------------- + OUString SbaTableQueryBrowser::getImplementationName_Static() throw(RuntimeException) { return OUString("org.openoffice.comp.dbu.ODatasourceBrowser"); } -//------------------------------------------------------------------------- + ::comphelper::StringSequence SbaTableQueryBrowser::getSupportedServiceNames_Static() throw(RuntimeException) { ::comphelper::StringSequence aSupported(1); aSupported.getArray()[0] = OUString("com.sun.star.sdb.DataSourceBrowser"); return aSupported; } -//------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL SbaTableQueryBrowser::Create(const Reference<XMultiServiceFactory >& _rxFactory) { SolarMutexGuard aGuard; @@ -214,7 +207,6 @@ Reference< XInterface > SAL_CALL SbaTableQueryBrowser::Create(const Reference<XM } DBG_NAME(SbaTableQueryBrowser); -//------------------------------------------------------------------------------ SbaTableQueryBrowser::SbaTableQueryBrowser(const Reference< XComponentContext >& _rM) :SbaXDataBrowserController(_rM) ,m_aSelectionListeners( getMutex() ) @@ -234,7 +226,6 @@ SbaTableQueryBrowser::SbaTableQueryBrowser(const Reference< XComponentContext >& DBG_CTOR(SbaTableQueryBrowser,NULL); } -//------------------------------------------------------------------------------ SbaTableQueryBrowser::~SbaTableQueryBrowser() { DBG_DTOR(SbaTableQueryBrowser,NULL); @@ -247,7 +238,6 @@ SbaTableQueryBrowser::~SbaTableQueryBrowser() } } -//------------------------------------------------------------------------------ Any SAL_CALL SbaTableQueryBrowser::queryInterface(const Type& _rType) throw (RuntimeException) { if ( _rType.equals( XScriptInvocationContext::static_type() ) ) @@ -264,7 +254,6 @@ Any SAL_CALL SbaTableQueryBrowser::queryInterface(const Type& _rType) throw (Run return aReturn; } -//------------------------------------------------------------------------------ Sequence< Type > SAL_CALL SbaTableQueryBrowser::getTypes( ) throw (RuntimeException) { Sequence< Type > aTypes( ::comphelper::concatSequences( @@ -287,7 +276,6 @@ Sequence< Type > SAL_CALL SbaTableQueryBrowser::getTypes( ) throw (RuntimeExcep return aTypes; } -//------------------------------------------------------------------------------ Sequence< sal_Int8 > SAL_CALL SbaTableQueryBrowser::getImplementationId( ) throw (RuntimeException) { static ::cppu::OImplementationId * pId = 0; @@ -303,7 +291,6 @@ Sequence< sal_Int8 > SAL_CALL SbaTableQueryBrowser::getImplementationId( ) thro return pId->getImplementationId(); } -//------------------------------------------------------------------------------ void SAL_CALL SbaTableQueryBrowser::disposing() { SolarMutexGuard aGuard; @@ -349,7 +336,6 @@ void SAL_CALL SbaTableQueryBrowser::disposing() SbaXDataBrowserController::disposing(); } -//------------------------------------------------------------------------------ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent) { if ( !SbaXDataBrowserController::Construct( pParent ) ) @@ -412,10 +398,9 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent) return sal_True; } -// --------------------------------------------------------------------------------------------------------------------- + namespace { - // ----------------------------------------------------------------------------------------------------------------- struct SelectValueByName : public ::std::unary_function< OUString, Any > { const Any& operator()( OUString const& i_name ) const @@ -432,7 +417,6 @@ namespace }; } -// --------------------------------------------------------------------------------------------------------------------- void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow() { try @@ -457,7 +441,6 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow() const Reference< XColumnsSupplier > xSuppColumns( xComposer, UNO_QUERY_THROW ); const Reference< XNameAccess > xColumnNames( xSuppColumns->getColumns(), UNO_QUERY_THROW ); - // ............................................................................................................. // check if the order columns apply to tables which really exist in the statement const Reference< XIndexAccess > xOrderColumns( xComposer->getOrderColumns(), UNO_SET_THROW ); const sal_Int32 nOrderColumns( xOrderColumns->getCount() ); @@ -504,7 +487,6 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow() xComposer->setOrder( sEmptyOrder ); } - // ............................................................................................................. // check if the columns participating in the filter refer to existing tables // TODO: there's no API at all for this. The method which comes nearest to what we need is // "getStructuredFilter", but it returns pure column names only. That is, for a statement like @@ -541,7 +523,6 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow() // ... // } // enum SQLFilterOperand { Column, Literal, ... } - // // ... or something like this .... } catch( const Exception& ) @@ -550,7 +531,6 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow() } } -// --------------------------------------------------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::InitializeForm( const Reference< XPropertySet > & i_formProperties ) { if(!m_pCurrentlyDisplayed) @@ -603,7 +583,6 @@ sal_Bool SbaTableQueryBrowser::InitializeForm( const Reference< XPropertySet > & return sal_True; } -//------------------------------------------------------------------------------ void SbaTableQueryBrowser::initializePreviewMode() { if ( getBrowserView() && getBrowserView()->getVclControl() ) @@ -621,7 +600,6 @@ void SbaTableQueryBrowser::initializePreviewMode() } } -//------------------------------------------------------------------------------ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::star::form::XFormComponent > & xGrid) { try @@ -686,7 +664,6 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: xFormMultiSet->setPropertyValues(aProperties, aValues); } - // get the formats supplier of the database we're working with Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier = getNumberFormatter()->getNumberFormatsSupplier(); @@ -858,7 +835,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: return sal_True; } -// ----------------------------------------------------------------------------- + Reference<XPropertySet> getColumnHelper(SvTreeListEntry* _pCurrentlyDisplayed,const Reference<XPropertySet>& _rxSource) { Reference<XPropertySet> xRet; @@ -875,7 +852,6 @@ Reference<XPropertySet> getColumnHelper(SvTreeListEntry* _pCurrentlyDisplayed,co return xRet; } -// ----------------------------------------------------------------------- void SbaTableQueryBrowser::transferChangedControlProperty(const OUString& _rProperty, const Any& _rNewValue) { if(m_pCurrentlyDisplayed) @@ -888,7 +864,6 @@ void SbaTableQueryBrowser::transferChangedControlProperty(const OUString& _rProp } } -// ----------------------------------------------------------------------- void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException) { SbaXDataBrowserController::propertyChange(evt); @@ -996,7 +971,6 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw( } } -// ----------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::suspend(sal_Bool bSuspend) throw( RuntimeException ) { SolarMutexGuard aSolarGuard; @@ -1020,7 +994,6 @@ sal_Bool SbaTableQueryBrowser::suspend(sal_Bool bSuspend) throw( RuntimeExceptio return bRet; } -// ------------------------------------------------------------------------- void SAL_CALL SbaTableQueryBrowser::statusChanged( const FeatureStateEvent& _rEvent ) throw(RuntimeException) { // search the external dispatcher causing this call @@ -1074,7 +1047,6 @@ void SAL_CALL SbaTableQueryBrowser::statusChanged( const FeatureStateEvent& _rEv OSL_ENSURE(aLoop != m_aExternalFeatures.end(), "SbaTableQueryBrowser::statusChanged: don't know who sent this!"); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::checkDocumentDataSource() { SvTreeListEntry* pDataSourceEntry = NULL; @@ -1111,7 +1083,6 @@ void SbaTableQueryBrowser::checkDocumentDataSource() implCheckExternalSlot(ID_BROWSER_DOCUMENT_DATASOURCE); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::extractDescriptorProps(const ::svx::ODataAccessDescriptor& _rDescriptor, OUString& _rDataSource, OUString& _rCommand, sal_Int32& _rCommandType, sal_Bool& _rEscapeProcessing) { _rDataSource = _rDescriptor.getDataSource(); @@ -1126,7 +1097,6 @@ void SbaTableQueryBrowser::extractDescriptorProps(const ::svx::ODataAccessDescri _rEscapeProcessing = ::cppu::any2bool(_rDescriptor[daEscapeProcessing]); } -// ------------------------------------------------------------------------- namespace { bool getDataSourceDisplayName_isURL( const OUString& _rDS, OUString& _rDisplayName, OUString& _rUniqueId ) @@ -1143,7 +1113,6 @@ namespace return false; } - // ..................................................................... struct FilterByEntryDataId : public IEntryFilter { OUString sId; @@ -1161,7 +1130,6 @@ namespace } } -// ------------------------------------------------------------------------- OUString SbaTableQueryBrowser::getDataSourceAcessor( SvTreeListEntry* _pDataSourceEntry ) const { OSL_ENSURE( _pDataSourceEntry, "SbaTableQueryBrowser::getDataSourceAcessor: invalid entry!" ); @@ -1172,7 +1140,6 @@ OUString SbaTableQueryBrowser::getDataSourceAcessor( SvTreeListEntry* _pDataSour return pData->sAccessor.Len() ? OUString(pData->sAccessor) : GetEntryText( _pDataSourceEntry ); } -// ------------------------------------------------------------------------- SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSource, const OUString& _rCommand, sal_Int32 _nCommandType, SvTreeListEntry** _ppDataSourceEntry, SvTreeListEntry** _ppContainerEntry, sal_Bool _bExpandAncestors, const SharedConnection& _rxConnection ) @@ -1299,7 +1266,6 @@ SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSour return pObject; } -// ------------------------------------------------------------------------- SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const ::svx::ODataAccessDescriptor& _rDescriptor, SvTreeListEntry** _ppDataSourceEntry, SvTreeListEntry** _ppContainerEntry, sal_Bool _bExpandAncestors) @@ -1314,7 +1280,6 @@ SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const ::svx::ODataAccessDe return getObjectEntry( sDataSource, sCommand, nCommandType, _ppDataSourceEntry, _ppContainerEntry, _bExpandAncestors, SharedConnection() ); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::connectExternalDispatches() { Reference< XDispatchProvider > xProvider( getFrame(), UNO_QUERY ); @@ -1380,7 +1345,6 @@ void SbaTableQueryBrowser::connectExternalDispatches() } } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::implCheckExternalSlot( sal_uInt16 _nId ) { if ( !m_xMainToolbar.is() ) @@ -1402,7 +1366,6 @@ void SbaTableQueryBrowser::implCheckExternalSlot( sal_uInt16 _nId ) InvalidateFeature( _nId ); } -// ------------------------------------------------------------------------- void SAL_CALL SbaTableQueryBrowser::disposing( const com::sun::star::lang::EventObject& _rSource ) throw(RuntimeException) { // our frame ? @@ -1462,7 +1425,6 @@ void SAL_CALL SbaTableQueryBrowser::disposing( const com::sun::star::lang::Event } } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::implRemoveStatusListeners() { // clear all old dispatches @@ -1486,7 +1448,6 @@ void SbaTableQueryBrowser::implRemoveStatusListeners() m_aExternalFeatures.clear(); } -// ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaTableQueryBrowser::select( const Any& _rSelection ) throw (IllegalArgumentException, RuntimeException) { SolarMutexGuard aGuard; @@ -1515,7 +1476,6 @@ sal_Bool SAL_CALL SbaTableQueryBrowser::select( const Any& _rSelection ) throw ( return implSelect(aDescriptor,sal_True); } -// ------------------------------------------------------------------------- Any SAL_CALL SbaTableQueryBrowser::getSelection( ) throw (RuntimeException) { Any aReturn; @@ -1542,19 +1502,16 @@ Any SAL_CALL SbaTableQueryBrowser::getSelection( ) throw (RuntimeException) return aReturn; } -// ------------------------------------------------------------------------- void SAL_CALL SbaTableQueryBrowser::addSelectionChangeListener( const Reference< XSelectionChangeListener >& _rxListener ) throw (RuntimeException) { m_aSelectionListeners.addInterface(_rxListener); } -// ------------------------------------------------------------------------- void SAL_CALL SbaTableQueryBrowser::removeSelectionChangeListener( const Reference< XSelectionChangeListener >& _rxListener ) throw (RuntimeException) { m_aSelectionListeners.removeInterface(_rxListener); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::attachFrame(const Reference< ::com::sun::star::frame::XFrame > & _xFrame) throw( RuntimeException ) { implRemoveStatusListeners(); @@ -1598,7 +1555,6 @@ void SbaTableQueryBrowser::attachFrame(const Reference< ::com::sun::star::frame: connectExternalDispatches(); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::addModelListeners(const Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel) { SbaXDataBrowserController::addModelListeners(_xGridControlModel); @@ -1615,7 +1571,6 @@ void SbaTableQueryBrowser::addModelListeners(const Reference< ::com::sun::star:: } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::removeModelListeners(const Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel) { SbaXDataBrowserController::removeModelListeners(_xGridControlModel); @@ -1630,7 +1585,7 @@ void SbaTableQueryBrowser::removeModelListeners(const Reference< ::com::sun::sta xSourceSet->removePropertyChangeListener(PROPERTY_TEXTRELIEF, static_cast<XPropertyChangeListener*>(this)); } } -// ------------------------------------------------------------------------- + void SbaTableQueryBrowser::RowChanged() { if(getBrowserView()) @@ -1642,7 +1597,6 @@ void SbaTableQueryBrowser::RowChanged() SbaXDataBrowserController::RowChanged(); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::ColumnChanged() { if(getBrowserView()) @@ -1653,7 +1607,7 @@ void SbaTableQueryBrowser::ColumnChanged() } SbaXDataBrowserController::ColumnChanged(); } -//------------------------------------------------------------------------------ + void SbaTableQueryBrowser::AddColumnListener(const Reference< XPropertySet > & xCol) { SbaXDataBrowserController::AddColumnListener(xCol); @@ -1663,7 +1617,6 @@ void SbaTableQueryBrowser::AddColumnListener(const Reference< XPropertySet > & x SafeAddPropertyListener(xCol, PROPERTY_FORMATKEY, static_cast<XPropertyChangeListener*>(this)); } -//------------------------------------------------------------------------------ void SbaTableQueryBrowser::RemoveColumnListener(const Reference< XPropertySet > & xCol) { SbaXDataBrowserController::RemoveColumnListener(xCol); @@ -1673,14 +1626,12 @@ void SbaTableQueryBrowser::RemoveColumnListener(const Reference< XPropertySet > SafeRemovePropertyListener(xCol, PROPERTY_FORMATKEY, static_cast<XPropertyChangeListener*>(this)); } -//------------------------------------------------------------------------------ void SbaTableQueryBrowser::criticalFail() { SbaXDataBrowserController::criticalFail(); unloadAndCleanup( sal_False ); } -//------------------------------------------------------------------------------ void SbaTableQueryBrowser::LoadFinished(sal_Bool _bWasSynch) { SbaXDataBrowserController::LoadFinished(_bWasSynch); @@ -1701,7 +1652,6 @@ void SbaTableQueryBrowser::LoadFinished(sal_Bool _bWasSynch) m_aSelectionListeners.notifyEach( &XSelectionChangeListener::selectionChanged, aEvent ); } -//------------------------------------------------------------------------------ sal_Bool SbaTableQueryBrowser::getExternalSlotState( sal_uInt16 _nId ) const { sal_Bool bEnabled = sal_False; @@ -1711,7 +1661,6 @@ sal_Bool SbaTableQueryBrowser::getExternalSlotState( sal_uInt16 _nId ) const return bEnabled; } -//------------------------------------------------------------------------------ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const { FeatureState aReturn; @@ -1906,7 +1855,6 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const } -//------------------------------------------------------------------------------ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue >& aArgs) { switch (nId) @@ -2095,7 +2043,6 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue } } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::implAddDatasource( const OUString& _rDataSourceName, const SharedConnection& _rxConnection ) { Image a, b, c; @@ -2103,7 +2050,6 @@ void SbaTableQueryBrowser::implAddDatasource( const OUString& _rDataSourceName, implAddDatasource( _rDataSourceName, a, d, b, e, c, _rxConnection ); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::implAddDatasource(const OUString& _rDbName, Image& _rDbImage, OUString& _rQueryName, Image& _rQueryImage, OUString& _rTableName, Image& _rTableImage, const SharedConnection& _rxConnection) @@ -2158,7 +2104,7 @@ void SbaTableQueryBrowser::implAddDatasource(const OUString& _rDbName, Image& _r } } -// ------------------------------------------------------------------------- + void SbaTableQueryBrowser::initializeTreeModel() { if (m_xDatabaseContext.is()) @@ -2174,7 +2120,7 @@ void SbaTableQueryBrowser::initializeTreeModel() implAddDatasource( *pIter, aDBImage, sQueriesName, aQueriesImage, sTablesName, aTablesImage, SharedConnection() ); } } -// ------------------------------------------------------------------------- + void SbaTableQueryBrowser::populateTree(const Reference<XNameAccess>& _xNameAccess, SvTreeListEntry* _pParent, EntryType _eEntryType) @@ -2210,7 +2156,6 @@ void SbaTableQueryBrowser::populateTree(const Reference<XNameAccess>& _xNameAcce } } -//------------------------------------------------------------------------------ SvTreeListEntry* SbaTableQueryBrowser::implAppendEntry( SvTreeListEntry* _pParent, const OUString& _rName, void* _pUserData, EntryType _eEntryType ) { SAL_WNODEPRECATED_DECLARATIONS_PUSH @@ -2228,7 +2173,6 @@ SvTreeListEntry* SbaTableQueryBrowser::implAppendEntry( SvTreeListEntry* _pParen return pNewEntry; } -//------------------------------------------------------------------------------ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvTreeListEntry*, _pParent) { if (_pParent->HasChildren()) @@ -2337,7 +2281,6 @@ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvTreeListEntry*, _pParent) return 1L; } -//------------------------------------------------------------------------------ sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvTreeListEntry* _pEntry ) { OSL_ENSURE(_pEntry, "SbaTableQueryBrowser::ensureEntryObject: invalid argument!"); @@ -2421,7 +2364,7 @@ sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvTreeListEntry* _pEntry ) return bSuccess; } -//------------------------------------------------------------------------------ + sal_Bool SbaTableQueryBrowser::implSelect(const ::svx::ODataAccessDescriptor& _rDescriptor,sal_Bool _bSelectDirect) { // extract the props @@ -2435,7 +2378,6 @@ sal_Bool SbaTableQueryBrowser::implSelect(const ::svx::ODataAccessDescriptor& _r return implSelect( sDataSource, sCommand, nCommandType, bEscapeProcessing, SharedConnection(), _bSelectDirect ); } -//------------------------------------------------------------------------------ sal_Bool SbaTableQueryBrowser::implLoadAnything(const OUString& _rDataSourceName, const OUString& _rCommand, const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing, const SharedConnection& _rxConnection) { @@ -2520,7 +2462,6 @@ sal_Bool SbaTableQueryBrowser::implLoadAnything(const OUString& _rDataSourceName return sal_False; } -//------------------------------------------------------------------------------ sal_Bool SbaTableQueryBrowser::implSelect(const OUString& _rDataSourceName, const OUString& _rCommand, const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing, const SharedConnection& _rxConnection @@ -2565,12 +2506,11 @@ sal_Bool SbaTableQueryBrowser::implSelect(const OUString& _rDataSourceName, cons return sal_False; } -//------------------------------------------------------------------------------ IMPL_LINK(SbaTableQueryBrowser, OnSelectionChange, void*, /*NOINTERESTEDIN*/) { return implSelect( m_pTreeView->getListBox().FirstSelected() ) ? 1L : 0L; } -//------------------------------------------------------------------------------ + SvTreeListEntry* SbaTableQueryBrowser::implGetConnectionEntry(SvTreeListEntry* _pEntry) const { SvTreeListEntry* pCurrentEntry = _pEntry; @@ -2582,7 +2522,7 @@ SvTreeListEntry* SbaTableQueryBrowser::implGetConnectionEntry(SvTreeListEntry* _ } return pCurrentEntry; } -//------------------------------------------------------------------------------ + bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry ) { if ( !_pEntry ) @@ -2710,7 +2650,6 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry ) sStatus = sStatus.replaceFirst("$name$", aName); BrowserViewStatusDisplay aShowStatus(static_cast<UnoDataBrowserView*>(getView()), sStatus); - sal_Bool bEscapeProcessing = sal_True; if(xNameAccess.is() && xNameAccess->hasByName(sSimpleName)) { @@ -2800,7 +2739,6 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry ) return bSuccess; } -// ----------------------------------------------------------------------------- SvTreeListEntry* SbaTableQueryBrowser::getEntryFromContainer(const Reference<XNameAccess>& _rxNameAccess) { DBTreeListBox& rListBox = m_pTreeView->getListBox(); @@ -2824,7 +2762,6 @@ SvTreeListEntry* SbaTableQueryBrowser::getEntryFromContainer(const Reference<XNa return pContainer; } -// ------------------------------------------------------------------------- void SAL_CALL SbaTableQueryBrowser::elementInserted( const ContainerEvent& _rEvent ) throw(RuntimeException) { SolarMutexGuard aSolarGuard; @@ -2861,7 +2798,7 @@ void SAL_CALL SbaTableQueryBrowser::elementInserted( const ContainerEvent& _rEve else SbaXDataBrowserController::elementInserted(_rEvent); } -// ------------------------------------------------------------------------- + sal_Bool SbaTableQueryBrowser::isCurrentlyDisplayedChanged(const OUString& _sName,SvTreeListEntry* _pContainer) { return m_pCurrentlyDisplayed @@ -2869,7 +2806,7 @@ sal_Bool SbaTableQueryBrowser::isCurrentlyDisplayedChanged(const OUString& _sNam && m_pTreeView->getListBox().GetParent(m_pCurrentlyDisplayed) == _pContainer && m_pTreeView->getListBox().GetEntryText(m_pCurrentlyDisplayed) == _sName; } -// ------------------------------------------------------------------------- + void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEvent ) throw(RuntimeException) { SolarMutexGuard aSolarGuard; @@ -2922,7 +2859,6 @@ void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEven SbaXDataBrowserController::elementRemoved(_rEvent); } -// ------------------------------------------------------------------------- void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEvent ) throw(RuntimeException) { SolarMutexGuard aSolarGuard; @@ -2994,7 +2930,6 @@ void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEve SbaXDataBrowserController::elementReplaced(_rEvent); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::impl_releaseConnection( SharedConnection& _rxConnection ) { // remove as event listener @@ -3022,7 +2957,6 @@ void SbaTableQueryBrowser::impl_releaseConnection( SharedConnection& _rxConnecti // will implicitly dispose if we have the ownership, since xConnection is a SharedConnection } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::disposeConnection( SvTreeListEntry* _pDSEntry ) { OSL_ENSURE( _pDSEntry, "SbaTableQueryBrowser::disposeConnection: invalid entry (NULL)!" ); @@ -3036,7 +2970,6 @@ void SbaTableQueryBrowser::disposeConnection( SvTreeListEntry* _pDSEntry ) } } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::closeConnection(SvTreeListEntry* _pDSEntry,sal_Bool _bDisposeConnection) { OSL_ENSURE(_pDSEntry, "SbaTableQueryBrowser::closeConnection: invalid entry (NULL)!"); @@ -3072,7 +3005,6 @@ void SbaTableQueryBrowser::closeConnection(SvTreeListEntry* _pDSEntry,sal_Bool _ disposeConnection( _pDSEntry ); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::unloadAndCleanup( sal_Bool _bDisposeConnection ) { if (!m_pCurrentlyDisplayed) @@ -3132,7 +3064,6 @@ void SbaTableQueryBrowser::unloadAndCleanup( sal_Bool _bDisposeConnection ) } } -// ------------------------------------------------------------------------- namespace { Reference< XInterface > lcl_getDataSource( const Reference< XDatabaseContext >& _rxDatabaseContext, @@ -3159,7 +3090,6 @@ namespace } } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::impl_initialize() { SolarMutexGuard aGuard; @@ -3333,13 +3263,11 @@ void SbaTableQueryBrowser::impl_initialize() InvalidateAll(); } -// ------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::haveExplorer() const { return m_pTreeView && m_pTreeView->IsVisible(); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::hideExplorer() { if (!haveExplorer()) @@ -3354,7 +3282,6 @@ void SbaTableQueryBrowser::hideExplorer() InvalidateFeature(ID_BROWSER_EXPLORER); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::showExplorer() { if (haveExplorer()) @@ -3370,7 +3297,6 @@ void SbaTableQueryBrowser::showExplorer() InvalidateFeature(ID_BROWSER_EXPLORER); } -// ----------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::ensureConnection(SvTreeListEntry* _pAnyEntry, SharedConnection& _rConnection) { SvTreeListEntry* pDSEntry = m_pTreeView->getListBox().GetRootLevelParent(_pAnyEntry); @@ -3382,7 +3308,6 @@ sal_Bool SbaTableQueryBrowser::ensureConnection(SvTreeListEntry* _pAnyEntry, Sha return ensureConnection( pDSEntry, pDSData, _rConnection ); } -// ----------------------------------------------------------------------------- SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptr< ImageProvider > SbaTableQueryBrowser::getImageProviderFor( SvTreeListEntry* _pAnyEntry ) { @@ -3392,9 +3317,9 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH pImageProvider.reset( new ImageProvider( xConnection ) ); return pImageProvider; } + SAL_WNODEPRECATED_DECLARATIONS_POP -// ----------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::getExistentConnectionFor( SvTreeListEntry* _pAnyEntry, SharedConnection& _rConnection ) { SvTreeListEntry* pDSEntry = m_pTreeView->getListBox().GetRootLevelParent( _pAnyEntry ); @@ -3408,14 +3333,13 @@ sal_Bool SbaTableQueryBrowser::getExistentConnectionFor( SvTreeListEntry* _pAnyE } #if OSL_DEBUG_LEVEL > 0 -// ----------------------------------------------------------------------------- bool SbaTableQueryBrowser::impl_isDataSourceEntry( SvTreeListEntry* _pEntry ) const { return m_pTreeModel->GetRootLevelParent( _pEntry ) == _pEntry; } + #endif -// ----------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::ensureConnection( SvTreeListEntry* _pDSEntry, void* pDSData, SharedConnection& _rConnection ) { OSL_ENSURE( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::ensureConnection: this entry does not denote a data source!" ); @@ -3452,7 +3376,6 @@ sal_Bool SbaTableQueryBrowser::ensureConnection( SvTreeListEntry* _pDSEntry, voi return _rConnection.is(); } -// ----------------------------------------------------------------------------- IMPL_LINK( SbaTableQueryBrowser, OnTreeEntryCompare, const SvSortData*, _pSortData ) { const SvTreeListEntry* pLHS = static_cast<const SvTreeListEntry*>(_pSortData->pLeft); @@ -3517,7 +3440,6 @@ IMPL_LINK( SbaTableQueryBrowser, OnTreeEntryCompare, const SvSortData*, _pSortDa return nCompareResult; } -// ----------------------------------------------------------------------------- void SbaTableQueryBrowser::implAdministrate( SvTreeListEntry* _pApplyTo ) { OSL_PRECOND( _pApplyTo, "SbaTableQueryBrowser::implAdministrate: illegal entry!" ); @@ -3568,7 +3490,6 @@ void SbaTableQueryBrowser::implAdministrate( SvTreeListEntry* _pApplyTo ) } } -// ----------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::requestQuickHelp( const SvTreeListEntry* _pEntry, OUString& _rText ) const { const DBTreeListUserData* pData = static_cast< const DBTreeListUserData* >( _pEntry->GetUserData() ); @@ -3580,7 +3501,6 @@ sal_Bool SbaTableQueryBrowser::requestQuickHelp( const SvTreeListEntry* _pEntry, return sal_False; } -// ----------------------------------------------------------------------------- PopupMenu* SbaTableQueryBrowser::getContextMenu( Control& _rControl ) const { OSL_PRECOND( &m_pTreeView->getListBox() == &_rControl, @@ -3591,19 +3511,16 @@ PopupMenu* SbaTableQueryBrowser::getContextMenu( Control& _rControl ) const return new PopupMenu( ModuleRes( MENU_BROWSER_DEFAULTCONTEXT ) ); } -// ----------------------------------------------------------------------------- IController& SbaTableQueryBrowser::getCommandController() { return *this; } -// ----------------------------------------------------------------------------- ::cppu::OInterfaceContainerHelper* SbaTableQueryBrowser::getContextMenuInterceptors() { return &m_aContextMenuInterceptors; } -// ----------------------------------------------------------------------------- Any SbaTableQueryBrowser::getCurrentSelection( Control& _rControl ) const { OSL_PRECOND( &m_pTreeView->getListBox() == &_rControl, @@ -3644,7 +3561,6 @@ Any SbaTableQueryBrowser::getCurrentSelection( Control& _rControl ) const return makeAny( aSelectedObject ); } -// ----------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::implGetQuerySignature( OUString& _rCommand, sal_Bool& _bEscapeProcessing ) { _rCommand = OUString(); @@ -3692,7 +3608,7 @@ sal_Bool SbaTableQueryBrowser::implGetQuerySignature( OUString& _rCommand, sal_B return sal_False; } -//------------------------------------------------------------------------------ + void SbaTableQueryBrowser::frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( RuntimeException ) { if (aEvent.Frame == m_xCurrentFrameParent) @@ -3706,7 +3622,7 @@ void SbaTableQueryBrowser::frameAction(const ::com::sun::star::frame::FrameActio SbaXDataBrowserController::frameAction(aEvent); } -// ----------------------------------------------------------------------------- + void SbaTableQueryBrowser::clearGridColumns(const Reference< XNameContainer >& _xColContainer) { // first we have to clear the grid @@ -3721,7 +3637,7 @@ void SbaTableQueryBrowser::clearGridColumns(const Reference< XNameContainer >& _ ::comphelper::disposeComponent(xColumn); } } -// ----------------------------------------------------------------------------- + void SbaTableQueryBrowser::loadMenu(const Reference< XFrame >& _xFrame) { if ( m_bShowMenu ) @@ -3742,7 +3658,7 @@ void SbaTableQueryBrowser::loadMenu(const Reference< XFrame >& _xFrame) onLoadedMenu( xLayoutManager ); } } -// ----------------------------------------------------------------------------- + OUString SbaTableQueryBrowser::getPrivateTitle() const { OUString sTitle; @@ -3766,7 +3682,7 @@ OUString SbaTableQueryBrowser::getPrivateTitle() const return sTitle; } -// ----------------------------------------------------------------------------- + sal_Bool SbaTableQueryBrowser::preReloadForm() { sal_Bool bIni = sal_False; @@ -3794,14 +3710,12 @@ sal_Bool SbaTableQueryBrowser::preReloadForm() return bIni; } -// ----------------------------------------------------------------------------- void SbaTableQueryBrowser::postReloadForm() { InitializeGridModel(getFormComponent()); LoadFinished(sal_True); } -//------------------------------------------------------------------------------ Reference< XEmbeddedScripts > SAL_CALL SbaTableQueryBrowser::getScriptContainer() throw (RuntimeException) { // update our database document @@ -3827,28 +3741,24 @@ Reference< XEmbeddedScripts > SAL_CALL SbaTableQueryBrowser::getScriptContainer( return xScripts; } -//------------------------------------------------------------------------------ void SAL_CALL SbaTableQueryBrowser::registerContextMenuInterceptor( const Reference< XContextMenuInterceptor >& _Interceptor ) throw (RuntimeException) { if ( _Interceptor.is() ) m_aContextMenuInterceptors.addInterface( _Interceptor ); } -//------------------------------------------------------------------------------ void SAL_CALL SbaTableQueryBrowser::releaseContextMenuInterceptor( const Reference< XContextMenuInterceptor >& _Interceptor ) throw (RuntimeException) { if ( _Interceptor.is() ) m_aContextMenuInterceptors.removeInterface( _Interceptor ); } -//------------------------------------------------------------------------------ void SAL_CALL SbaTableQueryBrowser::registeredDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException) { SolarMutexGuard aGuard; implAddDatasource( _Event.Name, SharedConnection() ); } -//------------------------------------------------------------------------------ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const OUString& _rDataSourceName ) { // get the top-level representing the removed data source @@ -3898,7 +3808,6 @@ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const OUString& _rDataSo m_pTreeModel->Remove( pDataSourceEntry ); } -//------------------------------------------------------------------------------ void SAL_CALL SbaTableQueryBrowser::revokedDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException) { SolarMutexGuard aGuard; @@ -3909,7 +3818,6 @@ void SAL_CALL SbaTableQueryBrowser::revokedDatabaseLocation( const DatabaseRegis checkDocumentDataSource(); } -//------------------------------------------------------------------------------ void SAL_CALL SbaTableQueryBrowser::changedDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException) { SolarMutexGuard aGuard; @@ -3920,10 +3828,6 @@ void SAL_CALL SbaTableQueryBrowser::changedDatabaseLocation( const DatabaseRegis implAddDatasource( _Event.Name, SharedConnection() ); } - -// ......................................................................... } // namespace dbaui -// ......................................................................... - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx index 0e0f60960e52..4e3eb60c3dab 100644 --- a/dbaccess/source/ui/control/ColumnControlWindow.cxx +++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx @@ -26,7 +26,6 @@ #include <comphelper/processfactory.hxx> #include <com/sun/star/util/NumberFormatter.hpp> - using namespace ::dbaui; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -35,10 +34,8 @@ using namespace ::com::sun::star::util; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::lang; -//======================================================================== // OColumnControlWindow DBG_NAME(OColumnControlWindow) -//======================================================================== OColumnControlWindow::OColumnControlWindow(Window* pParent ,const Reference<XComponentContext>& _rxContext) : OFieldDescControl(pParent,NULL) @@ -51,13 +48,13 @@ OColumnControlWindow::OColumnControlWindow(Window* pParent setRightAligned(); m_aLocale = SvtSysLocale().GetLanguageTag().getLocale(); } -// ----------------------------------------------------------------------------- + OColumnControlWindow::~OColumnControlWindow() { DBG_DTOR(OColumnControlWindow,NULL); } -// ----------------------------------------------------------------------- + void OColumnControlWindow::ActivateAggregate( EControlType eType ) { switch(eType ) @@ -70,7 +67,7 @@ void OColumnControlWindow::ActivateAggregate( EControlType eType ) OFieldDescControl::ActivateAggregate( eType ); } } -// ----------------------------------------------------------------------- + void OColumnControlWindow::DeactivateAggregate( EControlType eType ) { switch(eType ) @@ -83,17 +80,17 @@ void OColumnControlWindow::DeactivateAggregate( EControlType eType ) OFieldDescControl::DeactivateAggregate( eType ); } } -// ----------------------------------------------------------------------------- + void OColumnControlWindow::CellModified(long /*nRow*/, sal_uInt16 /*nColId*/ ) { saveCurrentFieldDescData(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::lang::Locale OColumnControlWindow::GetLocale() const { return m_aLocale; } -// ----------------------------------------------------------------------------- + Reference< XNumberFormatter > OColumnControlWindow::GetFormatter() const { if ( !m_xFormatter.is() ) @@ -113,29 +110,29 @@ Reference< XNumberFormatter > OColumnControlWindow::GetFormatter() const } return m_xFormatter; } -// ----------------------------------------------------------------------------- + TOTypeInfoSP OColumnControlWindow::getTypeInfo(sal_Int32 _nPos) { return ( _nPos >= 0 && _nPos < static_cast<sal_Int32>(m_aDestTypeInfoIndex.size())) ? m_aDestTypeInfoIndex[_nPos]->second : TOTypeInfoSP(); } -// ----------------------------------------------------------------------------- + const OTypeInfoMap* OColumnControlWindow::getTypeInfo() const { return &m_aDestTypeInfo; } -// ----------------------------------------------------------------------------- + Reference< XDatabaseMetaData> OColumnControlWindow::getMetaData() { if ( m_xConnection.is() ) return m_xConnection->getMetaData(); return Reference< XDatabaseMetaData>(); } -// ----------------------------------------------------------------------------- + Reference< XConnection> OColumnControlWindow::getConnection() { return m_xConnection; } -// ----------------------------------------------------------------------------- + void OColumnControlWindow::setConnection(const Reference< XConnection>& _xCon) { m_xConnection = _xCon; @@ -152,17 +149,17 @@ void OColumnControlWindow::setConnection(const Reference< XConnection>& _xCon) ::dbaui::fillAutoIncrementValue(m_xConnection,m_bAutoIncrementEnabled,m_sAutoIncrementValue); } } -// ----------------------------------------------------------------------------- + sal_Bool OColumnControlWindow::isAutoIncrementValueEnabled() const { return m_bAutoIncrementEnabled; } -// ----------------------------------------------------------------------------- + OUString OColumnControlWindow::getAutoIncrementValue() const { return m_sAutoIncrementValue; } -// ----------------------------------------------------------------------------- + TOTypeInfoSP OColumnControlWindow::getDefaultTyp() const { if ( !m_pTypeInfo.get() ) @@ -172,6 +169,5 @@ TOTypeInfoSP OColumnControlWindow::getDefaultTyp() const } return m_pTypeInfo; } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index b318b97b7d8e..d0714606867e 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -55,7 +55,6 @@ #include "dbu_tbl.hrc" #include <osl/diagnose.h> - using namespace dbaui; using namespace dbtools; using namespace ::com::sun::star::uno; @@ -64,8 +63,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::util; -//================================================================== - // For the Controls on the OFieldDescGenPage #define CONTROL_SPACING_X 18 // 6 #define CONTROL_SPACING_Y 4 @@ -76,7 +73,6 @@ using namespace ::com::sun::star::util; #define HSCROLL_STEP 20 - namespace { @@ -96,13 +92,10 @@ namespace } -//================================================================== // class OFieldDescControl -//================================================================== DBG_NAME(OFieldDescControl) -//================================================================== OFieldDescControl::OFieldDescControl( Window* pParent, const ResId& rResId, OTableDesignHelpBar* pHelpBar) :TabPage( pParent, rResId ) ,pHelp( pHelpBar ) @@ -150,7 +143,7 @@ OFieldDescControl::OFieldDescControl( Window* pParent, const ResId& rResId, OTab Contruct(); } -//------------------------------------------------------------------------------ + OFieldDescControl::OFieldDescControl( Window* pParent, OTableDesignHelpBar* pHelpBar ) :TabPage( pParent, WB_3DLOOK | WB_DIALOGCONTROL ) ,pHelp( pHelpBar ) @@ -197,7 +190,7 @@ OFieldDescControl::OFieldDescControl( Window* pParent, OTableDesignHelpBar* pHel DBG_CTOR(OFieldDescControl,NULL); Contruct(); } -// ----------------------------------------------------------------------------- + void OFieldDescControl::Contruct() { m_pVertScroll = new ScrollBar(this, WB_VSCROLL | WB_REPEAT | WB_DRAG); @@ -218,7 +211,6 @@ void OFieldDescControl::Contruct() m_nOldVThumb = m_nOldHThumb = 0; } -//------------------------------------------------------------------------------ OFieldDescControl::~OFieldDescControl() { DBG_DTOR(OFieldDescControl,NULL); @@ -239,7 +231,6 @@ OFieldDescControl::~OFieldDescControl() ::dbaui::notifySystemWindow(this,this,::comphelper::mem_fun(&TaskPaneList::RemoveWindow)); pLastFocusWindow = NULL; - ////////////////////////////////////////////////////////////////////// // Destroy children DeactivateAggregate( tpDefault ); DeactivateAggregate( tpRequired ); @@ -255,7 +246,6 @@ OFieldDescControl::~OFieldDescControl() DeactivateAggregate( tpAutoIncrementValue ); } -//------------------------------------------------------------------------------ String OFieldDescControl::BoolStringPersistent(const String& rUIString) const { if (rUIString == aNo) @@ -265,7 +255,6 @@ String OFieldDescControl::BoolStringPersistent(const String& rUIString) const return OUString(); } -//------------------------------------------------------------------------------ String OFieldDescControl::BoolStringUI(const String& rPersistentString) const { // Older versions may store a language dependend string as a default @@ -280,20 +269,18 @@ String OFieldDescControl::BoolStringUI(const String& rPersistentString) const return ModuleRes(STR_VALUE_NONE).toString(); } -//------------------------------------------------------------------------------ void OFieldDescControl::Init() { Reference< ::com::sun::star::util::XNumberFormatter > xFormatter = GetFormatter(); ::dbaui::setEvalDateFormatForFormatter(xFormatter); } -//------------------------------------------------------------------------------ IMPL_LINK(OFieldDescControl, OnScroll, ScrollBar*, /*pBar*/) { ScrollAllAggregates(); return 0; } -// ----------------------------------------------------------------------------- + namespace { void getMaxXPosition(Window* _pWindow,long& _rnMaxXPosition) @@ -305,7 +292,7 @@ namespace } } } -//------------------------------------------------------------------------------ + void OFieldDescControl::CheckScrollBars() { // Calculate the ScrollBars' new position @@ -390,14 +377,12 @@ void OFieldDescControl::CheckScrollBars() } } -//------------------------------------------------------------------------------ void OFieldDescControl::Resize() { CheckScrollBars(); ScrollAllAggregates(); } -//------------------------------------------------------------------------------ inline void OFieldDescControl::ScrollAggregate(Control* pText, Control* pInput, Control* pButton, long nDeltaX, long nDeltaY) { if (!pText) @@ -408,7 +393,6 @@ inline void OFieldDescControl::ScrollAggregate(Control* pText, Control* pInput, pButton->SetPosPixel(pButton->GetPosPixel() + Point(nDeltaX, nDeltaY)); } -//------------------------------------------------------------------------------ void OFieldDescControl::ScrollAllAggregates() { long nDeltaX = 0, nDeltaY = 0; @@ -447,7 +431,6 @@ void OFieldDescControl::ScrollAllAggregates() } } -//------------------------------------------------------------------------------ sal_uInt16 OFieldDescControl::CountActiveAggregates() const { Control* ppAggregates[] = { pRequired, pNumType, pAutoIncrement, pDefault, pTextLen, pLength, pScale, pFormat, m_pColumnName, m_pType,m_pAutoIncrementValue}; @@ -457,7 +440,7 @@ sal_uInt16 OFieldDescControl::CountActiveAggregates() const ++nVisibleAggregates; return nVisibleAggregates; } -//------------------------------------------------------------------------------ + sal_Int32 OFieldDescControl::GetMaxControlHeight() const { Size aHeight; @@ -474,11 +457,10 @@ sal_Int32 OFieldDescControl::GetMaxControlHeight() const return aHeight.Height(); } -//------------------------------------------------------------------------------ + void OFieldDescControl::SetReadOnly( sal_Bool bReadOnly ) { DBG_CHKTHIS(OFieldDescControl,NULL); - ////////////////////////////////////////////////////////////////////// // Enable/disable Controls Control* ppAggregates[] = { pRequired, pNumType , pAutoIncrement, pDefault @@ -504,11 +486,9 @@ void OFieldDescControl::SetReadOnly( sal_Bool bReadOnly ) } } -//------------------------------------------------------------------------------ String OFieldDescControl::GetControlText( sal_uInt16 nControlId ) { DBG_CHKTHIS(OFieldDescControl,NULL); - ////////////////////////////////////////////////////////////////////// // Read out the Controls' texts switch( nControlId ) { @@ -562,11 +542,9 @@ String OFieldDescControl::GetControlText( sal_uInt16 nControlId ) return String(); } -//------------------------------------------------------------------------------ void OFieldDescControl::SetControlText( sal_uInt16 nControlId, const String& rText ) { DBG_CHKTHIS(OFieldDescControl,NULL); - ////////////////////////////////////////////////////////////////////// // Set the Controls' texts switch( nControlId ) { @@ -592,7 +570,6 @@ void OFieldDescControl::SetControlText( sal_uInt16 nControlId, const String& rTe pRequired->SelectEntry(rText); break; - case FIELD_PROPERTY_TEXTLEN: if (pTextLen) pTextLen->SetText(rText); @@ -642,11 +619,9 @@ void OFieldDescControl::SetControlText( sal_uInt16 nControlId, const String& rTe } } -//------------------------------------------------------------------------ IMPL_LINK( OFieldDescControl, FormatClickHdl, Button *, /*pButton*/ ) { DBG_CHKTHIS(OFieldDescControl,NULL); - ////////////////////////////////////////////////////////////////////// // Create temporary Column, which is used for data exchange with Dialog if( !pActFieldDescr ) return 0; @@ -681,11 +656,10 @@ IMPL_LINK( OFieldDescControl, FormatClickHdl, Button *, /*pButton*/ ) return 0; } -// ----------------------------------------------------------------------- void OFieldDescControl::SetModified(sal_Bool /*bModified*/) { } -//------------------------------------------------------------------------ + IMPL_LINK( OFieldDescControl, ChangeHdl, ListBox *, pListBox ) { DBG_CHKTHIS(OFieldDescControl,NULL); @@ -758,7 +732,7 @@ IMPL_LINK( OFieldDescControl, ChangeHdl, ListBox *, pListBox ) return 0; } -//------------------------------------------------------------------------------ + // Rearrange all Controls, such that they are in fixed order and really on top // of the DescriptionPage void OFieldDescControl::ArrangeAggregates() @@ -835,11 +809,9 @@ void OFieldDescControl::ArrangeAggregates() m_pHorzScroll->SetZOrder(NULL, WINDOW_ZORDER_FIRST); } -//------------------------------------------------------------------------------ void OFieldDescControl::ActivateAggregate( EControlType eType ) { DBG_CHKTHIS(OFieldDescControl,NULL); - ////////////////////////////////////////////////////////////////////// // Create Controls switch( eType ) { @@ -1021,7 +993,7 @@ void OFieldDescControl::ActivateAggregate( EControlType eType ) break; } } -// ----------------------------------------------------------------------------- + void OFieldDescControl::InitializeControl(Control* _pControl,const OString& _sHelpId,bool _bAddChangeHandler) { _pControl->SetHelpId(_sHelpId); @@ -1032,7 +1004,7 @@ void OFieldDescControl::InitializeControl(Control* _pControl,const OString& _sHe _pControl->SetLoseFocusHdl(LINK(this, OFieldDescControl, OnControlFocusLost)); _pControl->EnableClipSiblings(); } -// ----------------------------------------------------------------------------- + FixedText* OFieldDescControl::CreateText(sal_uInt16 _nTextRes) { FixedText* pFixedText = new FixedText( this ); @@ -1040,7 +1012,7 @@ FixedText* OFieldDescControl::CreateText(sal_uInt16 _nTextRes) pFixedText->EnableClipSiblings(); return pFixedText; } -// ----------------------------------------------------------------------------- + OPropNumericEditCtrl* OFieldDescControl::CreateNumericControl(sal_uInt16 _nHelpStr,short _nProperty,const OString& _sHelpId) { OPropNumericEditCtrl* pControl = new OPropNumericEditCtrl( this, _nHelpStr, _nProperty, WB_BORDER ); @@ -1053,12 +1025,11 @@ OPropNumericEditCtrl* OFieldDescControl::CreateNumericControl(sal_uInt16 _nHelpS return pControl; } -//------------------------------------------------------------------------------ + void OFieldDescControl::DeactivateAggregate( EControlType eType ) { DBG_CHKTHIS(OFieldDescControl,NULL); pLastFocusWindow = NULL; - ////////////////////////////////////////////////////////////////////// // Destroy Controls switch( eType ) { @@ -1118,12 +1089,10 @@ void OFieldDescControl::DeactivateAggregate( EControlType eType ) } } -//------------------------------------------------------------------------------ void OFieldDescControl::SetPosSize( Control** ppControl, long nRow, sal_uInt16 nCol ) { DBG_CHKTHIS(OFieldDescControl,NULL); - ////////////////////////////////////////////////////////////////////// // Calculate size const sal_Int32 nControlHeight = GetMaxControlHeight(); Size aSize(0,nControlHeight); @@ -1149,8 +1118,6 @@ void OFieldDescControl::SetPosSize( Control** ppControl, long nRow, sal_uInt16 n } } - - ////////////////////////////////////////////////////////////////////// // Calculate Position Point aPosition; switch( nCol ) @@ -1181,14 +1148,13 @@ void OFieldDescControl::SetPosSize( Control** ppControl, long nRow, sal_uInt16 n aPosition.Y() += ((nRow+1)*nControl_Spacing_y) + (nRow*nControlHeight); - ////////////////////////////////////////////////////////////////////// // Display Control (*ppControl)->SetPosSizePixel( aPosition, aSize ); aSize = (*ppControl)->GetSizePixel(); (*ppControl)->Show(); } -//------------------------------------------------------------------------------ + void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) { DBG_CHKTHIS(OFieldDescControl,NULL); @@ -1208,7 +1174,6 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) DeactivateAggregate( tpType ); DeactivateAggregate( tpAutoIncrementValue ); m_pPreviousType = TOTypeInfoSP(); - ////////////////////////////////////////////////////////////////////// // Reset the saved focus' pointer pLastFocusWindow = NULL; if ( m_bAdded ) @@ -1233,19 +1198,15 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) ActivateAggregate( tpType ); OSL_ENSURE(pFieldType.get(),"We need a type information here!"); - ////////////////////////////////////////////////////////////////////// // If the type has changed, subsitute Controls if( m_pPreviousType != pFieldType ) { - ////////////////////////////////////////////////////////////////////// // Reset the saved focus' pointer pLastFocusWindow = NULL; - ////////////////////////////////////////////////////////////////////// // Controls, which must NOT be displayed again DeactivateAggregate( tpNumType ); - ////////////////////////////////////////////////////////////////////// // determine which controls we should show and which not // 1. the required control @@ -1396,7 +1357,6 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) DeactivateAggregate( tpRequired ); } } - ////////////////////////////////////////////////////////////////////// // Initialize Controls if( pAutoIncrement ) { @@ -1514,12 +1474,9 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) m_pType->SelectEntry(pFieldDescr->getTypeInfo()->aUIName); } - - ////////////////////////////////////////////////////////////////////// // Enable/disable Controls sal_Bool bRead(IsReadOnly()); - ArrangeAggregates(); CheckScrollBars(); ScrollAllAggregates(); @@ -1527,7 +1484,6 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) SetReadOnly( bRead ); } -//------------------------------------------------------------------------------ IMPL_LINK(OFieldDescControl, OnControlFocusGot, Control*, pControl ) { String strHelpText; @@ -1570,7 +1526,6 @@ IMPL_LINK(OFieldDescControl, OnControlFocusGot, Control*, pControl ) return 0L; } -//------------------------------------------------------------------------------ IMPL_LINK(OFieldDescControl, OnControlFocusLost, Control*, pControl ) { if ((pControl == pLength) || (pControl == pTextLen) || (pControl == pScale)) @@ -1605,14 +1560,13 @@ IMPL_LINK(OFieldDescControl, OnControlFocusLost, Control*, pControl ) return 0L; } -//------------------------------------------------------------------------------ + void OFieldDescControl::SaveData( OFieldDescription* pFieldDescr ) { DBG_CHKTHIS(OFieldDescControl,NULL); if( !pFieldDescr ) return; - ////////////////////////////////////////////////////////////////////// // Read out Controls OUString sDefault; if (pDefault) @@ -1651,18 +1605,15 @@ void OFieldDescControl::SaveData( OFieldDescription* pFieldDescr ) pFieldDescr->SetAutoIncrementValue(m_pAutoIncrementValue->GetText()); } -//------------------------------------------------------------------------------ void OFieldDescControl::UpdateFormatSample(OFieldDescription* pFieldDescr) { if ( pFieldDescr && pFormatSample ) pFormatSample->SetText(getControlDefault(pFieldDescr,sal_False)); } -//------------------------------------------------------------------------------ void OFieldDescControl::GetFocus() { DBG_CHKTHIS(OFieldDescControl,NULL); - ////////////////////////////////////////////////////////////////////// // Set the Focus to the Control that has been active last TabPage::GetFocus(); if( pLastFocusWindow ) @@ -1672,24 +1623,20 @@ void OFieldDescControl::GetFocus() } } -//------------------------------------------------------------------------------ void OFieldDescControl::implFocusLost(Window* _pWhich) { DBG_CHKTHIS(OFieldDescControl,NULL); OSL_ENSURE(!_pWhich || IsChild(_pWhich), "OFieldDescControl::implFocusLost : invalid window !"); - ////////////////////////////////////////////////////////////////////// // Remember the active Control if (!pLastFocusWindow) pLastFocusWindow = _pWhich; - ////////////////////////////////////////////////////////////////////// // Reset HelpText if (pHelp && !pHelp->HasChildPathFocus()) pHelp->SetHelpText( String() ); } -//------------------------------------------------------------------------------ void OFieldDescControl::LoseFocus() { DBG_CHKTHIS(OFieldDescControl,NULL); @@ -1698,7 +1645,7 @@ void OFieldDescControl::LoseFocus() TabPage::LoseFocus(); } -// ----------------------------------------------------------------------------- + sal_Bool OFieldDescControl::isCopyAllowed() { sal_Bool bAllowed = (m_pActFocusWindow != NULL) && @@ -1710,7 +1657,7 @@ sal_Bool OFieldDescControl::isCopyAllowed() return bAllowed; } -// ----------------------------------------------------------------------------- + sal_Bool OFieldDescControl::isCutAllowed() { sal_Bool bAllowed = (m_pActFocusWindow != NULL) && @@ -1721,7 +1668,7 @@ sal_Bool OFieldDescControl::isCutAllowed() !static_cast<Edit*>(m_pActFocusWindow)->GetSelected().isEmpty(); return bAllowed; } -// ----------------------------------------------------------------------------- + sal_Bool OFieldDescControl::isPasteAllowed() { sal_Bool bAllowed = (m_pActFocusWindow != NULL) && @@ -1736,25 +1683,25 @@ sal_Bool OFieldDescControl::isPasteAllowed() } return bAllowed; } -// ----------------------------------------------------------------------------- + void OFieldDescControl::cut() { if(isCutAllowed()) static_cast<Edit*>(m_pActFocusWindow)->Cut(); } -// ----------------------------------------------------------------------------- + void OFieldDescControl::copy() { if(isCopyAllowed()) // this only checks if the focus window is valid static_cast<Edit*>(m_pActFocusWindow)->Copy(); } -// ----------------------------------------------------------------------------- + void OFieldDescControl::paste() { if(m_pActFocusWindow) // this only checks if the focus window is valid static_cast<Edit*>(m_pActFocusWindow)->Paste(); } -// ----------------------------------------------------------------------------- + sal_Bool OFieldDescControl::isTextFormat(const OFieldDescription* _pFieldDescr,sal_uInt32& _nFormatKey) const { _nFormatKey = _pFieldDescr->GetFormatKey(); @@ -1783,7 +1730,7 @@ sal_Bool OFieldDescControl::isTextFormat(const OFieldDescription* _pFieldDescr,s return bTextFormat; } -// ----------------------------------------------------------------------------- + String OFieldDescControl::getControlDefault( const OFieldDescription* _pFieldDescr ,sal_Bool _bCheck) const { OUString sDefault; @@ -1817,7 +1764,6 @@ String OFieldDescControl::getControlDefault( const OFieldDescription* _pFieldDes else _pFieldDescr->GetControlDefault() >>= nValue; - Reference< ::com::sun::star::util::XNumberFormatter> xNumberFormatter = GetFormatter(); Reference<XPropertySet> xFormSet = xNumberFormatter->getNumberFormatsSupplier()->getNumberFormats()->getByKey(nFormatKey); OSL_ENSURE(xFormSet.is(),"XPropertySet is null!"); @@ -1836,8 +1782,6 @@ String OFieldDescControl::getControlDefault( const OFieldDescription* _pFieldDes nValue = DBTypeConversion::toNullDate(DBTypeConversion::getNULLDate(xNumberFormatter->getNumberFormatsSupplier()),nValue); } - - Reference< ::com::sun::star::util::XNumberFormatPreviewer> xPreViewer(xNumberFormatter,UNO_QUERY); OSL_ENSURE(xPreViewer.is(),"XNumberFormatPreviewer is null!"); sDefault = xPreViewer->convertNumberToPreviewString(sFormat,nValue,aLocale,sal_True); @@ -1853,6 +1797,5 @@ String OFieldDescControl::getControlDefault( const OFieldDescription* _pFieldDes return sDefault; } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index 4d6143d2654a..b25922316f76 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -69,7 +69,6 @@ namespace dbaui typedef list< pair < opcode, pair < OConnectionLineDataVec::size_type, OConnectionLineDataVec::size_type> > > ops_type; ops_type m_ops; - void fillListBox(const Reference< XPropertySet>& _xDest,long nRow,sal_uInt16 nColumnId); /** returns the column id for the editbrowsebox @param _nColId @@ -123,11 +122,8 @@ namespace dbaui }; - //======================================================================== // class ORelationControl - //======================================================================== DBG_NAME(ORelationControl) - //------------------------------------------------------------------------ ORelationControl::ORelationControl( OTableListBoxControl* pParent ) :EditBrowseBox( pParent, EBBF_SMART_TAB_TRAVEL | EBBF_NOROWPICTURE, WB_TABSTOP | WB_BORDER | BROWSER_AUTOSIZE_LASTCOL) ,m_pBoxControl(pParent) @@ -137,13 +133,11 @@ namespace dbaui DBG_CTOR(ORelationControl,NULL); } - //------------------------------------------------------------------------ ORelationControl::~ORelationControl() { DBG_DTOR(ORelationControl,NULL); } - //------------------------------------------------------------------------ void ORelationControl::Init(const TTableConnectionData::value_type& _pConnData) { DBG_CHKTHIS(ORelationControl,NULL); @@ -153,7 +147,6 @@ namespace dbaui m_pConnData->normalizeLines(); } - //------------------------------------------------------------------------------ void ORelationControl::lateInit() { if ( !m_pConnData.get() ) @@ -169,7 +162,6 @@ namespace dbaui m_pListCell.reset( new ListBoxControl( &GetDataWindow() ) ); - ////////////////////////////////////////////////////////////////////// // set browse mode SetMode( BROWSER_COLUMNSELECTION | BROWSER_HLINESFULL | @@ -185,7 +177,6 @@ namespace dbaui RowInserted(0, m_pConnData->GetConnLineDataList()->size() + 1, sal_True); // add one extra row } - //------------------------------------------------------------------------------ void ORelationControl::Resize() { DBG_CHKTHIS(ORelationControl,NULL); @@ -195,7 +186,6 @@ namespace dbaui SetColumnWidth(2, (nOutputWidth / 2)); } - //------------------------------------------------------------------------------ long ORelationControl::PreNotify(NotifyEvent& rNEvt) { DBG_CHKTHIS(ORelationControl,NULL); @@ -207,21 +197,18 @@ namespace dbaui return EditBrowseBox::PreNotify(rNEvt); } - //------------------------------------------------------------------------------ IMPL_LINK_NOARG(ORelationControl, AsynchActivate) { ActivateCell(); return 0L; } - //------------------------------------------------------------------------------ IMPL_LINK_NOARG(ORelationControl, AsynchDeactivate) { DeactivateCell(); return 0L; } - //------------------------------------------------------------------------------ sal_Bool ORelationControl::IsTabAllowed(sal_Bool bForward) const { DBG_CHKTHIS(ORelationControl,NULL); @@ -234,7 +221,6 @@ namespace dbaui return bRet && EditBrowseBox::IsTabAllowed(bForward); } - //------------------------------------------------------------------------------ sal_Bool ORelationControl::SaveModified() { DBG_CHKTHIS(ORelationControl,NULL); @@ -276,7 +262,6 @@ namespace dbaui return sal_True; } - //------------------------------------------------------------------------------ sal_uInt16 ORelationControl::getColumnIdent( sal_uInt16 _nColId ) const { sal_uInt16 nId = _nColId; @@ -285,7 +270,6 @@ namespace dbaui return nId; } - //------------------------------------------------------------------------------ OUString ORelationControl::GetCellText( long nRow, sal_uInt16 nColId ) const { DBG_CHKTHIS(ORelationControl,NULL); @@ -306,7 +290,6 @@ namespace dbaui return sText; } - //------------------------------------------------------------------------------ void ORelationControl::InitController( CellControllerRef& /*rController*/, long nRow, sal_uInt16 nColumnId ) { DBG_CHKTHIS(ORelationControl,NULL); @@ -344,14 +327,12 @@ namespace dbaui } } - //------------------------------------------------------------------------------ CellController* ORelationControl::GetController( long /*nRow*/, sal_uInt16 /*nColumnId*/ ) { DBG_CHKTHIS(ORelationControl,NULL); return new ListBoxCellController( m_pListCell.get() ); } - //------------------------------------------------------------------------------ sal_Bool ORelationControl::SeekRow( long nRow ) { DBG_CHKTHIS(ORelationControl,NULL); @@ -359,7 +340,6 @@ namespace dbaui return sal_True; } - //------------------------------------------------------------------------------ void ORelationControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const { DBG_CHKTHIS(ORelationControl,NULL); @@ -379,7 +359,6 @@ namespace dbaui if( rDev.IsClipRegion() ) rDev.SetClipRegion(); } - // ----------------------------------------------------------------------------- void ORelationControl::fillListBox(const Reference< XPropertySet>& _xDest,long /*_nRow*/,sal_uInt16 /*nColumnId*/) { m_pListCell->Clear(); @@ -405,7 +384,6 @@ namespace dbaui DBG_UNHANDLED_EXCEPTION(); } } - // ----------------------------------------------------------------------------- void ORelationControl::setWindowTables(const OTableWindow* _pSource,const OTableWindow* _pDest) { // If I edit here, hide @@ -418,7 +396,6 @@ namespace dbaui m_xSourceDef = _pSource->GetTable(); SetColumnTitle(1, _pSource->GetName()); - m_xDestDef = _pDest->GetTable(); SetColumnTitle(2, _pDest->GetName()); @@ -453,7 +430,6 @@ namespace dbaui ActivateCell(); } } - //------------------------------------------------------------------------ void ORelationControl::CellModified() { DBG_CHKTHIS(ORelationControl,NULL); @@ -467,12 +443,9 @@ namespace dbaui assert(parent); parent->NotifyCellChange(); } - //======================================================================== // class OTableListBoxControl DBG_NAME(OTableListBoxControl) -//======================================================================== - OTableListBoxControl::OTableListBoxControl( Window* _pParent ,const ResId& _rResId ,const OJoinTableView::OTableWindowMap* _pTableMap @@ -499,7 +472,6 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent FreeResource(); DBG_CTOR(OTableListBoxControl,NULL); } - // ----------------------------------------------------------------------------- OTableListBoxControl::~OTableListBoxControl() { ORelationControl* pTemp = m_pRC_Tables; @@ -507,7 +479,6 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent delete pTemp; DBG_DTOR(OTableListBoxControl,NULL); } - // ----------------------------------------------------------------------------- void OTableListBoxControl::fillListBoxes() { OSL_ENSURE( !m_pTableMap->empty(), "OTableListBoxControl::fillListBoxes: no table window!"); @@ -558,7 +529,6 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent m_lmbLeftTable.GrabFocus(); } - // ----------------------------------------------------------------------------- IMPL_LINK( OTableListBoxControl, OnTableChanged, ListBox*, pListBox ) { String strSelected(pListBox->GetSelectEntry()); @@ -640,7 +610,6 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent NotifyCellChange(); return 0; } - // ----------------------------------------------------------------------------- void OTableListBoxControl::NotifyCellChange() { // Enable/disable the OK button, depending on having a valid situation @@ -680,25 +649,21 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent m_pRC_Tables->ActivateCell(); m_pRC_Tables->m_ops.clear(); } - // ----------------------------------------------------------------------------- void fillEntryAndDisable(ListBox& _rListBox,const String& _sEntry) { _rListBox.InsertEntry(_sEntry); _rListBox.SelectEntryPos(0); _rListBox.Disable(); } - // ----------------------------------------------------------------------------- void OTableListBoxControl::fillAndDisable(const TTableConnectionData::value_type& _pConnectionData) { fillEntryAndDisable(m_lmbLeftTable,_pConnectionData->getReferencingTable()->GetWinName()); fillEntryAndDisable(m_lmbRightTable,_pConnectionData->getReferencedTable()->GetWinName()); } - // ----------------------------------------------------------------------------- void OTableListBoxControl::Init(const TTableConnectionData::value_type& _pConnData) { m_pRC_Tables->Init(_pConnData); } - // ----------------------------------------------------------------------------- void OTableListBoxControl::lateUIInit(Window* _pTableSeparator) { const sal_Int32 nDiff = LogicToPixel( Point(0,6), MAP_APPFONT ).Y(); @@ -713,7 +678,6 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent m_aFL_InvolvedFields.SetPosPixel(Point(m_aFL_InvolvedFields.GetPosPixel().X(),aDlgPoint.Y())); aDlgPoint.Y() += nDiff + m_aFL_InvolvedFields.GetSizePixel().Height(); } - ////////////////////////////////////////////////////////////////////// // positing BrowseBox control const Size aCurrentSize = GetSizePixel(); Size aDlgSize = LogicToPixel( Size(24,0), MAP_APPFONT ); @@ -725,22 +689,18 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent lateInit(); } - // ----------------------------------------------------------------------------- void OTableListBoxControl::lateInit() { m_pRC_Tables->lateInit(); } - // ----------------------------------------------------------------------------- sal_Bool OTableListBoxControl::SaveModified() { return m_pRC_Tables->SaveModified(); } - // ----------------------------------------------------------------------------- TTableWindowData::value_type OTableListBoxControl::getReferencingTable() const { return m_pRC_Tables->getData()->getReferencingTable(); } - // ----------------------------------------------------------------------------- void OTableListBoxControl::enableRelation(bool _bEnable) { if ( !_bEnable ) @@ -748,8 +708,6 @@ OTableListBoxControl::OTableListBoxControl( Window* _pParent m_pRC_Tables->Enable(_bEnable); } - // ----------------------------------------------------------------------------- } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/control/ScrollHelper.cxx b/dbaccess/source/ui/control/ScrollHelper.cxx index 72a4729ce5b2..3e73655c444d 100644 --- a/dbaccess/source/ui/control/ScrollHelper.cxx +++ b/dbaccess/source/ui/control/ScrollHelper.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "ScrollHelper.hxx" #include <tools/debug.hxx> @@ -26,20 +25,15 @@ namespace dbaui { DBG_NAME(OScrollHelper) -// ----------------------------------------------------------------------------- - - OScrollHelper::OScrollHelper() { DBG_CTOR(OScrollHelper,NULL); } - // ----------------------------------------------------------------------------- OScrollHelper::~OScrollHelper() { DBG_DTOR(OScrollHelper,NULL); } - // ----------------------------------------------------------------------------- void OScrollHelper::scroll(const Point& _rPoint, const Size& _rOutputSize) { // Scrolling Areas @@ -60,9 +54,6 @@ DBG_NAME(OScrollHelper) if ( aToCall.IsSet() ) aToCall.Call( NULL ); } - // ----------------------------------------------------------------------------- } -// ----------------------------------------------------------------------------- - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/control/SqlNameEdit.cxx b/dbaccess/source/ui/control/SqlNameEdit.cxx index 6d815fc8a81b..8a6f861fc51d 100644 --- a/dbaccess/source/ui/control/SqlNameEdit.cxx +++ b/dbaccess/source/ui/control/SqlNameEdit.cxx @@ -20,7 +20,6 @@ #include "SqlNameEdit.hxx" namespace dbaui { - //------------------------------------------------------------------ sal_Bool isCharOk(sal_Unicode _cChar,sal_Bool _bFirstChar,sal_Bool _bUpperCase,const OUString& _sAllowedChars) { return ( @@ -31,7 +30,6 @@ namespace dbaui (!_bUpperCase && (_cChar >= 'a' && _cChar <= 'z')) ); } - //------------------------------------------------------------------ sal_Bool OSQLNameChecker::checkString(const OUString& _sToCheck, OUString& _rsCorrected) { @@ -53,7 +51,6 @@ namespace dbaui } return bCorrected; } - //------------------------------------------------------------------ void OSQLNameEdit::Modify() { OUString sCorrected; @@ -67,7 +64,6 @@ namespace dbaui } Edit::Modify(); } - //------------------------------------------------------------------ void OSQLNameComboBox::Modify() { OUString sCorrected; @@ -82,6 +78,5 @@ namespace dbaui ComboBox::Modify(); } } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx index 187cba27a9d4..28ccfedb5bfd 100644 --- a/dbaccess/source/ui/control/TableGrantCtrl.cxx +++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx @@ -46,9 +46,7 @@ const sal_uInt16 COL_DROP = 8; DBG_NAME(OTableGrantControl) -//================================================================================ // OTableGrantControl -//================================================================================ OTableGrantControl::OTableGrantControl( Window* pParent,const ResId& _RsId) :EditBrowseBox( pParent,_RsId, EBBF_SMART_TAB_TRAVEL | EBBF_NOROWPICTURE ) ,m_pCheckCell( NULL ) @@ -57,7 +55,6 @@ OTableGrantControl::OTableGrantControl( Window* pParent,const ResId& _RsId) ,m_nDeactivateEvent(0) { DBG_CTOR(OTableGrantControl,NULL); - ////////////////////////////////////////////////////////////////////// // Spalten einfuegen sal_uInt16 i=1; InsertDataColumn( i, String(ModuleRes(STR_TABLE_PRIV_NAME) ), 75); @@ -74,7 +71,6 @@ OTableGrantControl::OTableGrantControl( Window* pParent,const ResId& _RsId) SetColumnWidth(i,GetAutoColumnWidth(i)); } -//------------------------------------------------------------------------ OTableGrantControl::~OTableGrantControl() { DBG_DTOR(OTableGrantControl,NULL); @@ -89,7 +85,7 @@ OTableGrantControl::~OTableGrantControl() m_xTables = NULL; } -// ----------------------------------------------------------------------------- + void OTableGrantControl::setTablesSupplier(const Reference< XTablesSupplier >& _xTablesSup) { // first we need the users @@ -107,12 +103,12 @@ void OTableGrantControl::setTablesSupplier(const Reference< XTablesSupplier >& _ OSL_ENSURE(m_xUsers.is(),"No user access supported!"); OSL_ENSURE(m_xTables.is(),"No tables supported!"); } -// ----------------------------------------------------------------------------- + void OTableGrantControl::setComponentContext(const Reference< ::com::sun::star::uno::XComponentContext>& _rxContext) { m_xContext = _rxContext; } -//------------------------------------------------------------------------ + void OTableGrantControl::UpdateTables() { RemoveRows(); @@ -121,13 +117,12 @@ void OTableGrantControl::UpdateTables() RowInserted(0, m_aTableNames.getLength()); // m_bEnable = m_xDb->GetUser() != ((OUserAdmin*)GetParent())->GetUser(); } -//------------------------------------------------------------------------ + void OTableGrantControl::Init() { DBG_CHKTHIS(OTableGrantControl,NULL); EditBrowseBox::Init(); - ////////////////////////////////////////////////////////////////////// // ComboBox instanzieren if(!m_pCheckCell) { @@ -140,7 +135,6 @@ void OTableGrantControl::Init() } UpdateTables(); - ////////////////////////////////////////////////////////////////////// // Browser Mode setzen BrowserMode nMode = BROWSER_COLUMNSELECTION | BROWSER_HLINESFULL | BROWSER_VLINESFULL | BROWSER_HIDECURSOR | BROWSER_HIDESELECT; @@ -148,14 +142,12 @@ void OTableGrantControl::Init() SetMode(nMode); } -//------------------------------------------------------------------------------ void OTableGrantControl::Resize() { DBG_CHKTHIS(OTableGrantControl,NULL); EditBrowseBox::Resize(); } -//------------------------------------------------------------------------------ long OTableGrantControl::PreNotify(NotifyEvent& rNEvt) { DBG_CHKTHIS(OTableGrantControl,NULL); @@ -175,7 +167,6 @@ long OTableGrantControl::PreNotify(NotifyEvent& rNEvt) return EditBrowseBox::PreNotify(rNEvt); } -//------------------------------------------------------------------------------ IMPL_LINK_NOARG(OTableGrantControl, AsynchActivate) { m_nDeactivateEvent = 0; @@ -183,7 +174,6 @@ IMPL_LINK_NOARG(OTableGrantControl, AsynchActivate) return 0L; } -//------------------------------------------------------------------------------ IMPL_LINK_NOARG(OTableGrantControl, AsynchDeactivate) { m_nDeactivateEvent = 0; @@ -191,7 +181,6 @@ IMPL_LINK_NOARG(OTableGrantControl, AsynchDeactivate) return 0L; } -//------------------------------------------------------------------------------ sal_Bool OTableGrantControl::IsTabAllowed(sal_Bool bForward) const { DBG_CHKTHIS(OTableGrantControl,NULL); @@ -206,14 +195,13 @@ sal_Bool OTableGrantControl::IsTabAllowed(sal_Bool bForward) const return EditBrowseBox::IsTabAllowed(bForward); } -//------------------------------------------------------------------------------ + #define GRANT_REVOKE_RIGHT(what) \ if(m_pCheckCell->GetBox().IsChecked()) \ xAuth->grantPrivileges(sTableName,PrivilegeObject::TABLE,what);\ else \ xAuth->revokePrivileges(sTableName,PrivilegeObject::TABLE,what) -//------------------------------------------------------------------------------ sal_Bool OTableGrantControl::SaveModified() { DBG_CHKTHIS(OTableGrantControl,NULL); @@ -273,7 +261,6 @@ sal_Bool OTableGrantControl::SaveModified() return bErg; } -//------------------------------------------------------------------------------ OUString OTableGrantControl::GetCellText( long nRow, sal_uInt16 nColId ) const { DBG_CHKTHIS(OTableGrantControl,NULL); @@ -288,7 +275,6 @@ OUString OTableGrantControl::GetCellText( long nRow, sal_uInt16 nColId ) const return OUString::number(isAllowed(nColId,nPriv) ? 1 :0); } -//------------------------------------------------------------------------------ void OTableGrantControl::InitController( CellControllerRef& /*rController*/, long nRow, sal_uInt16 nColumnId ) { DBG_CHKTHIS(OTableGrantControl,NULL); @@ -303,7 +289,7 @@ void OTableGrantControl::InitController( CellControllerRef& /*rController*/, lon m_pCheckCell->GetBox().Check(aFind != m_aPrivMap.end() ? isAllowed(nColumnId,aFind->second.nRights) : sal_False); } } -// ----------------------------------------------------------------------------- + void OTableGrantControl::fillPrivilege(sal_Int32 _nRow) const { @@ -334,7 +320,7 @@ void OTableGrantControl::fillPrivilege(sal_Int32 _nRow) const } } } -// ----------------------------------------------------------------------------- + sal_Bool OTableGrantControl::isAllowed(sal_uInt16 _nColumnId,sal_Int32 _nPrivilege) const { sal_Bool bAllowed = sal_False; @@ -364,19 +350,19 @@ sal_Bool OTableGrantControl::isAllowed(sal_uInt16 _nColumnId,sal_Int32 _nPrivile } return bAllowed; } -// ----------------------------------------------------------------------------- + void OTableGrantControl::setUserName(const OUString _sUserName) { m_sUserName = _sUserName; m_aPrivMap = TTablePrivilegeMap(); } -// ----------------------------------------------------------------------------- + void OTableGrantControl::setGrantUser(const Reference< XAuthorizable>& _xGrantUser) { OSL_ENSURE(_xGrantUser.is(),"OTableGrantControl::setGrantUser: GrantUser is null!"); m_xGrantUser = _xGrantUser; } -//------------------------------------------------------------------------------ + CellController* OTableGrantControl::GetController( long nRow, sal_uInt16 nColumnId ) { DBG_CHKTHIS(OTableGrantControl,NULL); @@ -404,7 +390,7 @@ CellController* OTableGrantControl::GetController( long nRow, sal_uInt16 nColumn } return pController; } -//------------------------------------------------------------------------------ + sal_Bool OTableGrantControl::SeekRow( long nRow ) { DBG_CHKTHIS(OTableGrantControl,NULL); @@ -413,7 +399,6 @@ sal_Bool OTableGrantControl::SeekRow( long nRow ) return (nRow <= m_aTableNames.getLength()); } -//------------------------------------------------------------------------------ void OTableGrantControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const { DBG_CHKTHIS(OTableGrantControl,NULL); @@ -446,14 +431,13 @@ void OTableGrantControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, rDev.SetClipRegion(); } -//------------------------------------------------------------------------ void OTableGrantControl::CellModified() { DBG_CHKTHIS(OTableGrantControl,NULL); EditBrowseBox::CellModified(); SaveModified(); } -// ----------------------------------------------------------------------------- + OTableGrantControl::TTablePrivilegeMap::const_iterator OTableGrantControl::findPrivilege(sal_Int32 _nRow) const { TTablePrivilegeMap::const_iterator aFind = m_aPrivMap.find(m_aTableNames[_nRow]); @@ -464,7 +448,7 @@ OTableGrantControl::TTablePrivilegeMap::const_iterator OTableGrantControl::findP } return aFind; } -// ----------------------------------------------------------------------------- + Reference< XAccessible > OTableGrantControl::CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) { sal_uInt16 nColumnId = GetColumnId( _nColumnPos ); @@ -483,6 +467,5 @@ Reference< XAccessible > OTableGrantControl::CreateAccessibleCell( sal_Int32 _nR } return EditBrowseBox::CreateAccessibleCell( _nRow, _nColumnPos ); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/control/VertSplitView.cxx b/dbaccess/source/ui/control/VertSplitView.cxx index 13e6905c7a6c..c6db93c4b350 100644 --- a/dbaccess/source/ui/control/VertSplitView.cxx +++ b/dbaccess/source/ui/control/VertSplitView.cxx @@ -26,9 +26,7 @@ using namespace ::dbaui; -//================================================================== // class OSplitterView -//================================================================== DBG_NAME(OSplitterView) OSplitterView::OSplitterView(Window* _pParent,sal_Bool _bVertical) : Window(_pParent,WB_DIALOGCONTROL) // ,WB_BORDER ,m_pSplitter( NULL ) @@ -39,13 +37,13 @@ OSplitterView::OSplitterView(Window* _pParent,sal_Bool _bVertical) : Window(_pPa DBG_CTOR(OSplitterView,NULL); ImplInitSettings( sal_True, sal_True, sal_True ); } -// ----------------------------------------------------------------------------- + OSplitterView::~OSplitterView() { DBG_DTOR(OSplitterView,NULL); m_pRight = m_pLeft = NULL; } -//------------------------------------------------------------------------------ + IMPL_LINK( OSplitterView, SplitHdl, Splitter*, /*pSplit*/ ) { OSL_ENSURE(m_pSplitter, "Splitter is NULL!"); @@ -60,7 +58,7 @@ IMPL_LINK( OSplitterView, SplitHdl, Splitter*, /*pSplit*/ ) Resize(); return 0L; } -// ----------------------------------------------------------------------------- + void OSplitterView::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -90,7 +88,7 @@ void OSplitterView::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_ SetBackground( rStyleSettings.GetFaceColor() ); } } -// ----------------------------------------------------------------------- + void OSplitterView::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); @@ -102,7 +100,7 @@ void OSplitterView::DataChanged( const DataChangedEvent& rDCEvt ) Invalidate(); } } -// ----------------------------------------------------------------------------- + void OSplitterView::GetFocus() { Window::GetFocus(); @@ -114,7 +112,6 @@ void OSplitterView::GetFocus() m_pRight->GrabFocus(); } -// ------------------------------------------------------------------------- void OSplitterView::Resize() { Window::Resize(); @@ -187,13 +184,13 @@ void OSplitterView::Resize() } } -// ----------------------------------------------------------------------------- + void OSplitterView::set(Window* _pRight,Window* _pLeft) { m_pLeft = _pLeft; m_pRight = _pRight; } -// ----------------------------------------------------------------------------- + void OSplitterView::setSplitter(Splitter* _pSplitter) { m_pSplitter = _pSplitter; diff --git a/dbaccess/source/ui/control/charsetlistbox.cxx b/dbaccess/source/ui/control/charsetlistbox.cxx index 3d698e06b08a..c1c6e0b9a6b1 100644 --- a/dbaccess/source/ui/control/charsetlistbox.cxx +++ b/dbaccess/source/ui/control/charsetlistbox.cxx @@ -23,13 +23,9 @@ #include <svl/stritem.hxx> #include <osl/diagnose.h> -//........................................................................ namespace dbaui { - //==================================================================== - //= CharSetListBox - //==================================================================== - //-------------------------------------------------------------------- + // CharSetListBox CharSetListBox::CharSetListBox( Window* _pParent, const ResId& _rResId ) :ListBox( _pParent, _rResId ) { @@ -43,12 +39,10 @@ namespace dbaui } } - //-------------------------------------------------------------------- CharSetListBox::~CharSetListBox() { } - //-------------------------------------------------------------------- void CharSetListBox::SelectEntryByIanaName( const String& _rIanaName ) { OCharsetDisplay::const_iterator aFind = m_aCharSets.findIanaName( _rIanaName ); @@ -78,7 +72,6 @@ namespace dbaui } } - //-------------------------------------------------------------------- bool CharSetListBox::StoreSelectedCharSet( SfxItemSet& _rSet, const sal_uInt16 _nItemId ) { bool bChangedSomething = false; @@ -95,8 +88,6 @@ namespace dbaui return bChangedSomething; } -//........................................................................ } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx index 9ed5523e1552..7adf78e70403 100644 --- a/dbaccess/source/ui/control/curledit.cxx +++ b/dbaccess/source/ui/control/curledit.cxx @@ -17,19 +17,14 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "curledit.hxx" #include <vcl/svapp.hxx> #include <osl/diagnose.h> -//......................................................................... namespace dbaui { -//......................................................................... DBG_NAME(OConnectionURLEdit) -//========================================================================= -//= OConnectionURLEdit -//========================================================================= +// OConnectionURLEdit OConnectionURLEdit::OConnectionURLEdit(Window* _pParent, const ResId& _rResId,sal_Bool _bShowPrefix) :Edit(_pParent, _rResId) ,m_pTypeCollection(NULL) @@ -39,7 +34,6 @@ OConnectionURLEdit::OConnectionURLEdit(Window* _pParent, const ResId& _rResId,sa DBG_CTOR(OConnectionURLEdit ,NULL); } -//------------------------------------------------------------------------- OConnectionURLEdit::~OConnectionURLEdit() { DBG_DTOR(OConnectionURLEdit ,NULL); @@ -50,7 +44,6 @@ OConnectionURLEdit::~OConnectionURLEdit() delete m_pForcedPrefix; } -//------------------------------------------------------------------------- void OConnectionURLEdit::SetTextNoPrefix(const String& _rText) { OSL_ENSURE(GetSubEdit(), "OConnectionURLEdit::SetTextNoPrefix: have no current type, not changing the text!"); @@ -58,7 +51,6 @@ void OConnectionURLEdit::SetTextNoPrefix(const String& _rText) GetSubEdit()->SetText(_rText); } -//------------------------------------------------------------------------- String OConnectionURLEdit::GetTextNoPrefix() const { if (GetSubEdit()) @@ -66,14 +58,12 @@ String OConnectionURLEdit::GetTextNoPrefix() const return GetText(); } -//------------------------------------------------------------------------- void OConnectionURLEdit::SetText(const OUString& _rStr) { Selection aNoSelection(0,0); SetText(_rStr, aNoSelection); } -//------------------------------------------------------------------------- void OConnectionURLEdit::SetText(const OUString& _rStr, const Selection& /*_rNewSelection*/) { // create new sub controls, if necessary @@ -125,22 +115,20 @@ void OConnectionURLEdit::SetText(const OUString& _rStr, const Selection& /*_rNew Edit::SetText( sNewText ); } -//------------------------------------------------------------------------- OUString OConnectionURLEdit::GetText() const { if ( m_pForcedPrefix ) return m_pForcedPrefix->GetText() += Edit::GetText(); return Edit::GetText(); } -// ----------------------------------------------------------------------------- + void OConnectionURLEdit::ShowPrefix(sal_Bool _bShowPrefix) { m_bShowPrefix = _bShowPrefix; if ( m_pForcedPrefix ) m_pForcedPrefix->Show(m_bShowPrefix); } -//......................................................................... + } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index d5c8816ef482..f6a456276498 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbtreelistbox.hxx" #include "dbu_resource.hrc" #include "browserids.hxx" @@ -41,10 +40,8 @@ #include <memory> -// ......................................................................... namespace dbaui { -// ......................................................................... using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -57,10 +54,7 @@ using namespace ::com::sun::star::view; DBG_NAME(DBTreeListBox) #define SPACEBETWEENENTRIES 4 -//======================================================================== // class DBTreeListBox -//======================================================================== -//------------------------------------------------------------------------ DBTreeListBox::DBTreeListBox( Window* pParent, WinBits nWinStyle ,sal_Bool _bHandleEnterKey) :SvTreeListBox(pParent,nWinStyle) ,m_pDragedEntry(NULL) @@ -71,7 +65,7 @@ DBTreeListBox::DBTreeListBox( Window* pParent, WinBits nWinStyle ,sal_Bool _bHan DBG_CTOR(DBTreeListBox,NULL); init(); } -// ----------------------------------------------------------------------------- + DBTreeListBox::DBTreeListBox( Window* pParent, const ResId& rResId,sal_Bool _bHandleEnterKey) :SvTreeListBox(pParent,rResId) ,m_pDragedEntry(NULL) @@ -82,7 +76,7 @@ DBTreeListBox::DBTreeListBox( Window* pParent, const ResId& rResId,sal_Bool _bHa DBG_CTOR(DBTreeListBox,NULL); init(); } -// ----------------------------------------------------------------------------- + void DBTreeListBox::init() { sal_uInt16 nSize = SPACEBETWEENENTRIES; @@ -100,13 +94,13 @@ void DBTreeListBox::init() SetStyle( GetStyle() | WB_QUICK_SEARCH ); } -//------------------------------------------------------------------------ + DBTreeListBox::~DBTreeListBox() { DBG_DTOR(DBTreeListBox,NULL); implStopSelectionTimer(); } -//------------------------------------------------------------------------ + SvTreeListEntry* DBTreeListBox::GetEntryPosByName( const String& aName, SvTreeListEntry* pStart, const IEntryFilter* _pFilter ) const { SvTreeList* myModel = GetModel(); @@ -133,13 +127,11 @@ SvTreeListEntry* DBTreeListBox::GetEntryPosByName( const String& aName, SvTreeLi return pEntry; } -// ------------------------------------------------------------------------- void DBTreeListBox::EnableExpandHandler(SvTreeListEntry* _pEntry) { LINK(this, DBTreeListBox, OnResetEntry).Call(_pEntry); } -// ------------------------------------------------------------------------- void DBTreeListBox::RequestingChildren( SvTreeListEntry* pParent ) { if (m_aPreExpandHandler.IsSet()) @@ -154,7 +146,6 @@ void DBTreeListBox::RequestingChildren( SvTreeListEntry* pParent ) } } -// ------------------------------------------------------------------------- void DBTreeListBox::InitEntry(SvTreeListEntry* _pEntry, const OUString& aStr, const Image& _rCollEntryBmp, const Image& _rExpEntryBmp, SvLBoxButtonKind eButtonKind) { SvTreeListBox::InitEntry( _pEntry, aStr, _rCollEntryBmp,_rExpEntryBmp, eButtonKind); @@ -163,29 +154,25 @@ void DBTreeListBox::InitEntry(SvTreeListEntry* _pEntry, const OUString& aStr, co _pEntry->ReplaceItem( pString,_pEntry->GetPos(pTextItem)); } -// ------------------------------------------------------------------------- void DBTreeListBox::implStopSelectionTimer() { if ( m_aTimer.IsActive() ) m_aTimer.Stop(); } -// ------------------------------------------------------------------------- void DBTreeListBox::implStartSelectionTimer() { implStopSelectionTimer(); m_aTimer.Start(); } -// ----------------------------------------------------------------------------- - void DBTreeListBox::DeselectHdl() { m_aSelectedEntries.erase( GetHdlEntry() ); SvTreeListBox::DeselectHdl(); implStartSelectionTimer(); } -// ------------------------------------------------------------------------- + void DBTreeListBox::SelectHdl() { m_aSelectedEntries.insert( GetHdlEntry() ); @@ -193,7 +180,6 @@ void DBTreeListBox::SelectHdl() implStartSelectionTimer(); } -// ------------------------------------------------------------------------- void DBTreeListBox::MouseButtonDown( const MouseEvent& rMEvt ) { sal_Bool bHitEmptySpace = (NULL == GetEntry(rMEvt.GetPosPixel(), sal_True)); @@ -203,7 +189,6 @@ void DBTreeListBox::MouseButtonDown( const MouseEvent& rMEvt ) SvTreeListBox::MouseButtonDown(rMEvt); } -// ------------------------------------------------------------------------- IMPL_LINK(DBTreeListBox, OnResetEntry, SvTreeListEntry*, pEntry) { // set the flag which allows if the entry can be expanded @@ -212,7 +197,7 @@ IMPL_LINK(DBTreeListBox, OnResetEntry, SvTreeListEntry*, pEntry) GetModel()->InvalidateEntry( pEntry ); return 0L; } -// ----------------------------------------------------------------------------- + void DBTreeListBox::ModelHasEntryInvalidated( SvTreeListEntry* _pEntry ) { SvTreeListBox::ModelHasEntryInvalidated( _pEntry ); @@ -229,7 +214,7 @@ void DBTreeListBox::ModelHasEntryInvalidated( SvTreeListEntry* _pEntry ) } } } -// ------------------------------------------------------------------------- + void DBTreeListBox::ModelHasRemoved( SvTreeListEntry* _pEntry ) { SvTreeListBox::ModelHasRemoved(_pEntry); @@ -241,7 +226,6 @@ void DBTreeListBox::ModelHasRemoved( SvTreeListEntry* _pEntry ) } } -// ------------------------------------------------------------------------- sal_Int8 DBTreeListBox::AcceptDrop( const AcceptDropEvent& _rEvt ) { sal_Int8 nDropOption = DND_ACTION_NONE; @@ -282,7 +266,6 @@ sal_Int8 DBTreeListBox::AcceptDrop( const AcceptDropEvent& _rEvt ) return nDropOption; } -// ------------------------------------------------------------------------- sal_Int8 DBTreeListBox::ExecuteDrop( const ExecuteDropEvent& _rEvt ) { if ( m_pActionListener ) @@ -291,7 +274,6 @@ sal_Int8 DBTreeListBox::ExecuteDrop( const ExecuteDropEvent& _rEvt ) return DND_ACTION_NONE; } -// ------------------------------------------------------------------------- void DBTreeListBox::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) { if ( m_pActionListener ) @@ -307,7 +289,6 @@ void DBTreeListBox::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) } } -// ------------------------------------------------------------------------- void DBTreeListBox::RequestHelp( const HelpEvent& rHEvt ) { if ( !m_pActionListener ) @@ -338,7 +319,6 @@ void DBTreeListBox::RequestHelp( const HelpEvent& rHEvt ) SvTreeListBox::RequestHelp( rHEvt ); } -// ----------------------------------------------------------------------------- void DBTreeListBox::KeyInput( const KeyEvent& rKEvt ) { KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction(); @@ -380,10 +360,14 @@ void DBTreeListBox::KeyInput( const KeyEvent& rKEvt ) if ( m_aEnterKeyHdl.IsSet() ) m_aEnterKeyHdl.Call(this); // this is a HACK. If the data source browser is opened in the "beamer", while the main frame + // // contains a writer document, then pressing enter in the DSB would be rerouted to the writer + // // document if we would not do this hack here. // The problem is that the Writer uses RETURN as _accelerator_ (which is quite weird itself), + // // so the SFX framework is _obligated_ to pass it to the Writer if nobody else handled it. There + // // is no chance to distinguish between // "accelerators which are to be executed if the main document has the focus" // and @@ -401,12 +385,12 @@ void DBTreeListBox::KeyInput( const KeyEvent& rKEvt ) if ( !bHandled ) SvTreeListBox::KeyInput(rKEvt); } -// ----------------------------------------------------------------------------- + sal_Bool DBTreeListBox::EditingEntry( SvTreeListEntry* pEntry, Selection& /*_aSelection*/) { return m_aEditingHandler.Call(pEntry) != 0; } -// ----------------------------------------------------------------------------- + sal_Bool DBTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ) { DBTreeEditedEntry aEntry; @@ -422,7 +406,6 @@ sal_Bool DBTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rN return sal_False; // we never want that the base change our text } -// ----------------------------------------------------------------------------- sal_Bool DBTreeListBox::DoubleClickHdl() { long nResult = aDoubleClickHdl.Call( this ); @@ -430,7 +413,6 @@ sal_Bool DBTreeListBox::DoubleClickHdl() return nResult == 0; } -// ----------------------------------------------------------------------------- void scrollWindow(DBTreeListBox* _pListBox, const Point& _rPos,sal_Bool _bUp) { SvTreeListEntry* pEntry = _pListBox->GetEntry( _rPos ); @@ -439,20 +421,19 @@ void scrollWindow(DBTreeListBox* _pListBox, const Point& _rPos,sal_Bool _bUp) _pListBox->ScrollOutputArea( _bUp ? -1 : 1 ); } } -// ----------------------------------------------------------------------------- + IMPL_LINK( DBTreeListBox, ScrollUpHdl, SvTreeListBox*, /*pBox*/ ) { scrollWindow(this,m_aMousePos,sal_True); return 0; } -//------------------------------------------------------------------------------ IMPL_LINK( DBTreeListBox, ScrollDownHdl, SvTreeListBox*, /*pBox*/ ) { scrollWindow(this,m_aMousePos,sal_False); return 0; } -// ----------------------------------------------------------------------------- + namespace { void lcl_enableEntries( PopupMenu* _pPopup, IController& _rController ) @@ -487,7 +468,6 @@ namespace } } -// ----------------------------------------------------------------------------- namespace { void lcl_adjustMenuItemIDs( Menu& _rMenu, IController& _rCommandController ) @@ -548,9 +528,7 @@ namespace _rMenu.SetItemImage(nId,framework::GetImageFromURL(xFrame,aCommand,sal_False)); } } - // ========================================================================= - // = SelectionSupplier - // ========================================================================= + // SelectionSupplier typedef ::cppu::WeakImplHelper1 < XSelectionSupplier > SelectionSupplier_Base; class SelectionSupplier : public SelectionSupplier_Base @@ -575,27 +553,23 @@ namespace Any m_aSelection; }; - //-------------------------------------------------------------------- ::sal_Bool SAL_CALL SelectionSupplier::select( const Any& /*_Selection*/ ) throw (IllegalArgumentException, RuntimeException) { throw IllegalArgumentException(); // API bug: this should be a NoSupportException } - //-------------------------------------------------------------------- Any SAL_CALL SelectionSupplier::getSelection( ) throw (RuntimeException) { return m_aSelection; } - //-------------------------------------------------------------------- void SAL_CALL SelectionSupplier::addSelectionChangeListener( const Reference< XSelectionChangeListener >& /*_Listener*/ ) throw (RuntimeException) { OSL_FAIL( "SelectionSupplier::removeSelectionChangeListener: no support!" ); // API bug: this should be a NoSupportException } - //-------------------------------------------------------------------- void SAL_CALL SelectionSupplier::removeSelectionChangeListener( const Reference< XSelectionChangeListener >& /*_Listener*/ ) throw (RuntimeException) { OSL_FAIL( "SelectionSupplier::removeSelectionChangeListener: no support!" ); @@ -603,7 +577,6 @@ namespace } } -// ----------------------------------------------------------------------------- PopupMenu* DBTreeListBox::CreateContextMenu( void ) { ::std::auto_ptr< PopupMenu > pContextMenu; @@ -688,14 +661,12 @@ PopupMenu* DBTreeListBox::CreateContextMenu( void ) return pContextMenu.release(); } -// ----------------------------------------------------------------------------- void DBTreeListBox::ExcecuteContextMenuAction( sal_uInt16 _nSelectedPopupEntry ) { if ( m_pContextMenuProvider && _nSelectedPopupEntry ) m_pContextMenuProvider->getCommandController().executeChecked( _nSelectedPopupEntry, Sequence< PropertyValue >() ); } -// ----------------------------------------------------------------------------- IMPL_LINK(DBTreeListBox, OnTimeOut, void*, /*EMPTY_ARG*/) { implStopSelectionTimer(); @@ -703,14 +674,13 @@ IMPL_LINK(DBTreeListBox, OnTimeOut, void*, /*EMPTY_ARG*/) m_aSelChangeHdl.Call( NULL ); return 0L; } -// ----------------------------------------------------------------------------- + void DBTreeListBox::StateChanged( StateChangedType nStateChange ) { if ( nStateChange == STATE_CHANGE_VISIBLE ) implStopSelectionTimer(); } -// ......................................................................... + } // namespace dbaui -// ......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/control/listviewitems.cxx b/dbaccess/source/ui/control/listviewitems.cxx index c98228caa08d..406eb6e580e3 100644 --- a/dbaccess/source/ui/control/listviewitems.cxx +++ b/dbaccess/source/ui/control/listviewitems.cxx @@ -17,19 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "listviewitems.hxx" #include "svtools/viewdataentry.hxx" -//........................................................................ namespace dbaui { -//........................................................................ - //======================================================================== // class OBoldListboxString - //======================================================================== - //------------------------------------------------------------------------ void OBoldListboxString::InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, SvViewDataItem* _pViewData) { SvLBoxString::InitViewData( pView, pEntry, _pViewData ); @@ -68,8 +62,6 @@ namespace dbaui SvLBoxString::Paint(rPos, rDev, pView, pEntry); } -//........................................................................ } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx index b3136fc785d4..061a66e511d7 100644 --- a/dbaccess/source/ui/control/opendoccontrols.cxx +++ b/dbaccess/source/ui/control/opendoccontrols.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "opendoccontrols.hxx" #include <com/sun/star/uno/Sequence.hxx> @@ -40,10 +39,8 @@ #include <osl/diagnose.h> #include <vcl/builder.hxx> -//........................................................................ namespace dbaui { -//........................................................................ namespace { @@ -155,27 +152,21 @@ namespace dbaui return aIcon; } - } - //==================================================================== - //= OpenButton - //==================================================================== + // OpenButton - //-------------------------------------------------------------------- OpenDocumentButton::OpenDocumentButton( Window* _pParent, const sal_Char* _pAsciiModuleName ) :PushButton( _pParent ) { impl_init( _pAsciiModuleName ); } - //-------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeOpenDocumentButton( Window *pParent, VclBuilder::stringmap & ) { return new OpenDocumentButton( pParent, "com.sun.star.sdb.OfficeDatabaseDocument" ); } - //-------------------------------------------------------------------- void OpenDocumentButton::impl_init( const sal_Char* _pAsciiModuleName ) { OSL_ENSURE( _pAsciiModuleName, "OpenDocumentButton::impl_init: invalid module name!" ); @@ -193,24 +184,19 @@ namespace dbaui SetStyle( GetStyle() | WB_CENTER ); } - //==================================================================== - //= OpenDocumentListBox - //==================================================================== + // OpenDocumentListBox - //-------------------------------------------------------------------- OpenDocumentListBox::OpenDocumentListBox( Window* _pParent, const sal_Char* _pAsciiModuleName ) :ListBox( _pParent, WB_BORDER | WB_DROPDOWN ) { impl_init( _pAsciiModuleName ); } - //-------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeOpenDocumentListBox( Window *pParent, VclBuilder::stringmap & ) { return new OpenDocumentListBox( pParent, "com.sun.star.sdb.OfficeDatabaseDocument" ); } - //-------------------------------------------------------------------- void OpenDocumentListBox::impl_init( const sal_Char* _pAsciiModuleName ) { OSL_ENSURE( _pAsciiModuleName, "OpenDocumentListBox::impl_init: invalid module name!" ); @@ -265,7 +251,6 @@ namespace dbaui } } - //-------------------------------------------------------------------- String OpenDocumentListBox::GetSelectedDocumentURL() const { String sURL; @@ -275,7 +260,6 @@ namespace dbaui return sURL; } - //-------------------------------------------------------------------- String OpenDocumentListBox::GetSelectedDocumentFilter() const { String sFilter; @@ -285,7 +269,6 @@ namespace dbaui return sFilter; } - //-------------------------------------------------------------------- OpenDocumentListBox::StringPair OpenDocumentListBox::impl_getDocumentAtIndex( sal_uInt16 _nListIndex, bool _bSystemNotation ) const { MapIndexToStringPair::const_iterator pos = m_aURLs.find( _nListIndex ); @@ -304,7 +287,6 @@ namespace dbaui return aDocumentDescriptor; } - //-------------------------------------------------------------------- void OpenDocumentListBox::RequestHelp( const HelpEvent& _rHEvt ) { if( !( _rHEvt.GetMode() & HELPMODE_QUICK ) ) @@ -325,8 +307,6 @@ namespace dbaui } } -//........................................................................ } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index 28684605f471..adc36440ce52 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "tabletree.hxx" #include "imageprovider.hxx" #include "moduledbu.hxx" @@ -46,10 +45,8 @@ #include <algorithm> #include <o3tl/compat_functional.hxx> -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdb; @@ -66,9 +63,7 @@ using namespace ::comphelper; namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject; namespace DatabaseObjectContainer = ::com::sun::star::sdb::application::DatabaseObjectContainer; -//======================================================================== -//= OTableTreeListBox -//======================================================================== +// OTableTreeListBox OTableTreeListBox::OTableTreeListBox( Window* pParent, WinBits nWinStyle, sal_Bool _bVirtualRoot ) :OMarkableTreeListBox(pParent, nWinStyle) ,m_pImageProvider( new ImageProvider ) @@ -77,7 +72,7 @@ OTableTreeListBox::OTableTreeListBox( Window* pParent, WinBits nWinStyle, sal_Bo { implSetDefaultImages(); } -//------------------------------------------------------------------------ + OTableTreeListBox::OTableTreeListBox( Window* pParent, const ResId& rResId, sal_Bool _bVirtualRoot) :OMarkableTreeListBox(pParent, rResId) ,m_pImageProvider( new ImageProvider ) @@ -87,12 +82,10 @@ OTableTreeListBox::OTableTreeListBox( Window* pParent, const ResId& rResId, sal_ implSetDefaultImages(); } -// ----------------------------------------------------------------------------- OTableTreeListBox::~OTableTreeListBox() { } -// ----------------------------------------------------------------------------- void OTableTreeListBox::implSetDefaultImages() { ImageProvider aImageProvider; @@ -100,7 +93,6 @@ void OTableTreeListBox::implSetDefaultImages() SetDefaultCollapsedEntryBmp( aImageProvider.getFolderImage( DatabaseObject::TABLE ) ); } -// ----------------------------------------------------------------------------- bool OTableTreeListBox::isFolderEntry( const SvTreeListEntry* _pEntry ) const { sal_Int32 nEntryType = reinterpret_cast< sal_IntPtr >( _pEntry->GetUserData() ); @@ -112,7 +104,6 @@ bool OTableTreeListBox::isFolderEntry( const SvTreeListEntry* _pEntry ) const return false; } -// ----------------------------------------------------------------------------- void OTableTreeListBox::notifyHiContrastChanged() { implSetDefaultImages(); @@ -148,14 +139,12 @@ void OTableTreeListBox::notifyHiContrastChanged() } } -//------------------------------------------------------------------------ void OTableTreeListBox::implOnNewConnection( const Reference< XConnection >& _rxConnection ) { m_xConnection = _rxConnection; m_pImageProvider.reset( new ImageProvider( m_xConnection ) ); } -//------------------------------------------------------------------------ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConnection ) throw(SQLException) { Sequence< OUString > sTables, sViews; @@ -198,7 +187,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn UpdateTableList( _rxConnection, sTables, sViews ); } -// ----------------------------------------------------------------------------- + namespace { struct OViewSetter : public ::std::unary_function< OTableTreeListBox::TNames::value_type, bool> @@ -220,7 +209,7 @@ namespace }; } -// ----------------------------------------------------------------------------- + void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConnection, const Sequence< OUString>& _rTables, @@ -244,7 +233,6 @@ void OTableTreeListBox::UpdateTableList( UpdateTableList( _rxConnection, aTables ); } -//------------------------------------------------------------------------ namespace { ::std::vector< OUString > lcl_getMetaDataStrings_throw( const Reference< XResultSet >& _rxMetaDataResult, sal_Int32 _nColumnIndex ) @@ -263,7 +251,6 @@ namespace } } -//------------------------------------------------------------------------ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConnection, const TNames& _rTables ) { implOnNewConnection( _rxConnection ); @@ -343,7 +330,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn DBG_UNHANDLED_EXCEPTION(); } } -//------------------------------------------------------------------------ + sal_Bool OTableTreeListBox::isWildcardChecked(SvTreeListEntry* _pEntry) const { if (_pEntry) @@ -355,20 +342,17 @@ sal_Bool OTableTreeListBox::isWildcardChecked(SvTreeListEntry* _pEntry) const return sal_False; } -//------------------------------------------------------------------------ void OTableTreeListBox::checkWildcard(SvTreeListEntry* _pEntry) { SetCheckButtonState(_pEntry, SV_BUTTON_CHECKED); checkedButton_noBroadcast(_pEntry); } -//------------------------------------------------------------------------ SvTreeListEntry* OTableTreeListBox::getAllObjectsEntry() const { return haveVirtualRoot() ? First() : NULL; } -//------------------------------------------------------------------------ void OTableTreeListBox::checkedButton_noBroadcast(SvTreeListEntry* _pEntry) { OMarkableTreeListBox::checkedButton_noBroadcast(_pEntry); @@ -382,7 +366,6 @@ void OTableTreeListBox::checkedButton_noBroadcast(SvTreeListEntry* _pEntry) implEmphasize(_pEntry, SV_BUTTON_CHECKED == eState); } -//------------------------------------------------------------------------ void OTableTreeListBox::implEmphasize(SvTreeListEntry* _pEntry, sal_Bool _bChecked, sal_Bool _bUpdateDescendants, sal_Bool _bUpdateAncestors) { OSL_ENSURE(_pEntry, "OTableTreeListBox::implEmphasize: invalid entry (NULL)!"); @@ -421,7 +404,6 @@ void OTableTreeListBox::implEmphasize(SvTreeListEntry* _pEntry, sal_Bool _bCheck } } -//------------------------------------------------------------------------ void OTableTreeListBox::InitEntry(SvTreeListEntry* _pEntry, const OUString& _rString, const Image& _rCollapsedBitmap, const Image& _rExpandedBitmap, SvLBoxButtonKind _eButtonKind) { OMarkableTreeListBox::InitEntry(_pEntry, _rString, _rCollapsedBitmap, _rExpandedBitmap, _eButtonKind); @@ -435,7 +417,6 @@ void OTableTreeListBox::InitEntry(SvTreeListEntry* _pEntry, const OUString& _rSt _pEntry->ReplaceItem(new OBoldListboxString(_pEntry, 0, _rString), nTextPos); } -//------------------------------------------------------------------------ SvTreeListEntry* OTableTreeListBox::implAddEntry( const Reference< XDatabaseMetaData >& _rxMeta, const OUString& _rTableName, @@ -496,7 +477,6 @@ SvTreeListEntry* OTableTreeListBox::implAddEntry( return pRet; } -//------------------------------------------------------------------------ NamedDatabaseObject OTableTreeListBox::describeObject( SvTreeListEntry* _pEntry ) { NamedDatabaseObject aObject; @@ -543,7 +523,6 @@ NamedDatabaseObject OTableTreeListBox::describeObject( SvTreeListEntry* _pEntry return aObject; } -//------------------------------------------------------------------------ SvTreeListEntry* OTableTreeListBox::addedTable( const OUString& _rName ) { try @@ -559,7 +538,6 @@ SvTreeListEntry* OTableTreeListBox::addedTable( const OUString& _rName ) return NULL; } -//------------------------------------------------------------------------ bool OTableTreeListBox::impl_getAndAssertMetaData( Reference< XDatabaseMetaData >& _out_rMetaData ) const { if ( m_xConnection.is() ) @@ -568,7 +546,6 @@ bool OTableTreeListBox::impl_getAndAssertMetaData( Reference< XDatabaseMetaData return _out_rMetaData.is(); } -//------------------------------------------------------------------------ String OTableTreeListBox::getQualifiedTableName( SvTreeListEntry* _pEntry ) const { OSL_PRECOND( !isFolderEntry( _pEntry ), "OTableTreeListBox::getQualifiedTableName: folder entries not allowed here!" ); @@ -614,7 +591,6 @@ String OTableTreeListBox::getQualifiedTableName( SvTreeListEntry* _pEntry ) cons return String(); } -//------------------------------------------------------------------------ SvTreeListEntry* OTableTreeListBox::getEntryByQualifiedName( const OUString& _rName ) { try @@ -652,7 +628,7 @@ SvTreeListEntry* OTableTreeListBox::getEntryByQualifiedName( const OUString& _rN } return NULL; } -//------------------------------------------------------------------------ + void OTableTreeListBox::removedTable( const OUString& _rName ) { try @@ -667,8 +643,6 @@ void OTableTreeListBox::removedTable( const OUString& _rName ) } } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx b/dbaccess/source/ui/control/toolboxcontroller.cxx index b833483fcc1d..eac3039585b6 100644 --- a/dbaccess/source/ui/control/toolboxcontroller.cxx +++ b/dbaccess/source/ui/control/toolboxcontroller.cxx @@ -38,11 +38,11 @@ #include "UITools.hxx" #include <comphelper/processfactory.hxx> - extern "C" void SAL_CALL createRegistryInfo_OToolboxController() { static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OToolboxController> aAutoRegistration; } + namespace dbaui { using namespace svt; @@ -76,7 +76,6 @@ namespace dbaui osl_atomic_decrement(&m_refCount); } - // ----------------------------------------------------------------------------- IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(OToolboxController, "com.sun.star.sdb.ApplicationToolboxController") IMPLEMENT_SERVICE_INFO_SUPPORTS(OToolboxController) IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(OToolboxController, "com.sun.star.frame.ToolboxController") @@ -87,8 +86,6 @@ namespace dbaui return static_cast< XServiceInfo* >(new OToolboxController( comphelper::getComponentContext(_rxORB) )); } - - // ----------------------------------------------------------------------------- // XInterface Any SAL_CALL OToolboxController::queryInterface( const Type& _rType ) throw (RuntimeException) { @@ -97,17 +94,14 @@ namespace dbaui aReturn = TToolboxController_BASE::queryInterface(_rType); return aReturn; } - // ----------------------------------------------------------------------------- void SAL_CALL OToolboxController::acquire() throw () { ToolboxController::acquire(); } - // ----------------------------------------------------------------------------- void SAL_CALL OToolboxController::release() throw () { ToolboxController::release(); } - // ----------------------------------------------------------------------------- void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments ) throw (Exception, RuntimeException) { ToolboxController::initialize(_rArguments); @@ -154,7 +148,6 @@ namespace dbaui pToolBox->SetItemBits(m_nToolBoxId,pToolBox->GetItemBits(m_nToolBoxId) | TIB_DROPDOWN); } } - // ----------------------------------------------------------------------------- void SAL_CALL OToolboxController::statusChanged( const FeatureStateEvent& Event ) throw ( RuntimeException ) { SolarMutexGuard aSolarMutexGuard; @@ -185,7 +178,6 @@ namespace dbaui } } } - // ----------------------------------------------------------------------------- SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptr<PopupMenu> OToolboxController::getMenu() { @@ -232,7 +224,6 @@ namespace dbaui return pMenu; } SAL_WNODEPRECATED_DECLARATIONS_POP - // ----------------------------------------------------------------------------- Reference< ::com::sun::star::awt::XWindow > SAL_CALL OToolboxController::createPopupWindow() throw (RuntimeException) { // execute the menu @@ -271,11 +262,6 @@ namespace dbaui } return Reference< ::com::sun::star::awt::XWindow >(); } - // ----------------------------------------------------------------------------- - // ----------------------------------------------------------------------------- -//.......................................................................... } // dbaui -//.......................................................................... - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/control/undosqledit.cxx b/dbaccess/source/ui/control/undosqledit.cxx index 4c3b1d59bee9..ddcf28de4bbc 100644 --- a/dbaccess/source/ui/control/undosqledit.cxx +++ b/dbaccess/source/ui/control/undosqledit.cxx @@ -17,21 +17,18 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "undosqledit.hxx" #include "sqledit.hxx" namespace dbaui { -//------------------------------------------------------------------------------ void OSqlEditUndoAct::ToggleText() { String strNext = m_pOwner->GetText(); m_pOwner->SetText(m_strNextText); m_strNextText =strNext; } -// ----------------------------------------------------------------------------- + } // namespace -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx index bcf349401f82..e40c32a74a0e 100644 --- a/dbaccess/source/ui/dlg/CollectionView.cxx +++ b/dbaccess/source/ui/dlg/CollectionView.cxx @@ -45,10 +45,8 @@ #include <osl/thread.h> #include <connectivity/dbexception.hxx> -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::ucb; @@ -58,7 +56,6 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::task; using namespace ::com::sun::star::sdbc; using namespace comphelper; -// ----------------------------------------------------------------------------- DBG_NAME(OCollectionView) OCollectionView::OCollectionView( Window * pParent ,const Reference< XContent>& _xContent @@ -101,17 +98,17 @@ OCollectionView::OCollectionView( Window * pParent m_aNewFolder.SetClickHdl( LINK( this, OCollectionView, NewFolder_Click ) ); m_aPB_OK.SetClickHdl( LINK( this, OCollectionView, Save_Click ) ); } -// ----------------------------------------------------------------------------- + OCollectionView::~OCollectionView( ) { DBG_DTOR(OCollectionView,NULL); } -// ----------------------------------------------------------------------------- + Reference< XContent> OCollectionView::getSelectedFolder() const { return m_xContent; } -// ----------------------------------------------------------------------------- + IMPL_LINK_NOARG(OCollectionView, Save_Click) { OUString sName = m_aName.GetText(); @@ -166,7 +163,6 @@ IMPL_LINK_NOARG(OCollectionView, Save_Click) OUString sTemp; InteractiveAugmentedIOException aException(sTemp,Reference<XInterface>(),eClass,eError,aValues); - Reference<XInteractionHandler2> xHandler( InteractionHandler::createWithParent(m_xContext, VCLUnoHelper::GetInterface( this ))); OInteractionRequest* pRequest = new OInteractionRequest(makeAny(aException)); @@ -200,7 +196,7 @@ IMPL_LINK_NOARG(OCollectionView, Save_Click) } return 0; } -// ----------------------------------------------------------------------------- + IMPL_LINK_NOARG(OCollectionView, NewFolder_Click) { try @@ -219,7 +215,7 @@ IMPL_LINK_NOARG(OCollectionView, NewFolder_Click) } return 0; } -// ----------------------------------------------------------------------------- + IMPL_LINK_NOARG(OCollectionView, Up_Click) { try @@ -244,7 +240,7 @@ IMPL_LINK_NOARG(OCollectionView, Up_Click) } return 0; } -// ----------------------------------------------------------------------------- + IMPL_LINK_NOARG(OCollectionView, Dbl_Click_FileView) { try @@ -275,7 +271,7 @@ IMPL_LINK_NOARG(OCollectionView, Dbl_Click_FileView) } return 0; } -// ----------------------------------------------------------------------------- + void OCollectionView::initCurrentPath() { sal_Bool bEnable = sal_False; @@ -304,15 +300,12 @@ void OCollectionView::initCurrentPath() } m_aUp.Enable(bEnable); } -// ----------------------------------------------------------------------------- + OUString OCollectionView::getName() const { return m_aName.GetText(); } -// ----------------------------------------------------------------------------- -//......................................................................... -} // namespace dbaui -//......................................................................... +} // namespace dbaui /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 52069d2a0a16..3eb5c900bfe9 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dsnItem.hxx" #include "ConnectionHelper.hxx" #include "AutoControls.hrc" @@ -75,12 +74,8 @@ #include <comphelper/processfactory.hxx> #include <comphelper/string.hxx> - - -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::ucb; @@ -93,7 +88,6 @@ namespace dbaui using namespace ::dbtools; using namespace ::svt; - DBG_NAME(OConnectionHelper) OConnectionHelper::OConnectionHelper( Window* pParent, const ResId& _rId, const SfxItemSet& _rCoreAttrs) @@ -113,15 +107,12 @@ DBG_NAME(OConnectionHelper) m_aConnectionURL.SetTypeCollection(m_pCollection); } - OConnectionHelper::~OConnectionHelper() { DBG_DTOR(OConnectionHelper,NULL); } - - // ----------------------------------------------------------------------- void OConnectionHelper::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -150,7 +141,6 @@ DBG_NAME(OConnectionHelper) OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue); } - // ----------------------------------------------------------------------- void OConnectionHelper::implUpdateURLDependentStates() const { OSL_PRECOND( m_pAdminDialog, "OConnectionHelper::implUpdateURLDependentStates: no admin dialog!" ); @@ -161,7 +151,6 @@ DBG_NAME(OConnectionHelper) m_pAdminDialog->enableConfirmSettings( getURLNoPrefix().Len() > 0 ); } - // ----------------------------------------------------------------------- IMPL_LINK(OConnectionHelper, OnBrowseConnections, PushButton*, /*_pButton*/) { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); @@ -306,7 +295,6 @@ DBG_NAME(OConnectionHelper) for (sal_Int32 index=0; index < count; index++) aProfiles.insert(pArray[index]); - // execute the select dialog ODatasourceSelectDialog aSelector(GetParent(), aProfiles); OUString sOldProfile=getURLNoPrefix(); @@ -329,14 +317,11 @@ DBG_NAME(OConnectionHelper) return 0L; } - //------------------------------------------------------------------------- - bool OConnectionHelper::checkTestConnection() { return true; } - //------------------------------------------------------------------------- void OConnectionHelper::impl_setURL( const String& _rURL, sal_Bool _bPrefix ) { String sURL( comphelper::string::stripEnd(_rURL, '*') ); @@ -380,7 +365,6 @@ DBG_NAME(OConnectionHelper) implUpdateURLDependentStates(); } - //------------------------------------------------------------------------- String OConnectionHelper::impl_getURL( sal_Bool _bPrefix ) const { // get the pure text @@ -419,25 +403,21 @@ DBG_NAME(OConnectionHelper) return sURL; } - //------------------------------------------------------------------------- void OConnectionHelper::setURL( const String& _rURL ) { impl_setURL( _rURL, sal_True ); } - //------------------------------------------------------------------------- String OConnectionHelper::getURLNoPrefix( ) const { return impl_getURL( sal_False ); } - //------------------------------------------------------------------------- void OConnectionHelper::setURLNoPrefix( const String& _rURL ) { impl_setURL( _rURL, sal_False ); } - //------------------------------------------------------------------------- sal_Int32 OConnectionHelper::checkPathExistence(const String& _rURL) { IS_PATH_EXIST e_exists = pathExists(_rURL, sal_False); @@ -504,7 +484,6 @@ DBG_NAME(OConnectionHelper) return RET_OK; } - // ----------------------------------------------------------------------------- IS_PATH_EXIST OConnectionHelper::pathExists(const OUString& _rURL, sal_Bool bIsFile) const { ::ucbhelper::Content aCheckExistence; @@ -528,7 +507,6 @@ DBG_NAME(OConnectionHelper) } return eExists; } - //------------------------------------------------------------------------- long OConnectionHelper::PreNotify( NotifyEvent& _rNEvt ) { if ( m_pCollection->isFileSystemBased(m_eType) ) @@ -555,8 +533,6 @@ DBG_NAME(OConnectionHelper) return OGenericAdministrationPage::PreNotify( _rNEvt ); } - //------------------------------------------------------------------------- - sal_Bool OConnectionHelper::createDirectoryDeep(const String& _rPathURL) { // get an URL object analyzing the URL for us ... @@ -625,22 +601,17 @@ DBG_NAME(OConnectionHelper) return sal_True; } - - // ----------------------------------------------------------------------- void OConnectionHelper::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFT_Connection)); _rControlList.push_back(new ODisableWrapper<PushButton>(&m_aPB_Connection)); } - - // ----------------------------------------------------------------------- void OConnectionHelper::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back( new OSaveValueWrapper<Edit>( &m_aConnectionURL ) ); } - //------------------------------------------------------------------------- sal_Bool OConnectionHelper::commitURL() { String sURL; @@ -694,7 +665,6 @@ DBG_NAME(OConnectionHelper) m_aConnectionURL.SaveValueNoPrefix(); return sal_True; } - //------------------------------------------------------------------------- void OConnectionHelper::askForFileName(::sfx2::FileDialogHelper& _aFileOpen) { String sOldPath = getURLNoPrefix(); @@ -710,8 +680,6 @@ DBG_NAME(OConnectionHelper) } } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.hxx b/dbaccess/source/ui/dlg/ConnectionHelper.hxx index 2b9e4980f1d5..1e8db0c69528 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.hxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.hxx @@ -25,10 +25,8 @@ #include "curledit.hxx" #include <sfx2/filedlghelper.hxx> -//......................................................................... namespace dbaui { -//......................................................................... enum IS_PATH_EXIST { @@ -62,7 +60,6 @@ namespace dbaui virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList); virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); - // setting/retrieving the current connection URL // necessary because for some types, the URL must be decoded for display purposes //String getURL( OConnectionURLEdit* _m_pConnection ) const; @@ -77,7 +74,6 @@ namespace dbaui */ sal_Int32 checkPathExistence(const String& _rURL); - IS_PATH_EXIST pathExists(const OUString& _rURL, sal_Bool bIsFile) const; sal_Bool createDirectoryDeep(const String& _rPathNormalized); sal_Bool commitURL(); @@ -99,9 +95,7 @@ namespace dbaui void implUpdateURLDependentStates() const; }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // DBAUI_CONNECTIONHELPER_HXX diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index 0f679b908027..2026b51c742e 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -18,7 +18,6 @@ */ #include <config_features.h> - #include "ConnectionPage.hxx" #include "ConnectionPage.hrc" #include "dbu_dlg.hrc" @@ -72,10 +71,8 @@ #include "AutoControls.hrc" -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::ui::dialogs; @@ -90,9 +87,7 @@ namespace dbaui { return ( new OConnectionTabPage( pParent, _rAttrSet ) ); } - //======================================================================== - //= OConnectionTabPage - //======================================================================== + // OConnectionTabPage DBG_NAME(OConnectionTabPage) OConnectionTabPage::OConnectionTabPage(Window* pParent, const SfxItemSet& _rCoreAttrs) :OConnectionHelper(pParent, ModuleRes(PAGE_CONNECTION), _rCoreAttrs) @@ -122,13 +117,11 @@ namespace dbaui LayoutHelper::fitSizeRightAligned( m_aTestConnection ); } - // ----------------------------------------------------------------------- OConnectionTabPage::~OConnectionTabPage() { DBG_DTOR(OConnectionTabPage,NULL); } - // ----------------------------------------------------------------------- void OConnectionTabPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -266,7 +259,6 @@ namespace dbaui m_aJavaDriver.ClearModifyFlag(); } } - // ----------------------------------------------------------------------- void OConnectionTabPage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aFL1)); @@ -281,7 +273,6 @@ namespace dbaui OConnectionHelper::fillWindows(_rControlList); } - // ----------------------------------------------------------------------- void OConnectionTabPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aJavaDriver)); @@ -290,7 +281,6 @@ namespace dbaui OConnectionHelper::fillControls(_rControlList); } - // ----------------------------------------------------------------------- sal_Bool OConnectionTabPage::FillItemSet(SfxItemSet& _rSet) { sal_Bool bChangedSomething = sal_False; @@ -313,7 +303,6 @@ namespace dbaui return bChangedSomething; } - // ----------------------------------------------------------------------- IMPL_LINK(OConnectionTabPage, OnTestJavaClickHdl, PushButton*, /*_pButton*/) { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); @@ -338,7 +327,6 @@ namespace dbaui aMsg.Execute(); return 0L; } - // ----------------------------------------------------------------------- bool OConnectionTabPage::checkTestConnection() { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); @@ -348,7 +336,6 @@ namespace dbaui m_aTestConnection.Enable(bEnableTestConnection); return true; } - // ----------------------------------------------------------------------- IMPL_LINK(OConnectionTabPage, OnEditModified, Edit*, _pEdit) { if ( _pEdit == &m_aJavaDriver ) @@ -359,8 +346,6 @@ namespace dbaui callModifiedHdl(); return 0L; } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hxx b/dbaccess/source/ui/dlg/ConnectionPage.hxx index 4c81b1d1f6e3..040477107d9f 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.hxx @@ -25,14 +25,10 @@ #include <ucbhelper/content.hxx> #include "curledit.hxx" -//......................................................................... namespace dbaui { -//......................................................................... - //========================================================================= - //= OConnectionTabPage - //========================================================================= + // OConnectionTabPage /** implements the connection page of the data source properties dialog. */ @@ -56,7 +52,6 @@ namespace dbaui // connection test PushButton m_aTestConnection; - // called when the test connection button was clicked DECL_LINK(OnTestJavaClickHdl,PushButton*); DECL_LINK(OnEditModified,Edit*); @@ -89,9 +84,7 @@ namespace dbaui */ virtual bool checkTestConnection(); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_DETAILPAGES_HXX_ diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx index 9f966eefef17..d514634ac6b5 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "ConnectionPageSetup.hxx" #include "AutoControls.hrc" #include "dbadminsetup.hrc" @@ -55,10 +54,8 @@ #include <sfx2/docfilt.hxx> #include <vcl/mnemonic.hxx> -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::ui::dialogs; @@ -69,8 +66,6 @@ namespace dbaui using namespace ::dbtools; using namespace ::svt; - - OGenericAdministrationPage* OConnectionTabPageSetup::CreateDbaseTabPage( Window* pParent, const SfxItemSet& _rAttrSet ) { OConnectionTabPageSetup* oDBWizardPage = new OConnectionTabPageSetup( pParent, PAGE_DBWIZARD_DBASE, _rAttrSet, STR_DBASE_HELPTEXT, STR_DBASE_HEADERTEXT, STR_DBASE_PATH_OR_FILE); @@ -78,7 +73,6 @@ namespace dbaui return oDBWizardPage; } - OGenericAdministrationPage* OConnectionTabPageSetup::CreateMSAccessTabPage( Window* pParent, const SfxItemSet& _rAttrSet ) { OConnectionTabPageSetup* oDBWizardPage = new OConnectionTabPageSetup( pParent, PAGE_DBWIZARD_MSACCESS, _rAttrSet, STR_MSACCESS_HELPTEXT, STR_MSACCESS_HEADERTEXT, STR_MSACCESS_MDB_FILE); @@ -107,10 +101,7 @@ namespace dbaui return oDBWizardPage; } - - //======================================================================== - //= OConnectionTabPageSetup - //======================================================================== + // OConnectionTabPageSetup DBG_NAME(OConnectionTabPageSetup) OConnectionTabPageSetup::OConnectionTabPageSetup(Window* pParent, sal_uInt16 _rId, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId) :OConnectionHelper(pParent, ModuleRes(_rId), _rCoreAttrs) @@ -127,7 +118,6 @@ namespace dbaui else m_aFT_HelpText.Hide(); - if ( USHRT_MAX != _nHeaderResId ) SetHeaderText(FT_AUTOWIZARDHEADER, _nHeaderResId); @@ -158,13 +148,11 @@ namespace dbaui SetRoadmapStateValue(sal_False); } - // ----------------------------------------------------------------------- OConnectionTabPageSetup::~OConnectionTabPageSetup() { DBG_DTOR(OConnectionTabPageSetup,NULL); } - // ----------------------------------------------------------------------- void OConnectionTabPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { m_eType = m_pAdminDialog->getDatasourceType(_rSet); @@ -189,35 +177,28 @@ namespace dbaui callModifiedHdl(); } - // ----------------------------------------------------------------------- sal_Bool OConnectionTabPageSetup::commitPage( ::svt::WizardTypes::CommitPageReason /*_eReason*/ ) { return commitURL(); } - // ----------------------------------------------------------------------- sal_Bool OConnectionTabPageSetup::FillItemSet(SfxItemSet& _rSet) { sal_Bool bChangedSomething = sal_False; fillString(_rSet,&m_aConnectionURL, DSID_CONNECTURL, bChangedSomething); return bChangedSomething; } - // ----------------------------------------------------------------------- bool OConnectionTabPageSetup::checkTestConnection() { return !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0); } - // ----------------------------------------------------------------------- IMPL_LINK(OConnectionTabPageSetup, OnEditModified, Edit*, /*_pEdit*/) { SetRoadmapStateValue(checkTestConnection()); callModifiedHdl(); return 0L; } -//......................................................................... } // namespace dbaui -//......................................................................... - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx index b5db0f6417e5..daf2598e3185 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #ifndef DBAUI_CONNECTIONPAGESETUP_HXX #define DBAUI_CONNECTIONPAGESETUP_HXX #include "ConnectionHelper.hxx" @@ -28,15 +27,10 @@ #include <vcl/field.hxx> - -//......................................................................... namespace dbaui { -//......................................................................... - //========================================================================= - //= OConnectionTabPageSetup - //========================================================================= + // OConnectionTabPageSetup /** implements the connection page of the data source properties dialog. */ @@ -57,13 +51,11 @@ namespace dbaui static OGenericAdministrationPage* CreateODBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet ); static OGenericAdministrationPage* CreateUserDefinedTabPage( Window* pParent, const SfxItemSet& _rAttrSet ); - virtual sal_Bool FillItemSet (SfxItemSet& _rCoreAttrs); virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); virtual sal_Bool commitPage( ::svt::WizardTypes::CommitPageReason _eReason ); - inline void enableConnectionURL() { m_aConnectionURL.SetReadOnly(sal_False); } inline void disableConnectionURL() { m_aConnectionURL.SetReadOnly(); } @@ -74,7 +66,6 @@ namespace dbaui void changeConnectionURL( const String& _rNewDSN ); String getConnectionURL( ) const; - protected: OConnectionTabPageSetup(Window* pParent, sal_uInt16 _rId, const SfxItemSet& _rCoreAttrs, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderResId, sal_uInt16 _nUrlResId); virtual bool checkTestConnection(); @@ -82,9 +73,7 @@ namespace dbaui virtual ~OConnectionTabPageSetup(); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index 6564699e3cf8..e822953961cb 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -57,11 +57,8 @@ #include "TextConnectionHelper.hxx" #include <osl/diagnose.h> - -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star; OGenericAdministrationPage* OTextConnectionPageSetup::CreateTextTabPage( Window* pParent, const SfxItemSet& _rAttrSet ) @@ -69,12 +66,8 @@ using namespace ::com::sun::star; return ( new OTextConnectionPageSetup( pParent, _rAttrSet ) ); } - - //======================================================================== - //= OTextConnectionPageSetup - //======================================================================== + // OTextConnectionPageSetup DBG_NAME(OTextConnectionPageSetup) -//------------------------------------------------------------------------ OTextConnectionPageSetup::OTextConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs ) :OConnectionTabPageSetup(pParent, PAGE_DBWIZARD_TEXT, _rCoreAttrs, STR_TEXT_HELPTEXT, STR_TEXT_HEADERTEXT, STR_TEXT_PATH_OR_FILE) { @@ -86,8 +79,6 @@ DBG_NAME(OTextConnectionPageSetup) FreeResource(); } - - // ----------------------------------------------------------------------- OTextConnectionPageSetup::~OTextConnectionPageSetup() { DELETEZ(m_pTextConnectionHelper); @@ -102,7 +93,6 @@ DBG_NAME(OTextConnectionPageSetup) return sal_True; } - bool OTextConnectionPageSetup::checkTestConnection() { bool bDoEnable = OConnectionTabPageSetup::checkTestConnection(); @@ -110,19 +100,16 @@ DBG_NAME(OTextConnectionPageSetup) return bDoEnable; } - // ----------------------------------------------------------------------- void OTextConnectionPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { OConnectionTabPageSetup::fillControls(_rControlList); m_pTextConnectionHelper->fillControls(_rControlList); } - // ----------------------------------------------------------------------- void OTextConnectionPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { OConnectionTabPageSetup::fillWindows(_rControlList); m_pTextConnectionHelper->fillWindows(_rControlList); } - // ----------------------------------------------------------------------- void OTextConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // first check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -132,8 +119,6 @@ DBG_NAME(OTextConnectionPageSetup) m_pTextConnectionHelper->implInitControls(_rSet, bValid); } - - // ----------------------------------------------------------------------- sal_Bool OTextConnectionPageSetup::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet); @@ -141,21 +126,16 @@ DBG_NAME(OTextConnectionPageSetup) return bChangedSomething; } - sal_Bool OTextConnectionPageSetup::prepareLeave(){ return m_pTextConnectionHelper->prepareLeave(); } - OGenericAdministrationPage* OLDAPConnectionPageSetup::CreateLDAPTabPage( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OLDAPConnectionPageSetup( pParent, _rAttrSet ) ); } - - //======================================================================== - //= OLDAPPageSetup - //======================================================================== + // OLDAPPageSetup OLDAPConnectionPageSetup::OLDAPConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs ) :OGenericAdministrationPage(pParent, ModuleRes(PAGE_DBWIZARD_LDAP), _rCoreAttrs) ,m_aFTHeaderText (this, ModuleRes(FT_LDAP_HEADERTEXT)) @@ -179,7 +159,6 @@ DBG_NAME(OTextConnectionPageSetup) FreeResource(); } - // ----------------------------------------------------------------------- sal_Bool OLDAPConnectionPageSetup::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = sal_False; @@ -203,7 +182,6 @@ DBG_NAME(OTextConnectionPageSetup) fillBool(_rSet,&m_aCBUseSSL,DSID_CONN_LDAP_USESSL,bChangedSomething); return bChangedSomething; } - // ----------------------------------------------------------------------- void OLDAPConnectionPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETHostServer)); @@ -211,7 +189,6 @@ DBG_NAME(OTextConnectionPageSetup) _rControlList.push_back(new OSaveValueWrapper<NumericField>(&m_aNFPortNumber)); _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aCBUseSSL)); } - // ----------------------------------------------------------------------- void OLDAPConnectionPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTHelpText)); @@ -220,14 +197,12 @@ DBG_NAME(OTextConnectionPageSetup) _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTPortNumber)); _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTDefaultPortNumber)); } - // ----------------------------------------------------------------------- void OLDAPConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) sal_Bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); - SFX_ITEMSET_GET(_rSet, pBaseDN, SfxStringItem, DSID_CONN_LDAP_BASEDN, sal_True); SFX_ITEMSET_GET(_rSet, pPortNumber, SfxInt32Item, DSID_CONN_LDAP_PORTNUMBER, sal_True); @@ -240,7 +215,6 @@ DBG_NAME(OTextConnectionPageSetup) callModifiedHdl(); } - // ----------------------------------------------------------------------- IMPL_LINK(OLDAPConnectionPageSetup, OnEditModified, Edit*, /*_pEdit*/) { sal_Bool bRoadmapState = ((!m_aETHostServer.GetText().isEmpty() ) && ( !m_aETBaseDN.GetText().isEmpty() ) && (!m_aFTPortNumber.GetText().isEmpty() )); @@ -249,8 +223,6 @@ DBG_NAME(OTextConnectionPageSetup) return 0L; } - - // ----------------------------------------------------------------------- //OGenericAdministrationPage* OMySQLIntroPageSetup* OMySQLIntroPageSetup::CreateMySQLIntroTabPage( Window* _pParent, const SfxItemSet& _rAttrSet ) { return ( new OMySQLIntroPageSetup( _pParent, _rAttrSet) ); @@ -282,15 +254,12 @@ DBG_NAME(OMySQLIntroPageSetup) return true; } - // ----------------------------------------------------------------------- OMySQLIntroPageSetup::~OMySQLIntroPageSetup() { DBG_DTOR(OMySQLIntroPageSetup,NULL); } - - // ----------------------------------------------------------------------- void OMySQLIntroPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool /*_bSaveValue*/) { // show the "Connect directly" option only if the driver is installed @@ -310,26 +279,20 @@ DBG_NAME(OMySQLIntroPageSetup) m_aRB_JDBCDatabase.Check(); } - - // ----------------------------------------------------------------------- void OMySQLIntroPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& /*_rControlList*/) { } - // ----------------------------------------------------------------------- void OMySQLIntroPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& /*_rControlList*/) { } - - // ----------------------------------------------------------------------- sal_Bool OMySQLIntroPageSetup::FillItemSet(SfxItemSet& /*_rSet*/) { OSL_FAIL("Who called me?! Please ask oj for more information."); return sal_True; } - OMySQLIntroPageSetup::ConnectionType OMySQLIntroPageSetup::getMySQLMode() { if (m_aRB_JDBCDatabase.IsChecked()) @@ -340,10 +303,7 @@ DBG_NAME(OMySQLIntroPageSetup) return VIA_ODBC; } - // ======================================================================= - // = MySQLNativeSetupPage - // ======================================================================= - // ----------------------------------------------------------------------- + // MySQLNativeSetupPage MySQLNativeSetupPage::MySQLNativeSetupPage( Window* _pParent, const SfxItemSet& _rCoreAttrs ) :OGenericAdministrationPage( _pParent, ModuleRes( PAGE_DBWIZARD_MYSQL_NATIVE ), _rCoreAttrs ) ,m_aHeader ( this, ModuleRes( FT_SETUP_WIZARD_HEADER ) ) @@ -359,32 +319,27 @@ DBG_NAME(OMySQLIntroPageSetup) FreeResource(); } - // ----------------------------------------------------------------------- OGenericAdministrationPage* MySQLNativeSetupPage::Create( Window* pParent, const SfxItemSet& _rAttrSet ) { return new MySQLNativeSetupPage( pParent, _rAttrSet ); } - // ----------------------------------------------------------------------- void MySQLNativeSetupPage::fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList ) { m_aMySQLSettings.fillControls( _rControlList ); } - // ----------------------------------------------------------------------- void MySQLNativeSetupPage::fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList ) { _rControlList.push_back( new ODisableWrapper< FixedText >( &m_aHelpText ) ); m_aMySQLSettings.fillWindows( _rControlList ); } - // ----------------------------------------------------------------------- sal_Bool MySQLNativeSetupPage::FillItemSet( SfxItemSet& _rSet ) { return m_aMySQLSettings.FillItemSet( _rSet ); } - // ----------------------------------------------------------------------- void MySQLNativeSetupPage::implInitControls( const SfxItemSet& _rSet, sal_Bool _bSaveValue ) { m_aMySQLSettings.implInitControls( _rSet ); @@ -394,13 +349,11 @@ DBG_NAME(OMySQLIntroPageSetup) OnModified( NULL ); } - // ----------------------------------------------------------------------- Link MySQLNativeSetupPage::getControlModifiedLink() { return LINK( this, MySQLNativeSetupPage, OnModified ); } - // ----------------------------------------------------------------------- IMPL_LINK( MySQLNativeSetupPage, OnModified, Edit*, _pEdit ) { SetRoadmapStateValue( m_aMySQLSettings.canAdvance() ); @@ -408,9 +361,7 @@ DBG_NAME(OMySQLIntroPageSetup) return OGenericAdministrationPage::getControlModifiedLink().Call( _pEdit ); } - //======================================================================== - //= OMySQLJDBCConnectionPageSetup - //======================================================================== + // OMySQLJDBCConnectionPageSetup OGeneralSpecialJDBCConnectionPageSetup::OGeneralSpecialJDBCConnectionPageSetup( Window* pParent,sal_uInt16 _nResId, const SfxItemSet& _rCoreAttrs ,sal_uInt16 _nPortId, sal_uInt16 _nDefaultPortResId, sal_uInt16 _nHelpTextResId, sal_uInt16 _nHeaderTextResId, sal_uInt16 _nDriverClassId) :OGenericAdministrationPage(pParent, ModuleRes(_nResId), _rCoreAttrs) ,m_aFTHelpText (this, ModuleRes(FT_AUTOWIZARDHELPTEXT)) @@ -453,8 +404,6 @@ DBG_NAME(OMySQLIntroPageSetup) FreeResource(); } - - // ----------------------------------------------------------------------- OGenericAdministrationPage* OGeneralSpecialJDBCConnectionPageSetup::CreateMySQLJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OGeneralSpecialJDBCConnectionPageSetup( pParent, @@ -467,7 +416,6 @@ DBG_NAME(OMySQLIntroPageSetup) STR_MYSQL_DRIVERCLASSTEXT) ); } - // ----------------------------------------------------------------------- OGenericAdministrationPage* OGeneralSpecialJDBCConnectionPageSetup::CreateOracleJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OGeneralSpecialJDBCConnectionPageSetup( pParent, @@ -480,7 +428,6 @@ DBG_NAME(OMySQLIntroPageSetup) STR_ORACLE_DRIVERCLASSTEXT) ); } - // ----------------------------------------------------------------------- void OGeneralSpecialJDBCConnectionPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETDatabasename)); @@ -488,7 +435,6 @@ DBG_NAME(OMySQLIntroPageSetup) _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETHostname)); _rControlList.push_back(new OSaveValueWrapper<NumericField>(&m_aNFPortNumber)); } - // ----------------------------------------------------------------------- void OGeneralSpecialJDBCConnectionPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTHelpText)); @@ -499,7 +445,6 @@ DBG_NAME(OMySQLIntroPageSetup) _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTDriverClass)); } - // ----------------------------------------------------------------------- sal_Bool OGeneralSpecialJDBCConnectionPageSetup::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = sal_False; @@ -510,7 +455,6 @@ DBG_NAME(OMySQLIntroPageSetup) return bChangedSomething; } - // ----------------------------------------------------------------------- void OGeneralSpecialJDBCConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -550,7 +494,6 @@ DBG_NAME(OMySQLIntroPageSetup) SetRoadmapStateValue(bRoadmapState); } - // ----------------------------------------------------------------------- IMPL_LINK(OGeneralSpecialJDBCConnectionPageSetup, OnTestJavaClickHdl, PushButton*, /*_pButton*/) { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); @@ -577,7 +520,6 @@ DBG_NAME(OMySQLIntroPageSetup) return 0L; } - // ----------------------------------------------------------------------- IMPL_LINK(OGeneralSpecialJDBCConnectionPageSetup, OnEditModified, Edit*, _pEdit) { if ( _pEdit == &m_aETDriverClass ) @@ -588,16 +530,12 @@ DBG_NAME(OMySQLIntroPageSetup) return 0L; } - // ----------------------------------------------------------------------- OGenericAdministrationPage* OJDBCConnectionPageSetup::CreateJDBCTabPage( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OJDBCConnectionPageSetup( pParent, _rAttrSet)); } - - //======================================================================== - //= OMySQLJDBCConnectionPageSetup - //======================================================================== + // OMySQLJDBCConnectionPageSetup OJDBCConnectionPageSetup::OJDBCConnectionPageSetup( Window* pParent, const SfxItemSet& _rCoreAttrs) :OConnectionTabPageSetup(pParent, PAGE_DBWIZARD_JDBC, _rCoreAttrs, STR_JDBC_HELPTEXT, STR_JDBC_HEADERTEXT, STR_COMMONURL) ,m_aFTDriverClass (this, ModuleRes(FT_AUTOJDBCDRIVERCLASS)) @@ -609,19 +547,16 @@ DBG_NAME(OMySQLIntroPageSetup) FreeResource(); } - // ----------------------------------------------------------------------- void OJDBCConnectionPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETDriverClass)); } - // ----------------------------------------------------------------------- void OJDBCConnectionPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTDriverClass)); } - // ----------------------------------------------------------------------- sal_Bool OJDBCConnectionPageSetup::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet); @@ -629,7 +564,6 @@ DBG_NAME(OMySQLIntroPageSetup) return bChangedSomething; } - // ----------------------------------------------------------------------- void OJDBCConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -662,7 +596,6 @@ DBG_NAME(OMySQLIntroPageSetup) SetRoadmapStateValue(checkTestConnection()); } - bool OJDBCConnectionPageSetup::checkTestConnection() { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); @@ -671,8 +604,6 @@ DBG_NAME(OMySQLIntroPageSetup) return bEnableTestConnection; } - - // ----------------------------------------------------------------------- IMPL_LINK(OJDBCConnectionPageSetup, OnTestJavaClickHdl, PushButton*, /*_pButton*/) { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); @@ -697,7 +628,6 @@ DBG_NAME(OMySQLIntroPageSetup) return 0L; } - // ----------------------------------------------------------------------- IMPL_LINK(OJDBCConnectionPageSetup, OnEditModified, Edit*, _pEdit) { if ( _pEdit == &m_aETDriverClass ) @@ -708,7 +638,6 @@ DBG_NAME(OMySQLIntroPageSetup) return 0L; } - OGenericAdministrationPage* OSpreadSheetConnectionPageSetup::CreateSpreadSheetTabPage( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OSpreadSheetConnectionPageSetup( pParent, _rAttrSet ) ); @@ -726,20 +655,16 @@ DBG_NAME(OSpreadSheetConnectionPageSetup) FreeResource(); } - - // ----------------------------------------------------------------------- OSpreadSheetConnectionPageSetup::~OSpreadSheetConnectionPageSetup() { DBG_DTOR(OSpreadSheetConnectionPageSetup,NULL); } - void OSpreadSheetConnectionPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& /*_rControlList*/) { } - // ----------------------------------------------------------------------- void OSpreadSheetConnectionPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { OConnectionTabPageSetup::fillControls(_rControlList); @@ -747,13 +672,11 @@ DBG_NAME(OSpreadSheetConnectionPageSetup) } - // ----------------------------------------------------------------------- void OSpreadSheetConnectionPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { OConnectionTabPageSetup::implInitControls(_rSet, _bSaveValue); } - // ----------------------------------------------------------------------- sal_Bool OSpreadSheetConnectionPageSetup::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = OConnectionTabPageSetup::FillItemSet(_rSet); @@ -788,15 +711,12 @@ DBG_NAME(OAuthentificationPageSetup) LayoutHelper::fitSizeRightAligned( m_aPBTestConnection ); } - - // ----------------------------------------------------------------------- OAuthentificationPageSetup::~OAuthentificationPageSetup() { DBG_DTOR(OAuthentificationPageSetup,NULL); } - void OAuthentificationPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTHelpText)); @@ -804,14 +724,12 @@ DBG_NAME(OAuthentificationPageSetup) _rControlList.push_back(new ODisableWrapper<PushButton>(&m_aPBTestConnection)); } - // ----------------------------------------------------------------------- void OAuthentificationPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aETUserName)); _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aCBPasswordRequired)); } - // ----------------------------------------------------------------------- void OAuthentificationPageSetup::implInitControls(const SfxItemSet& _rSet, sal_Bool /*_bSaveValue*/) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -826,7 +744,6 @@ DBG_NAME(OAuthentificationPageSetup) m_aETUserName.ClearModifyFlag(); } - // ----------------------------------------------------------------------- sal_Bool OAuthentificationPageSetup::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = sal_False; @@ -841,7 +758,6 @@ DBG_NAME(OAuthentificationPageSetup) return bChangedSomething; } - OGenericAdministrationPage* OFinalDBPageSetup::CreateFinalDBTabPageSetup( Window* pParent, const SfxItemSet& _rAttrSet) { return ( new OFinalDBPageSetup( pParent, _rAttrSet) ); @@ -897,8 +813,6 @@ DBG_NAME(OFinalDBPageSetup) } } - - // ----------------------------------------------------------------------- OFinalDBPageSetup::~OFinalDBPageSetup() { @@ -920,7 +834,6 @@ DBG_NAME(OFinalDBPageSetup) return m_aCBStartTableWizard.IsChecked() && m_aCBStartTableWizard.IsEnabled(); } - void OFinalDBPageSetup::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTFinalHeader)); @@ -929,7 +842,6 @@ DBG_NAME(OFinalDBPageSetup) _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTFinalText)); } - // ----------------------------------------------------------------------- void OFinalDBPageSetup::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aCBOpenAfterwards)); @@ -938,7 +850,6 @@ DBG_NAME(OFinalDBPageSetup) _rControlList.push_back(new OSaveValueWrapper<RadioButton>(&m_aRBDontregisterDataSource)); } - // ----------------------------------------------------------------------- void OFinalDBPageSetup::implInitControls(const SfxItemSet& /*_rSet*/, sal_Bool /*_bSaveValue*/) { m_aCBOpenAfterwards.Check(); @@ -949,12 +860,10 @@ DBG_NAME(OFinalDBPageSetup) m_aCBStartTableWizard.Enable(_bSupportsTableCreation); } - // ----------------------------------------------------------------------- sal_Bool OFinalDBPageSetup::FillItemSet( SfxItemSet& /*_rSet*/ ) { return sal_True; } - // ----------------------------------------------------------------------------- IMPL_LINK(OFinalDBPageSetup, OnOpenSelected, CheckBox*, _pBox) { m_aCBStartTableWizard.Enable( _pBox->IsEnabled() && _pBox->IsChecked() ); @@ -962,9 +871,8 @@ DBG_NAME(OFinalDBPageSetup) // outta here return 0L; } -//......................................................................... } + // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx index b561a3c6507c..f34eaa56e65e 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.hxx @@ -31,16 +31,11 @@ #include <ucbhelper/content.hxx> #include <vcl/field.hxx> - -//......................................................................... namespace dbaui { -//......................................................................... - //======================================================================== - //= OSpreadSheetConnectionPageSetup - //======================================================================== + // OSpreadSheetConnectionPageSetup class OSpreadSheetConnectionPageSetup : public OConnectionTabPageSetup { public: @@ -59,9 +54,7 @@ namespace dbaui }; - //======================================================================== - //= OTextConnectionPage - //======================================================================== + // OTextConnectionPage class OTextConnectionPageSetup : public OConnectionTabPageSetup { public: @@ -83,9 +76,7 @@ namespace dbaui DECL_LINK(ImplGetExtensionHdl, OTextConnectionHelper*); }; - //======================================================================== - //= OLDAPConnectionPageSetup - //======================================================================== + // OLDAPConnectionPageSetup class OLDAPConnectionPageSetup : public OGenericAdministrationPage { public: @@ -113,9 +104,7 @@ namespace dbaui CheckBox m_aCBUseSSL; }; - //======================================================================== - //= MySQLNativeSetupPage - //======================================================================== + // MySQLNativeSetupPage class MySQLNativeSetupPage : public OGenericAdministrationPage { private: @@ -141,9 +130,7 @@ namespace dbaui DECL_LINK( OnModified, Edit* ); }; - //======================================================================== - //= OGeneralSpecialJDBCConnectionPageSetup - //======================================================================== + // OGeneralSpecialJDBCConnectionPageSetup class OGeneralSpecialJDBCConnectionPageSetup : public OGenericAdministrationPage { public: @@ -176,7 +163,6 @@ namespace dbaui FixedText m_aFTDefaultPortNumber; NumericField m_aNFPortNumber; - FixedText m_aFTDriverClass; Edit m_aETDriverClass; PushButton m_aPBTestJavaDriver; @@ -185,10 +171,7 @@ namespace dbaui sal_uInt16 m_nPortId; }; - - //======================================================================== - //= OJDBCConnectionPageSetup - //======================================================================== + // OJDBCConnectionPageSetup class OJDBCConnectionPageSetup : public OConnectionTabPageSetup { public: @@ -210,11 +193,7 @@ namespace dbaui PushButton m_aPBTestJavaDriver; }; - - - //======================================================================== - //= OJDBCConnectionPageSetup - //======================================================================== + // OJDBCConnectionPageSetup class OMySQLIntroPageSetup : public OGenericAdministrationPage { public: @@ -234,9 +213,6 @@ namespace dbaui const Link& GetClickHdl() const { return maClickHdl; } DECL_LINK(ImplClickHdl, OMySQLIntroPageSetup*); - - - protected: virtual sal_Bool FillItemSet(SfxItemSet& _rSet); virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); @@ -256,12 +232,7 @@ namespace dbaui }; - - - - //======================================================================== - //= OAuthentificationPageSetup - //======================================================================== + // OAuthentificationPageSetup class OAuthentificationPageSetup : public OGenericAdministrationPage { public: @@ -284,11 +255,7 @@ namespace dbaui virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList); }; - - - //======================================================================== - //= OFinalDBPageSetup - //======================================================================== + // OFinalDBPageSetup class OFinalDBPageSetup : public OGenericAdministrationPage { public: @@ -323,9 +290,7 @@ namespace dbaui virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 3054e182617a..3c3667cbc900 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "DbAdminImpl.hxx" #include "dsmeta.hxx" @@ -73,10 +72,8 @@ #include <functional> #include <o3tl/compat_functional.hxx> -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::dbtools; using namespace com::sun::star::uno; using namespace com::sun::star; @@ -90,7 +87,6 @@ using namespace com::sun::star::util; using namespace com::sun::star::container; using namespace com::sun::star::frame; -//------------------------------------------------------------------------- namespace { sal_Bool implCheckItemType( SfxItemSet& _rSet, const sal_uInt16 _nId, const TypeId _nExpectedItemType ) @@ -142,9 +138,7 @@ namespace } } - //======================================================================== - //= ODbDataSourceAdministrationHelper - //======================================================================== + // ODbDataSourceAdministrationHelper ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Reference< XComponentContext >& _xORB,Window* _pParent,IItemSetHelper* _pItemSetHelper) : m_xContext(_xORB) , m_pParent(_pParent) @@ -215,7 +209,7 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer ShowServiceNotAvailableError(_pParent->GetParent(), OUString("com.sun.star.sdb.DatabaseContext"), sal_True); } } - //------------------------------------------------------------------------- + sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyValue >& _rDriverParam) { OSL_ENSURE(m_pItemSetHelper->getOutputSet(), "ODbDataSourceAdministrationHelper::getCurrentSettings : not to be called without an example set!"); @@ -327,7 +321,7 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert return sal_True; } -//------------------------------------------------------------------------- + void ODbDataSourceAdministrationHelper::successfullyConnected() { OSL_ENSURE(m_pItemSetHelper->getOutputSet(), "ODbDataSourceAdministrationHelper::successfullyConnected: not to be called without an example set!"); @@ -346,13 +340,13 @@ void ODbDataSourceAdministrationHelper::successfullyConnected() } } } -//------------------------------------------------------------------------- + void ODbDataSourceAdministrationHelper::clearPassword() { if (m_pItemSetHelper->getWriteOutputSet()) m_pItemSetHelper->getWriteOutputSet()->ClearItem(DSID_PASSWORD); } -// ----------------------------------------------------------------------------- + ::std::pair< Reference<XConnection>,sal_Bool> ODbDataSourceAdministrationHelper::createConnection() { ::std::pair< Reference<XConnection>,sal_Bool> aRet; @@ -380,12 +374,12 @@ void ODbDataSourceAdministrationHelper::clearPassword() return aRet; } -// ----------------------------------------------------------------------------- + Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver() { return getDriver(getConnectionURL()); } -// ----------------------------------------------------------------------------- + Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const OUString& _sURL) { // get the global DriverManager @@ -405,7 +399,6 @@ Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const OUString throw SQLException(sCurrentActionError, getORB(), OUString("S1000"), 0, makeAny(aSQLWrapper)); } - Reference< XDriver > xDriver = xDriverManager->getDriverByURL(_sURL); if (!xDriver.is()) { @@ -417,7 +410,6 @@ Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const OUString return xDriver; } -// ----------------------------------------------------------------------------- Reference< XPropertySet > ODbDataSourceAdministrationHelper::getCurrentDataSource() { if ( !m_xDatasource.is() ) @@ -448,11 +440,10 @@ Reference< XPropertySet > ODbDataSourceAdministrationHelper::getCurrentDataSourc } } - OSL_ENSURE(m_xDatasource.is(), "ODbDataSourceAdministrationHelper::getCurrentDataSource: no data source!"); return m_xDatasource; } -//------------------------------------------------------------------------- + OUString ODbDataSourceAdministrationHelper::getDatasourceType( const SfxItemSet& _rSet ) { SFX_ITEMSET_GET( _rSet, pConnectURL, SfxStringItem, DSID_CONNECTURL, sal_True ); @@ -463,12 +454,11 @@ OUString ODbDataSourceAdministrationHelper::getDatasourceType( const SfxItemSet& return pCollection->getType(pConnectURL->GetValue()); } -//------------------------------------------------------------------------- sal_Bool ODbDataSourceAdministrationHelper::hasAuthentication(const SfxItemSet& _rSet) const { return DataSourceMetaData::getAuthentication( getDatasourceType( _rSet ) ) != AuthNone; } -// ----------------------------------------------------------------------------- + String ODbDataSourceAdministrationHelper::getConnectionURL() const { OUString sNewUrl; @@ -560,15 +550,15 @@ String ODbDataSourceAdministrationHelper::getConnectionURL() const return sNewUrl; } -//------------------------------------------------------------------------- + struct PropertyValueLess { bool operator() (const PropertyValue& x, const PropertyValue& y) const { return x.Name < y.Name ? true : false; } // construct prevents a MSVC6 warning }; + DECLARE_STL_SET( PropertyValue, PropertyValueLess, PropertyValueSet); -//........................................................................ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPropertySet >& _rxSource, SfxItemSet& _rDest) { Sequence< OUString > aTableFitler; @@ -655,7 +645,6 @@ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPr } } -//------------------------------------------------------------------------- void ODbDataSourceAdministrationHelper::translateProperties(const SfxItemSet& _rSource, const Reference< XPropertySet >& _rxDest) { OSL_ENSURE(_rxDest.is(), "ODbDataSourceAdministrationHelper::translateProperties: invalid property set!"); @@ -668,7 +657,6 @@ void ODbDataSourceAdministrationHelper::translateProperties(const SfxItemSet& _r catch(Exception&) { } const OUString sUrlProp("URL"); - // ----------------------------- // transfer the direct properties for ( ConstMapInt2StringIterator aDirect = m_aDirectPropTranslator.begin(); aDirect != m_aDirectPropTranslator.end(); @@ -698,7 +686,6 @@ void ODbDataSourceAdministrationHelper::translateProperties(const SfxItemSet& _r } } - // ------------------------------- // now for the indirect properties Sequence< PropertyValue > aInfo; @@ -715,8 +702,6 @@ void ODbDataSourceAdministrationHelper::translateProperties(const SfxItemSet& _r lcl_putProperty(_rxDest,PROPERTY_INFO, makeAny(aInfo)); } - -//------------------------------------------------------------------------- void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rSource, Sequence< ::com::sun::star::beans::PropertyValue >& _rInfo) { // within the current "Info" sequence, replace the ones we can examine from the item set @@ -850,7 +835,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS } } } -//------------------------------------------------------------------------- + Any ODbDataSourceAdministrationHelper::implTranslateProperty(const SfxPoolItem* _pItem) { // translate the SfxPoolItem @@ -893,7 +878,7 @@ Any ODbDataSourceAdministrationHelper::implTranslateProperty(const SfxPoolItem* return aValue; } -//------------------------------------------------------------------------- + void ODbDataSourceAdministrationHelper::implTranslateProperty(const Reference< XPropertySet >& _rxSet, const OUString& _rName, const SfxPoolItem* _pItem) { Any aValue = implTranslateProperty(_pItem); @@ -901,7 +886,6 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty(const Reference< X } #if OSL_DEBUG_LEVEL > 0 -//------------------------------------------------------------------------- OString ODbDataSourceAdministrationHelper::translatePropertyId( sal_Int32 _nId ) { OUString aString; @@ -921,9 +905,9 @@ OString ODbDataSourceAdministrationHelper::translatePropertyId( sal_Int32 _nId ) OString aReturn( aString.getStr(), aString.getLength(), RTL_TEXTENCODING_ASCII_US ); return aReturn; } + #endif -//------------------------------------------------------------------------- void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet, sal_Int32 _nId, const Any& _rValue ) { switch ( _rValue.getValueType().getTypeClass() ) @@ -1034,7 +1018,6 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet } } - String ODbDataSourceAdministrationHelper::getDocumentUrl(SfxItemSet& _rDest) { SFX_ITEMSET_GET(_rDest, pUrlItem, SfxStringItem, DSID_DOCUMENT_URL, sal_True); @@ -1042,8 +1025,6 @@ String ODbDataSourceAdministrationHelper::getDocumentUrl(SfxItemSet& _rDest) return pUrlItem->GetValue(); } - -// ----------------------------------------------------------------------------- void ODbDataSourceAdministrationHelper::convertUrl(SfxItemSet& _rDest) { OUString eType = getDatasourceType(_rDest); @@ -1101,7 +1082,7 @@ void ODbDataSourceAdministrationHelper::convertUrl(SfxItemSet& _rDest) _rDest.Put(SfxInt32Item(nPortNumberId, nPortNumber)); } -// ----------------------------------------------------------------------------- + sal_Bool ODbDataSourceAdministrationHelper::saveChanges(const SfxItemSet& _rSource) { // put the remembered settings into the property set @@ -1113,48 +1094,39 @@ sal_Bool ODbDataSourceAdministrationHelper::saveChanges(const SfxItemSet& _rSour return sal_True; } -// ----------------------------------------------------------------------------- + void ODbDataSourceAdministrationHelper::setDataSourceOrName( const Any& _rDataSourceOrName ) { OSL_ENSURE( !m_aDataSourceOrName.hasValue(), "ODbDataSourceAdministrationHelper::setDataSourceOrName: already have one!" ); // hmm. We could reset m_xDatasource/m_xModel, probably, and continue working m_aDataSourceOrName = _rDataSourceOrName; } -//========================================================================= -//= DbuTypeCollectionItem -//========================================================================= + +// DbuTypeCollectionItem TYPEINIT1(DbuTypeCollectionItem, SfxPoolItem); -//------------------------------------------------------------------------- DbuTypeCollectionItem::DbuTypeCollectionItem(sal_Int16 _nWhich, ::dbaccess::ODsnTypeCollection* _pCollection) :SfxPoolItem(_nWhich) ,m_pCollection(_pCollection) { } -//------------------------------------------------------------------------- DbuTypeCollectionItem::DbuTypeCollectionItem(const DbuTypeCollectionItem& _rSource) :SfxPoolItem(_rSource) ,m_pCollection(_rSource.getCollection()) { } -//------------------------------------------------------------------------- int DbuTypeCollectionItem::operator==(const SfxPoolItem& _rItem) const { DbuTypeCollectionItem* pCompare = PTR_CAST(DbuTypeCollectionItem, &_rItem); return pCompare && (pCompare->getCollection() == getCollection()); } -//------------------------------------------------------------------------- SfxPoolItem* DbuTypeCollectionItem::Clone(SfxItemPool* /*_pPool*/) const { return new DbuTypeCollectionItem(*this); } -//......................................................................... } // namespace dbaui -//......................................................................... - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.hxx b/dbaccess/source/ui/dlg/DbAdminImpl.hxx index e72c40fe9828..391c0cc71e9e 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.hxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.hxx @@ -33,10 +33,8 @@ #include <svl/poolitem.hxx> class Window; -//......................................................................... namespace dbaui { -//......................................................................... namespace DataSourceInfoConverter { void convert(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> & xContext, @@ -46,9 +44,7 @@ namespace dbaui const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _xDatasource); }; class IItemSetHelper; - //======================================================================== - //= ODbDataSourceAdministrationHelper - //======================================================================== + // ODbDataSourceAdministrationHelper class ODbDataSourceAdministrationHelper { public: @@ -66,7 +62,6 @@ namespace dbaui typedef ::std::set< OUString > StringSet; typedef StringSet::const_iterator ConstStringSetIterator; - MapInt2String m_aDirectPropTranslator; /// translating property id's into names (direct properties of a data source) MapInt2String m_aIndirectPropTranslator; /// translating property id's into names (indirect properties of a data source) Window* m_pParent; @@ -172,9 +167,7 @@ namespace dbaui #endif }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_DBADMINIMPL_HXX_ diff --git a/dbaccess/source/ui/dlg/RelationDlg.cxx b/dbaccess/source/ui/dlg/RelationDlg.cxx index 0d4c5ec8dd49..d211173ab422 100644 --- a/dbaccess/source/ui/dlg/RelationDlg.cxx +++ b/dbaccess/source/ui/dlg/RelationDlg.cxx @@ -47,10 +47,8 @@ using namespace ::com::sun::star::beans; using namespace ::dbaui; using namespace ::dbtools; -//======================================================================== // class ORelationDialog DBG_NAME(ORelationDialog) -//======================================================================== ORelationDialog::ORelationDialog( OJoinTableView* pParent, const TTableConnectionData::value_type& pConnectionData, sal_Bool bAllowTableSelect ) @@ -79,7 +77,6 @@ ORelationDialog::ORelationDialog( OJoinTableView* pParent, m_xConnection = pParent->getDesignView()->getController().getConnection(); - ////////////////////////////////////////////////////////////////////// // Connection kopieren m_pConnData.reset( static_cast<ORelationTableConnectionData*>(pConnectionData->NewInstance()) ); m_pConnData->CopyFrom( *pConnectionData ); @@ -102,7 +99,6 @@ ORelationDialog::ORelationDialog( OJoinTableView* pParent, FreeResource(); } -//------------------------------------------------------------------------ void ORelationDialog::Init(const TTableConnectionData::value_type& _pConnectionData) { ORelationTableConnectionData* pConnData = static_cast<ORelationTableConnectionData*>(_pConnectionData.get()); @@ -147,19 +143,13 @@ void ORelationDialog::Init(const TTableConnectionData::value_type& _pConnectionD } } -//------------------------------------------------------------------------ ORelationDialog::~ORelationDialog() { DBG_DTOR(ORelationDialog,NULL); } -//------------------------------------------------------------------------ - - -//------------------------------------------------------------------------ IMPL_LINK( ORelationDialog, OKClickHdl, Button*, /*pButton*/ ) { - ////////////////////////////////////////////////////////////////////// // RadioButtons auslesen sal_uInt16 nAttrib = 0; @@ -229,8 +219,6 @@ IMPL_LINK( ORelationDialog, OKClickHdl, Button*, /*pButton*/ ) return 0; } - -//------------------------------------------------------------------------ short ORelationDialog::Execute() { short nResult = ModalDialog::Execute(); @@ -239,22 +227,20 @@ short ORelationDialog::Execute() return nResult; } -// ----------------------------------------------------------------------------- + TTableConnectionData::value_type ORelationDialog::getConnectionData() const { return m_pConnData; } -// ----------------------------------------------------------------------------- + void ORelationDialog::setValid(sal_Bool _bValid) { aPB_OK.Enable(_bValid); } -// ----------------------------------------------------------------------------- + void ORelationDialog::notifyConnectionChange() { Init(m_pConnData); } -// ----------------------------------------------------------------------------- - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx index 78f8b60582c3..3332d9600a0c 100644 --- a/dbaccess/source/ui/dlg/TablesSingleDlg.cxx +++ b/dbaccess/source/ui/dlg/TablesSingleDlg.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "TablesSingleDlg.hxx" #include "DbAdminImpl.hxx" #include "tablespage.hxx" @@ -29,10 +28,8 @@ #include "dbu_dlg.hrc" -//......................................................................... namespace dbaui { -//......................................................................... using namespace com::sun::star::uno; using namespace com::sun::star::sdbc; using namespace com::sun::star::lang; @@ -40,9 +37,7 @@ using namespace com::sun::star::beans; using namespace com::sun::star::container; DBG_NAME(OTableSubscriptionDialog) - //======================================================================== - //= OTableSubscriptionDialog - //======================================================================== + // OTableSubscriptionDialog OTableSubscriptionDialog::OTableSubscriptionDialog(Window* pParent ,SfxItemSet* _pItems ,const Reference< XComponentContext >& _rxORB @@ -64,13 +59,13 @@ OTableSubscriptionDialog::OTableSubscriptionDialog(Window* pParent pTabPage->SetServiceFactory(_rxORB); SetTabPage(pTabPage); } -// ----------------------------------------------------------------------------- + OTableSubscriptionDialog::~OTableSubscriptionDialog() { DBG_DTOR(OTableSubscriptionDialog,NULL); delete m_pOutSet; } -// ----------------------------------------------------------------------------- + short OTableSubscriptionDialog::Execute() { short nRet = RET_CANCEL; @@ -85,46 +80,42 @@ short OTableSubscriptionDialog::Execute() } return nRet; } -// ----------------------------------------------------------------------------- + sal_Bool OTableSubscriptionDialog::getCurrentSettings(Sequence< PropertyValue >& _rDriverParams) { return m_pImpl->getCurrentSettings(_rDriverParams); } -// ----------------------------------------------------------------------------- + void OTableSubscriptionDialog::successfullyConnected() { m_pImpl->successfullyConnected(); } -// ----------------------------------------------------------------------------- + void OTableSubscriptionDialog::clearPassword() { m_pImpl->clearPassword(); } -// ----------------------------------------------------------------------------- + String OTableSubscriptionDialog::getConnectionURL() const { return m_pImpl->getConnectionURL(); } -// ----------------------------------------------------------------------------- + Reference< XPropertySet > OTableSubscriptionDialog::getCurrentDataSource() { return m_pImpl->getCurrentDataSource(); } -// ----------------------------------------------------------------------------- + const SfxItemSet* OTableSubscriptionDialog::getOutputSet() const { return m_pOutSet; } -// ----------------------------------------------------------------------------- + SfxItemSet* OTableSubscriptionDialog::getWriteOutputSet() { return m_pOutSet; } -// ----------------------------------------------------------------------------- -//......................................................................... -} // namespace dbaui -//......................................................................... - +} // namespace dbaui /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx index ca3a915e1023..c5342066ac94 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx @@ -30,21 +30,16 @@ #include <rtl/ustring.hxx> #include <vcl/lstbox.hxx> - -//......................................................................... namespace dbaui { -//......................................................................... #define TC_EXTENSION ((short)0x01) // a section specifying the extension of the files to connect to #define TC_SEPARATORS ((short)0x02) // a section specifying the various separators #define TC_HEADER ((short)0x04) // a section containing the "Text contains header" check box only #define TC_CHARSET ((short)0x08) // not yet implemented - //======================================================================== - //= OTextConnectionPage - //======================================================================== + // OTextConnectionPage class OTextConnectionHelper : public Control { OTextConnectionHelper(); @@ -95,7 +90,6 @@ namespace dbaui void SetSeparator( ComboBox& rBox, const String& rList, const String& rVal ); void SetExtension(const String& _rVal); - public: void implInitControls(const SfxItemSet& _rSet, sal_Bool _bValid); void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList); @@ -106,9 +100,7 @@ namespace dbaui sal_Bool prepareLeave(); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // DBAUI_DBWIZ2_HXX diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx index ad921e5e97e5..a7c45a665f58 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.cxx +++ b/dbaccess/source/ui/dlg/UserAdmin.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "UserAdmin.hxx" #include "UserAdmin.hrc" #include "UITools.hxx" @@ -51,7 +50,6 @@ using namespace dbaui; using namespace ucbhelper; using namespace comphelper; - class OPasswordDialog : public ModalDialog { FixedLine aFLUser; @@ -65,7 +63,6 @@ class OPasswordDialog : public ModalDialog CancelButton aCancelBtn; HelpButton aHelpBtn; - DECL_LINK( OKHdl_Impl, void * ); DECL_LINK( ModifiedHdl, Edit * ); @@ -103,7 +100,7 @@ OPasswordDialog::OPasswordDialog(Window* _pParent,const String& _sUserName) : aOKBtn.SetClickHdl( LINK( this, OPasswordDialog, OKHdl_Impl ) ); aEDOldPassword.SetModifyHdl( LINK( this, OPasswordDialog, ModifiedHdl ) ); } -// ----------------------------------------------------------------------------- + IMPL_LINK_NOARG(OPasswordDialog, OKHdl_Impl) { if( aEDPassword.GetText() == aEDPasswordRepeat.GetText() ) @@ -119,7 +116,7 @@ IMPL_LINK_NOARG(OPasswordDialog, OKHdl_Impl) } return 0; } -// ----------------------------------------------------------------------------- + IMPL_LINK( OPasswordDialog, ModifiedHdl, Edit *, pEdit ) { aOKBtn.Enable(!pEdit->GetText().isEmpty()); @@ -127,9 +124,7 @@ IMPL_LINK( OPasswordDialog, ModifiedHdl, Edit *, pEdit ) } DBG_NAME(OUserAdmin); -//================================================================================ // OUserAdmin -//================================================================================ OUserAdmin::OUserAdmin(Window* pParent,const SfxItemSet& _rAttrSet) : OGenericAdministrationPage( pParent, ModuleRes(TAB_PAGE_USERADMIN), _rAttrSet) ,m_FL_USER( this , ModuleRes(FL_USER)) @@ -150,13 +145,13 @@ OUserAdmin::OUserAdmin(Window* pParent,const SfxItemSet& _rAttrSet) FreeResource(); } -// ----------------------------------------------------------------------- + OUserAdmin::~OUserAdmin() { DBG_DTOR(OUserAdmin,NULL); m_xConnection = NULL; } -// ----------------------------------------------------------------------- + void OUserAdmin::FillUserNames() { if(m_xConnection.is()) @@ -203,12 +198,12 @@ void OUserAdmin::FillUserNames() m_TableCtrl.Enable(m_xUsers.is()); } -// ----------------------------------------------------------------------- + SfxTabPage* OUserAdmin::Create( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OUserAdmin( pParent, _rAttrSet ) ); } -// ----------------------------------------------------------------------- + IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton ) { try @@ -281,7 +276,7 @@ IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton ) return 0; } -// ----------------------------------------------------------------------- + IMPL_LINK( OUserAdmin, ListDblClickHdl, ListBox *, /*pListBox*/ ) { m_TableCtrl.setUserName(GetUser()); @@ -291,20 +286,19 @@ IMPL_LINK( OUserAdmin, ListDblClickHdl, ListBox *, /*pListBox*/ ) return 0; } -// ----------------------------------------------------------------------- String OUserAdmin::GetUser() { return m_LB_USER.GetSelectEntry(); } -// ----------------------------------------------------------------------------- + void OUserAdmin::fillControls(::std::vector< ISaveValueWrapper* >& /*_rControlList*/) { } -// ----------------------------------------------------------------------- + void OUserAdmin::fillWindows(::std::vector< ISaveValueWrapper* >& /*_rControlList*/) { } -// ----------------------------------------------------------------------------- + void OUserAdmin::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { m_TableCtrl.setComponentContext(m_xORB); diff --git a/dbaccess/source/ui/dlg/UserAdminDlg.cxx b/dbaccess/source/ui/dlg/UserAdminDlg.cxx index 7d80108db023..94adc9a4e17a 100644 --- a/dbaccess/source/ui/dlg/UserAdminDlg.cxx +++ b/dbaccess/source/ui/dlg/UserAdminDlg.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "adminpages.hxx" #include "DbAdminImpl.hxx" #include "dbu_dlg.hrc" @@ -39,20 +38,16 @@ #include <vcl/msgbox.hxx> #include <vcl/stdtext.hxx> -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdbcx; - //======================================================================== - //= OUserAdminDlg + // OUserAdminDlg DBG_NAME(OUserAdminDlg) -//======================================================================== OUserAdminDlg::OUserAdminDlg(Window* _pParent , SfxItemSet* _pItems ,const Reference< XComponentContext >& _rxORB @@ -81,7 +76,6 @@ DBG_NAME(OUserAdminDlg) FreeResource(); } - // ----------------------------------------------------------------------- OUserAdminDlg::~OUserAdminDlg() { if ( m_bOwnConnection ) @@ -100,7 +94,6 @@ DBG_NAME(OUserAdminDlg) DBG_DTOR(OUserAdminDlg,NULL); } - // ----------------------------------------------------------------------- short OUserAdminDlg::Execute() { try @@ -126,7 +119,6 @@ DBG_NAME(OUserAdminDlg) m_pImpl->saveChanges(*GetOutputItemSet()); return nRet; } - //------------------------------------------------------------------------- void OUserAdminDlg::PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage) { // register ourself as modified listener @@ -140,17 +132,14 @@ DBG_NAME(OUserAdminDlg) SfxTabDialog::PageCreated(_nId, _rPage); } - // ----------------------------------------------------------------------------- const SfxItemSet* OUserAdminDlg::getOutputSet() const { return m_pItemSet; } - // ----------------------------------------------------------------------------- SfxItemSet* OUserAdminDlg::getWriteOutputSet() { return m_pItemSet; } - // ----------------------------------------------------------------------------- ::std::pair< Reference<XConnection>,sal_Bool> OUserAdminDlg::createConnection() { if ( !m_xConnection.is() ) @@ -160,43 +149,34 @@ DBG_NAME(OUserAdminDlg) } return ::std::pair< Reference<XConnection>,sal_Bool> (m_xConnection,sal_False); } - // ----------------------------------------------------------------------------- Reference< XComponentContext > OUserAdminDlg::getORB() const { return m_pImpl->getORB(); } - // ----------------------------------------------------------------------------- Reference< XDriver > OUserAdminDlg::getDriver() { return m_pImpl->getDriver(); } - // ----------------------------------------------------------------------------- OUString OUserAdminDlg::getDatasourceType(const SfxItemSet& _rSet) const { return m_pImpl->getDatasourceType(_rSet); } - // ----------------------------------------------------------------------------- void OUserAdminDlg::clearPassword() { m_pImpl->clearPassword(); } - // ----------------------------------------------------------------------------- void OUserAdminDlg::setTitle(const OUString& _sTitle) { SetText(_sTitle); } - //------------------------------------------------------------------------- void OUserAdminDlg::enableConfirmSettings( bool _bEnable ) { (void)_bEnable; } - //------------------------------------------------------------------------- sal_Bool OUserAdminDlg::saveDatasource() { return PrepareLeaveCurrentPage(); } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx index 425d577fe2b3..5b3f51313721 100644 --- a/dbaccess/source/ui/dlg/admincontrols.cxx +++ b/dbaccess/source/ui/dlg/admincontrols.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "admincontrols.hxx" #include "admincontrols.hrc" #include "dbu_dlg.hrc" @@ -28,14 +27,10 @@ #include <svl/stritem.hxx> #include <svl/intitem.hxx> -//........................................................................ namespace dbaui { -//........................................................................ - //==================================================================== - //= TextResetOperatorEventFilter - //==================================================================== + // TextResetOperatorEventFilter class TextResetOperatorEventFilter : public ::svt::IWindowEventFilter { public: @@ -52,9 +47,7 @@ namespace dbaui } }; - //==================================================================== - //= TextResetOperator - //==================================================================== + // TextResetOperator class TextResetOperator :public ::svt::IWindowOperator { public: @@ -71,7 +64,6 @@ namespace dbaui String m_sUserText; }; - //-------------------------------------------------------------------- void TextResetOperator::operateOn( const VclWindowEvent& _rTrigger, Window& _rOperateOn ) const { OSL_ENSURE( _rTrigger.GetWindow() == &_rOperateOn, "TextResetOperator::operateOn: you're misusing this implementation!" ); @@ -103,9 +95,7 @@ namespace dbaui } } - //==================================================================== - //= TextResetOperatorController - //==================================================================== + // TextResetOperatorController class TextResetOperatorController_Base { protected: @@ -135,10 +125,7 @@ namespace dbaui } }; - //==================================================================== - //= MySQLNativeSettings - //==================================================================== - //-------------------------------------------------------------------- + // MySQLNativeSettings MySQLNativeSettings::MySQLNativeSettings( Window& _rParent, const Link& _rControlModificationLink ) :Control( &_rParent, ModuleRes( RID_MYSQL_NATIVE_SETTINGS ).SetAutoRelease( sal_False ) ) ,m_aDatabaseNameLabel ( this, ModuleRes( FT_MYSQL_DATABASE_NAME ) ) @@ -182,12 +169,10 @@ namespace dbaui #endif } - //-------------------------------------------------------------------- MySQLNativeSettings::~MySQLNativeSettings() { } - //-------------------------------------------------------------------- void MySQLNativeSettings::fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList ) { _rControlList.push_back( new OSaveValueWrapper< Edit >( &m_aDatabaseName ) ); @@ -197,7 +182,6 @@ namespace dbaui _rControlList.push_back( new OSaveValueWrapper< Edit >( &m_aNamedPipe ) ); } - //-------------------------------------------------------------------- void MySQLNativeSettings::fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList ) { _rControlList.push_back( new ODisableWrapper< FixedText >( &m_aDatabaseNameLabel ) ); @@ -208,7 +192,6 @@ namespace dbaui _rControlList.push_back( new ODisableWrapper< RadioButton >( &m_aNamedPipeRadio ) ); } - //-------------------------------------------------------------------- sal_Bool MySQLNativeSettings::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = sal_False; @@ -225,7 +208,6 @@ namespace dbaui return bChangedSomething; } - //-------------------------------------------------------------------- void MySQLNativeSettings::implInitControls(const SfxItemSet& _rSet ) { SFX_ITEMSET_GET( _rSet, pInvalid, SfxBoolItem, DSID_INVALID_SELECTION, sal_True ); @@ -270,7 +252,6 @@ namespace dbaui m_aHostPortRadio.Check(); } - //-------------------------------------------------------------------- bool MySQLNativeSettings::canAdvance() const { if ( m_aDatabaseName.GetText().isEmpty() ) @@ -297,8 +278,6 @@ namespace dbaui return true; } -//........................................................................ } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/admincontrols.hxx b/dbaccess/source/ui/dlg/admincontrols.hxx index b3eee71fa204..aafa8c9bd7c9 100644 --- a/dbaccess/source/ui/dlg/admincontrols.hxx +++ b/dbaccess/source/ui/dlg/admincontrols.hxx @@ -28,14 +28,10 @@ #include <svtools/dialogcontrolling.hxx> -//........................................................................ namespace dbaui { -//........................................................................ - //==================================================================== - //= MySQLNativeSettings - //==================================================================== + // MySQLNativeSettings class MySQLNativeSettings : public Control { private: @@ -68,9 +64,7 @@ namespace dbaui bool canAdvance() const; }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // DBACCESS_ADMINCONTROLS_HXX diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 3fbebe0a9cd7..f3fafe8eba8d 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "adminpages.hxx" #include "dbadmin.hrc" #include "dbadmin.hxx" @@ -44,10 +43,8 @@ #include <algorithm> #include <stdlib.h> -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdbc; @@ -60,11 +57,8 @@ namespace dbaui { } - //========================================================================= - //= OGenericAdministrationPage - //========================================================================= + // OGenericAdministrationPage DBG_NAME(OGenericAdministrationPage) - //------------------------------------------------------------------------- OGenericAdministrationPage::OGenericAdministrationPage(Window* _pParent, const ResId& _rId, const SfxItemSet& _rAttrSet) :SfxTabPage(_pParent, _rId, _rAttrSet) ,m_abEnableRoadmap(sal_False) @@ -77,7 +71,6 @@ namespace dbaui SetExchangeSupport(sal_True); } - //------------------------------------------------------------------------- OGenericAdministrationPage::OGenericAdministrationPage(Window* _pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rAttrSet) :SfxTabPage(_pParent, _rId, _rUIXMLDescription, _rAttrSet) ,m_abEnableRoadmap(sal_False) @@ -90,7 +83,6 @@ namespace dbaui SetExchangeSupport(sal_True); } - //------------------------------------------------------------------------- OGenericAdministrationPage::~OGenericAdministrationPage() { DELETEZ(m_pFT_HeaderText); @@ -98,7 +90,6 @@ namespace dbaui DBG_DTOR(OGenericAdministrationPage,NULL); } - //------------------------------------------------------------------------- int OGenericAdministrationPage::DeactivatePage(SfxItemSet* _pSet) { if (_pSet) @@ -111,12 +102,10 @@ namespace dbaui return LEAVE_PAGE; } - //------------------------------------------------------------------------- void OGenericAdministrationPage::Reset(const SfxItemSet& _rCoreAttrs) { implInitControls(_rCoreAttrs, sal_False); } - //------------------------------------------------------------------------- void OGenericAdministrationPage::ActivatePage() { TabPage::ActivatePage(); @@ -124,13 +113,11 @@ namespace dbaui if ( m_pItemSetHelper ) ActivatePage(*m_pItemSetHelper->getOutputSet()); } - //------------------------------------------------------------------------- void OGenericAdministrationPage::ActivatePage(const SfxItemSet& _rSet) { implInitControls(_rSet, sal_True); } - // ----------------------------------------------------------------------- void OGenericAdministrationPage::getFlags(const SfxItemSet& _rSet, sal_Bool& _rValid, sal_Bool& _rReadonly) { SFX_ITEMSET_GET(_rSet, pInvalid, SfxBoolItem, DSID_INVALID_SELECTION, sal_True); @@ -139,14 +126,11 @@ namespace dbaui _rReadonly = !_rValid || (pReadonly && pReadonly->GetValue()); } - - // ----------------------------------------------------------------------- IMPL_LINK_NOARG(OGenericAdministrationPage, OnControlModified) { callModifiedHdl(); return 0L; } - // ----------------------------------------------------------------------- sal_Bool OGenericAdministrationPage::getSelectedDataSource(OUString& _sReturn,OUString& _sCurr) { // collect all ODBC data source names @@ -174,7 +158,6 @@ namespace dbaui return sal_True; } - // ----------------------------------------------------------------------- void OGenericAdministrationPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -198,24 +181,20 @@ namespace dbaui aControlList.clear(); } - // ----------------------------------------------------------------------- void OGenericAdministrationPage::initializePage() { OSL_ENSURE(m_pItemSetHelper,"NO ItemSetHelper set!"); if ( m_pItemSetHelper ) Reset(*m_pItemSetHelper->getOutputSet()); } - // ----------------------------------------------------------------------- sal_Bool OGenericAdministrationPage::commitPage( ::svt::WizardTypes::CommitPageReason ) { return sal_True; } - // ----------------------------------------------------------------------- bool OGenericAdministrationPage::canAdvance() const { return true; } - // ----------------------------------------------------------------------- void OGenericAdministrationPage::fillBool( SfxItemSet& _rSet, CheckBox* _pCheckBox, sal_uInt16 _nID, sal_Bool& _bChangedSomething, bool _bRevertValue ) { if ( (_pCheckBox != NULL ) && ( _pCheckBox->GetState() != _pCheckBox->GetSavedValue() ) ) @@ -237,7 +216,6 @@ namespace dbaui _bChangedSomething = sal_True; } } - // ----------------------------------------------------------------------- void OGenericAdministrationPage::fillInt32(SfxItemSet& _rSet,NumericField* _pEdit,sal_uInt16 _nID,sal_Bool& _bChangedSomething) { if( (_pEdit != NULL) && (_pEdit->GetValue() != _pEdit->GetSavedValue().toInt32()) ) @@ -246,7 +224,6 @@ namespace dbaui _bChangedSomething = sal_True; } } - // ----------------------------------------------------------------------- void OGenericAdministrationPage::fillString(SfxItemSet& _rSet,Edit* _pEdit,sal_uInt16 _nID,sal_Bool& _bChangedSomething) { if( (_pEdit != NULL) && (_pEdit->GetText() != _pEdit->GetSavedValue()) ) @@ -263,7 +240,6 @@ namespace dbaui _pWindow->SetControlFont( aFont ); } - // ----------------------------------------------------------------------- IMPL_LINK(OGenericAdministrationPage, OnTestConnectionClickHdl, PushButton*, /*_pButton*/) { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); @@ -315,10 +291,7 @@ namespace dbaui SetControlFontWeight(m_pFT_HeaderText); } - //========================================================================= - //= LayoutHelper - //========================================================================= - //------------------------------------------------------------------------- + // LayoutHelper void LayoutHelper::positionBelow( const Control& _rReference, Control& _rControl, const ControlRelation _eRelation, const long _nIndentAppFont ) { @@ -332,7 +305,6 @@ namespace dbaui _rControl.SetPosPixel( aControlPos ); } - //------------------------------------------------------------------------- void LayoutHelper::fitSizeRightAligned( PushButton& io_button ) { const Point aOldPos = io_button.GetPosPixel(); @@ -350,8 +322,6 @@ namespace dbaui } } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx index 2a9d08c4e741..51920b8af890 100644 --- a/dbaccess/source/ui/dlg/adminpages.hxx +++ b/dbaccess/source/ui/dlg/adminpages.hxx @@ -27,13 +27,10 @@ #include <vcl/field.hxx> #include <vcl/fixed.hxx> - class NumericField; class Edit; -//......................................................................... namespace dbaui { -//......................................................................... /// helper class to wrap the savevalue and disable call class SAL_NO_VTABLE ISaveValueWrapper { @@ -89,9 +86,7 @@ namespace dbaui } }; - //========================================================================= - //= OGenericAdministrationPage - //========================================================================= + // OGenericAdministrationPage class IDatabaseSettingsDialog; class IItemSetHelper; class OGenericAdministrationPage :public SfxTabPage @@ -250,17 +245,13 @@ namespace dbaui virtual Link getControlModifiedLink() { return LINK(this, OGenericAdministrationPage, OnControlModified); } }; - //========================================================================= - //= ControlRelation - //========================================================================= + // ControlRelation enum ControlRelation { RelatedControls, UnrelatedControls }; - //========================================================================= - //= LayoutHelper - //========================================================================= + // LayoutHelper class LayoutHelper { public: @@ -276,11 +267,8 @@ namespace dbaui // why is CalcMinimumSize not a virtual method of ::Window? }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_ADMINPAGES_HXX_ - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/adodatalinks.cxx b/dbaccess/source/ui/dlg/adodatalinks.cxx index a6dcb45b0f97..bab5f57149d6 100644 --- a/dbaccess/source/ui/dlg/adodatalinks.cxx +++ b/dbaccess/source/ui/dlg/adodatalinks.cxx @@ -59,6 +59,7 @@ OUString getAdoDatalink(long hWnd,OUString& oldLink) dataLink=reinterpret_cast<sal_Unicode *>(PromptNew(hWnd)); return dataLink; } + BSTR PromptNew(long hWnd) { BSTR connstr=NULL; @@ -205,6 +206,7 @@ BSTR PromptEdit(long hWnd,BSTR connstr) CoUninitialize(); return _result; } + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx index 68c5c1a6969c..0aac084a2ea8 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.cxx +++ b/dbaccess/source/ui/dlg/adtabdlg.cxx @@ -52,12 +52,10 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdbcx; using namespace dbtools; -// TableObjectListFacade ------------------------------------------------------- TableObjectListFacade::~TableObjectListFacade() { } -// TableListFacade ------------------------------------------------------------- class TableListFacade : public ::cppu::BaseMutex , public TableObjectListFacade , public ::comphelper::OContainerListener @@ -221,7 +219,6 @@ bool TableListFacade::isLeafSelected() const return pEntry && !m_rTableList.GetModel()->HasChildren( pEntry ); } -// QueryListFacade ------------------------------------------------------------- class QueryListFacade : public ::cppu::BaseMutex , public TableObjectListFacade , public ::comphelper::OContainerListener @@ -318,7 +315,6 @@ bool QueryListFacade::isLeafSelected() const return pEntry && !m_rQueryList.GetModel()->HasChildren( pEntry ); } -// OAddTableDlg ---------------------------------------------------------------- OAddTableDlg::OAddTableDlg( Window* pParent, IAddTableDialogContext& _rContext ) :ModelessDialog( pParent, ModuleRes(DLG_JOIN_TABADD) ) ,m_aCaseTables( this, ModuleRes( RB_CASE_TABLES ) ) diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 868d8a82119c..5ca65870a78f 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -35,10 +35,8 @@ #include <vcl/msgbox.hxx> -//........................................................................ namespace dbaui { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::lang::XMultiServiceFactory; @@ -49,9 +47,7 @@ namespace dbaui using ::com::sun::star::sdbc::XConnection; using ::com::sun::star::sdbc::XDriver; - //======================================================================== - //= SpecialSettingsPage - //======================================================================== + // SpecialSettingsPage struct BooleanSettingDesc { CheckBox** ppControl; // the dialog's control which displays this setting @@ -60,9 +56,7 @@ namespace dbaui bool bInvertedDisplay; // true if and only if the checkbox is checked when the item is sal_False, and vice versa }; - //======================================================================== - //= SpecialSettingsPage - //======================================================================== + // SpecialSettingsPage SpecialSettingsPage::SpecialSettingsPage( Window* pParent, const SfxItemSet& _rCoreAttrs, const DataSourceMetaData& _rDSMeta ) :OGenericAdministrationPage( pParent, ModuleRes( PAGE_ADVANCED_SETTINGS_SPECIAL ), _rCoreAttrs ) ,m_aTopLine( this, ModuleRes( FL_DATAHANDLING ) ) @@ -173,7 +167,6 @@ namespace dbaui FreeResource(); } - // ----------------------------------------------------------------------- SpecialSettingsPage::~SpecialSettingsPage() { m_aControlDependencies.clear(); @@ -200,7 +193,6 @@ namespace dbaui DELETEZ( m_pMaxRowScan ); } - // ----------------------------------------------------------------------- void SpecialSettingsPage::impl_initBooleanSettings() { OSL_PRECOND( m_aBooleanSettings.empty(), "SpecialSettingsPage::impl_initBooleanSettings: called twice!" ); @@ -232,7 +224,6 @@ namespace dbaui } } - // ----------------------------------------------------------------------- void SpecialSettingsPage::fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList ) { if ( m_bHasBooleanComparisonMode ) @@ -245,7 +236,6 @@ namespace dbaui } } - // ----------------------------------------------------------------------- void SpecialSettingsPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { for ( BooleanSettingDescs::const_iterator setting = m_aBooleanSettings.begin(); @@ -265,7 +255,6 @@ namespace dbaui _rControlList.push_back(new OSaveValueWrapper<NumericField>(m_pMaxRowScan)); } - // ----------------------------------------------------------------------- void SpecialSettingsPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -331,7 +320,6 @@ namespace dbaui OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue); } - // ----------------------------------------------------------------------- sal_Bool SpecialSettingsPage::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = sal_False; @@ -363,10 +351,7 @@ namespace dbaui return bChangedSomething; } - //======================================================================== - //= GeneratedValuesPage - //======================================================================== - //------------------------------------------------------------------------ + // GeneratedValuesPage GeneratedValuesPage::GeneratedValuesPage( Window* pParent, const SfxItemSet& _rCoreAttrs ) :OGenericAdministrationPage(pParent, ModuleRes( PAGE_GENERATED_VALUES ), _rCoreAttrs) ,m_aAutoFixedLine ( this, ModuleRes( FL_SEPARATORAUTO ) ) @@ -386,13 +371,11 @@ namespace dbaui FreeResource(); } - // ----------------------------------------------------------------------- GeneratedValuesPage::~GeneratedValuesPage() { m_aControlDependencies.clear(); } - // ----------------------------------------------------------------------- void GeneratedValuesPage::fillWindows( ::std::vector< ISaveValueWrapper* >& _rControlList ) { _rControlList.push_back( new ODisableWrapper< FixedLine >( &m_aAutoFixedLine ) ); @@ -400,7 +383,6 @@ namespace dbaui _rControlList.push_back( new ODisableWrapper< FixedText >( &m_aAutoRetrievingLabel ) ); } - // ----------------------------------------------------------------------- void GeneratedValuesPage::fillControls( ::std::vector< ISaveValueWrapper* >& _rControlList ) { _rControlList.push_back( new OSaveValueWrapper< CheckBox >( &m_aAutoRetrievingEnabled ) ); @@ -408,7 +390,6 @@ namespace dbaui _rControlList.push_back( new OSaveValueWrapper< Edit >( &m_aAutoRetrieving ) ); } - // ----------------------------------------------------------------------- void GeneratedValuesPage::implInitControls( const SfxItemSet& _rSet, sal_Bool _bSaveValue ) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -434,7 +415,6 @@ namespace dbaui OGenericAdministrationPage::implInitControls( _rSet, _bSaveValue ); } - // ----------------------------------------------------------------------- sal_Bool GeneratedValuesPage::FillItemSet(SfxItemSet& _rSet) { sal_Bool bChangedSomething = sal_False; @@ -446,10 +426,7 @@ namespace dbaui return bChangedSomething; } - //======================================================================== - //= AdvancedSettingsDialog - //======================================================================== - //------------------------------------------------------------------------ + // AdvancedSettingsDialog AdvancedSettingsDialog::AdvancedSettingsDialog( Window* _pParent, SfxItemSet* _pItems, const Reference< XComponentContext >& _rxContext, const Any& _aDataSourceName ) :SfxTabDialog(_pParent, ModuleRes(DLG_DATABASE_ADVANCED), _pItems) @@ -481,14 +458,12 @@ namespace dbaui FreeResource(); } - // ----------------------------------------------------------------------- AdvancedSettingsDialog::~AdvancedSettingsDialog() { SetInputSet(NULL); DELETEZ(pExampleSet); } - // ----------------------------------------------------------------------- bool AdvancedSettingsDialog::doesHaveAnyAdvancedSettings( const OUString& _sURL ) { DataSourceMetaData aMeta( _sURL ); @@ -498,7 +473,6 @@ namespace dbaui return false; } - // ----------------------------------------------------------------------- short AdvancedSettingsDialog::Execute() { short nRet = SfxTabDialog::Execute(); @@ -510,7 +484,6 @@ namespace dbaui return nRet; } - //------------------------------------------------------------------------- void AdvancedSettingsDialog::PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage) { // register ourself as modified listener @@ -525,68 +498,56 @@ namespace dbaui SfxTabDialog::PageCreated(_nId, _rPage); } - // ----------------------------------------------------------------------------- const SfxItemSet* AdvancedSettingsDialog::getOutputSet() const { return pExampleSet; } - // ----------------------------------------------------------------------------- SfxItemSet* AdvancedSettingsDialog::getWriteOutputSet() { return pExampleSet; } - // ----------------------------------------------------------------------------- ::std::pair< Reference< XConnection >, sal_Bool > AdvancedSettingsDialog::createConnection() { return m_pImpl->createConnection(); } - // ----------------------------------------------------------------------------- Reference< XComponentContext > AdvancedSettingsDialog::getORB() const { return m_pImpl->getORB(); } - // ----------------------------------------------------------------------------- Reference< XDriver > AdvancedSettingsDialog::getDriver() { return m_pImpl->getDriver(); } - // ----------------------------------------------------------------------------- OUString AdvancedSettingsDialog::getDatasourceType(const SfxItemSet& _rSet) const { return m_pImpl->getDatasourceType(_rSet); } - // ----------------------------------------------------------------------------- void AdvancedSettingsDialog::clearPassword() { m_pImpl->clearPassword(); } - // ----------------------------------------------------------------------------- void AdvancedSettingsDialog::setTitle(const OUString& _sTitle) { SetText(_sTitle); } - //------------------------------------------------------------------------- void AdvancedSettingsDialog::enableConfirmSettings( bool _bEnable ) { (void)_bEnable; } - //------------------------------------------------------------------------- sal_Bool AdvancedSettingsDialog::saveDatasource() { return PrepareLeaveCurrentPage(); } -//........................................................................ } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/advancedsettings.hxx b/dbaccess/source/ui/dlg/advancedsettings.hxx index c980d59d6e4c..b042389196f0 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.hxx +++ b/dbaccess/source/ui/dlg/advancedsettings.hxx @@ -30,17 +30,13 @@ #include <vector> -//........................................................................ namespace dbaui { -//........................................................................ struct BooleanSettingDesc; typedef ::std::vector< BooleanSettingDesc > BooleanSettingDescs; - //==================================================================== - //= SpecialSettingsPage - //==================================================================== + // SpecialSettingsPage /** implements the "Special Settings" page of the advanced database settings */ class SpecialSettingsPage : public OGenericAdministrationPage @@ -99,9 +95,7 @@ namespace dbaui void impl_initBooleanSettings(); }; - //==================================================================== - //= GeneratedValuesPage - //==================================================================== + // GeneratedValuesPage class GeneratedValuesPage : public OGenericAdministrationPage { protected: @@ -138,9 +132,7 @@ namespace dbaui DECL_LINK( OnCheckBoxClick, CheckBox * ); }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // DBACCESS_ADVANCEDSETTINGS_HXX diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index 865e2c80565f..f43a0830b1b4 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "ConnectionPage.hxx" #include "DbAdminImpl.hxx" #include "DriverSettings.hxx" @@ -39,10 +38,8 @@ #include <unotools/confignode.hxx> #include <vcl/msgbox.hxx> -//......................................................................... namespace dbaui { -//......................................................................... using namespace com::sun::star::uno; using namespace com::sun::star::sdbc; using namespace com::sun::star::lang; @@ -50,11 +47,8 @@ using namespace com::sun::star::util; using namespace com::sun::star::beans; using namespace com::sun::star::container; -//========================================================================= -//= ODbAdminDialog -//========================================================================= +// ODbAdminDialog DBG_NAME(ODbAdminDialog) -//------------------------------------------------------------------------- ODbAdminDialog::ODbAdminDialog(Window* _pParent , SfxItemSet* _pItems , const Reference< XComponentContext >& _rxContext @@ -77,7 +71,6 @@ ODbAdminDialog::ODbAdminDialog(Window* _pParent FreeResource(); } -//------------------------------------------------------------------------- ODbAdminDialog::~ODbAdminDialog() { SetInputSet(NULL); @@ -85,7 +78,7 @@ ODbAdminDialog::~ODbAdminDialog() DBG_DTOR(ODbAdminDialog,NULL); } -//------------------------------------------------------------------------- + short ODbAdminDialog::Ok() { SfxTabDialog::Ok(); @@ -94,7 +87,6 @@ short ODbAdminDialog::Ok() // TODO : AR_ERROR is not handled correctly, we always close the dialog here } -//------------------------------------------------------------------------- void ODbAdminDialog::PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage) { // register ourself as modified listener @@ -109,7 +101,6 @@ void ODbAdminDialog::PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage) SfxTabDialog::PageCreated(_nId, _rPage); } -// ----------------------------------------------------------------------------- void ODbAdminDialog::addDetailPage(sal_uInt16 _nPageId, sal_uInt16 _nTextId, CreateTabPage _pCreateFunc) { // open our own resource block, as the page titles are strings local to this block @@ -119,7 +110,6 @@ void ODbAdminDialog::addDetailPage(sal_uInt16 _nPageId, sal_uInt16 _nTextId, Cre m_aCurrentDetailPages.push(_nPageId); } -//------------------------------------------------------------------------- void ODbAdminDialog::impl_selectDataSource(const ::com::sun::star::uno::Any& _aDataSourceName) { m_pImpl->setDataSourceOrName(_aDataSourceName); @@ -186,7 +176,6 @@ void ODbAdminDialog::impl_selectDataSource(const ::com::sun::star::uno::Any& _aD } } -//------------------------------------------------------------------------- void ODbAdminDialog::impl_resetPages(const Reference< XPropertySet >& _rxDatasource) { // the selection is valid if and only if we have a datasource now @@ -239,22 +228,22 @@ void ODbAdminDialog::impl_resetPages(const Reference< XPropertySet >& _rxDatasou SetUpdateMode(sal_True); } -// ----------------------------------------------------------------------------- + void ODbAdminDialog::setTitle(const OUString& _sTitle) { SetText(_sTitle); } -//------------------------------------------------------------------------- + void ODbAdminDialog::enableConfirmSettings( bool _bEnable ) { (void)_bEnable; } -//------------------------------------------------------------------------- + sal_Bool ODbAdminDialog::saveDatasource() { return PrepareLeaveCurrentPage(); } -//------------------------------------------------------------------------- + ODbAdminDialog::ApplyResult ODbAdminDialog::implApplyChanges() { if (!PrepareLeaveCurrentPage()) @@ -275,48 +264,47 @@ ODbAdminDialog::ApplyResult ODbAdminDialog::implApplyChanges() return AR_LEAVE_MODIFIED; } -//------------------------------------------------------------------------- + void ODbAdminDialog::selectDataSource(const ::com::sun::star::uno::Any& _aDataSourceName) { impl_selectDataSource(_aDataSourceName); } -// ----------------------------------------------------------------------------- const SfxItemSet* ODbAdminDialog::getOutputSet() const { return GetExampleSet(); } -// ----------------------------------------------------------------------------- + SfxItemSet* ODbAdminDialog::getWriteOutputSet() { return pExampleSet; } -// ----------------------------------------------------------------------------- + ::std::pair< Reference<XConnection>,sal_Bool> ODbAdminDialog::createConnection() { return m_pImpl->createConnection(); } -// ----------------------------------------------------------------------------- + Reference< XComponentContext > ODbAdminDialog::getORB() const { return m_pImpl->getORB(); } -// ----------------------------------------------------------------------------- + Reference< XDriver > ODbAdminDialog::getDriver() { return m_pImpl->getDriver(); } -// ----------------------------------------------------------------------------- + OUString ODbAdminDialog::getDatasourceType(const SfxItemSet& _rSet) const { return m_pImpl->getDatasourceType(_rSet); } -// ----------------------------------------------------------------------------- + void ODbAdminDialog::clearPassword() { m_pImpl->clearPassword(); } -//------------------------------------------------------------------------- + SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults, ::dbaccess::ODsnTypeCollection* _pTypeCollection) { // just to be sure .... @@ -466,7 +454,7 @@ SfxItemSet* ODbAdminDialog::createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rp return _rpSet; } -//------------------------------------------------------------------------- + void ODbAdminDialog::destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults) { // _first_ delete the set (refering the pool) @@ -490,8 +478,6 @@ void ODbAdminDialog::destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, // no need to explicitly delete the defaults, this has been done by the ReleaseDefaults } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index 2e5f7bfc3ed5..38d513fcd07f 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -40,7 +40,6 @@ using namespace ::svt; const OString aGroupIdent(RTL_CONSTASCII_STRINGPARAM("dBase III")); -// ODbaseIndexDialog ---------------------------------------------------------- DBG_NAME(ODbaseIndexDialog) ODbaseIndexDialog::ODbaseIndexDialog( Window * pParent, String aDataSrcName ) @@ -426,7 +425,6 @@ void ODbaseIndexDialog::SetCtrls() checkButtons(); } -// OTableInfo ------------------------------------------------------------------ void OTableInfo::WriteInfFile( const String& rDSN ) const { // open INF file diff --git a/dbaccess/source/ui/dlg/dbfindex.hxx b/dbaccess/source/ui/dlg/dbfindex.hxx index 9a299e14595e..2ee8a043485c 100644 --- a/dbaccess/source/ui/dlg/dbfindex.hxx +++ b/dbaccess/source/ui/dlg/dbfindex.hxx @@ -28,14 +28,10 @@ #include <list> #include <comphelper/stl_types.hxx> -//......................................................................... namespace dbaui { -//......................................................................... -//========================================================================= -//= OTableIndex -//========================================================================= +// OTableIndex /// represents a single dbf index class OTableIndex { @@ -51,13 +47,10 @@ public: String GetIndexFileName() const { return aIndexFileName; } }; -//------------------------------------------------------------------------- typedef ::std::list< OTableIndex > TableIndexList; DECLARE_STL_ITERATORS(TableIndexList); -//========================================================================= -//= OTableInfo -//========================================================================= +// OTableInfo class ODbaseIndexDialog; /** holds the INF file of a table */ @@ -75,11 +68,9 @@ public: void WriteInfFile( const String& rDSN ) const; }; -//------------------------------------------------------------------------- typedef ::std::list< OTableInfo > TableInfoList; DECLARE_STL_ITERATORS(TableInfoList); -////////////////////////////////////////////////////////////////////////// // IndexDialog class ODbaseIndexDialog : public ModalDialog { @@ -136,9 +127,7 @@ public: virtual ~ODbaseIndexDialog(); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_DBFINDEX_HXX_ diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx index 639febdf98f7..c24b9b23201b 100644 --- a/dbaccess/source/ui/dlg/dbwiz.cxx +++ b/dbaccess/source/ui/dlg/dbwiz.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbwiz.hxx" #include "dbadmin.hrc" #include "dbu_dlg.hrc" @@ -39,10 +38,8 @@ #include "DbAdminImpl.hxx" #include "dbaccess_helpid.hrc" -//......................................................................... namespace dbaui { -//......................................................................... using namespace svt; using namespace com::sun::star::uno; using namespace com::sun::star::sdbc; @@ -65,12 +62,8 @@ using namespace com::sun::star::container; #define ADDITIONAL_USERDEFINED 11 #define ADDITIONAL_PAGE_MYSQL_NATIVE 12 - DBG_NAME(ODbTypeWizDialog) -//========================================================================= -//= ODbTypeWizDialog -//========================================================================= -//------------------------------------------------------------------------- +// ODbTypeWizDialog ODbTypeWizDialog::ODbTypeWizDialog(Window* _pParent ,SfxItemSet* _pItems ,const Reference< XComponentContext >& _rxORB @@ -111,13 +104,12 @@ ODbTypeWizDialog::ODbTypeWizDialog(Window* _pParent ActivatePage(); } -//------------------------------------------------------------------------- ODbTypeWizDialog::~ODbTypeWizDialog() { DBG_DTOR(ODbTypeWizDialog,NULL); delete m_pOutSet; } -//------------------------------------------------------------------------- + IMPL_LINK(ODbTypeWizDialog, OnTypeSelected, OGeneralPage*, _pTabPage) { m_eType = _pTabPage->GetSelectedType(); @@ -126,7 +118,7 @@ IMPL_LINK(ODbTypeWizDialog, OnTypeSelected, OGeneralPage*, _pTabPage) enableButtons(WZB_FINISH,!bURLRequired); return 1L; } -//------------------------------------------------------------------------- + WizardTypes::WizardState ODbTypeWizDialog::determineNextState( WizardState _nCurrentState ) const { WizardTypes::WizardState nNextState = WZS_INVALID_STATE; @@ -205,43 +197,41 @@ WizardTypes::WizardState ODbTypeWizDialog::determineNextState( WizardState _nCur return nNextState; } -// ----------------------------------------------------------------------------- const SfxItemSet* ODbTypeWizDialog::getOutputSet() const { return m_pOutSet; } -// ----------------------------------------------------------------------------- + SfxItemSet* ODbTypeWizDialog::getWriteOutputSet() { return m_pOutSet; } -// ----------------------------------------------------------------------------- + ::std::pair< Reference<XConnection>,sal_Bool> ODbTypeWizDialog::createConnection() { return m_pImpl->createConnection(); } -// ----------------------------------------------------------------------------- + Reference< XComponentContext > ODbTypeWizDialog::getORB() const { return m_pImpl->getORB(); } -// ----------------------------------------------------------------------------- + Reference< XDriver > ODbTypeWizDialog::getDriver() { return m_pImpl->getDriver(); } -// ----------------------------------------------------------------------------- + OUString ODbTypeWizDialog::getDatasourceType(const SfxItemSet& _rSet) const { return m_pImpl->getDatasourceType(_rSet); } -// ----------------------------------------------------------------------------- + void ODbTypeWizDialog::clearPassword() { m_pImpl->clearPassword(); } -// ----------------------------------------------------------------------------- TabPage* ODbTypeWizDialog::createPage(WizardState _nState) { sal_uInt16 nStringId = STR_PAGETITLE_ADVANCED; @@ -311,7 +301,7 @@ TabPage* ODbTypeWizDialog::createPage(WizardState _nState) } return pPage; } -// ----------------------------------------------------------------------------- + sal_Bool ODbTypeWizDialog::leaveState(WizardState _nState) { SfxTabPage* pPage = static_cast<SfxTabPage*>(WizardDialog::GetPage(_nState)); @@ -319,12 +309,12 @@ sal_Bool ODbTypeWizDialog::leaveState(WizardState _nState) pPage->FillItemSet(*m_pOutSet); return sal_True; } -// ----------------------------------------------------------------------------- + void ODbTypeWizDialog::setTitle(const OUString& _sTitle) { SetText(_sTitle); } -//------------------------------------------------------------------------- + void ODbTypeWizDialog::enableConfirmSettings( bool _bEnable ) { enableButtons( WZB_FINISH, _bEnable ); @@ -335,7 +325,7 @@ void ODbTypeWizDialog::enableConfirmSettings( bool _bEnable ) // Plus, the concept must also care for the case where those pages are embedded into // anormal tab dialog. } -//------------------------------------------------------------------------- + sal_Bool ODbTypeWizDialog::saveDatasource() { SfxTabPage* pPage = static_cast<SfxTabPage*>(WizardDialog::GetPage(getCurrentState())); @@ -348,20 +338,19 @@ sal_Bool ODbTypeWizDialog::saveDatasource() DataSourceInfoConverter::convert( getORB(), m_pCollection,sOldURL,m_eType,m_pImpl->getCurrentDataSource()); return sal_True; } -// ----------------------------------------------------------------------------- + IWizardPageController* ODbTypeWizDialog::getPageController( TabPage* _pCurrentPage ) const { OGenericAdministrationPage* pPage = static_cast<OGenericAdministrationPage*>(_pCurrentPage); return pPage; } -// ----------------------------------------------------------------------------- + sal_Bool ODbTypeWizDialog::onFinish() { saveDatasource(); return m_pImpl->saveChanges(*m_pOutSet) ? OWizardMachine::onFinish() : sal_False; } -//......................................................................... + } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index ed8c3e29fdaf..5f12461e2025 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbwizsetup.hxx" #include "dsmeta.hxx" #include "DBSetupConnectionPages.hxx" @@ -73,8 +72,6 @@ #include <com/sun/star/task/XInteractionHandler2.hpp> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> - - #include <svl/filenotation.hxx> #include <comphelper/interaction.hxx> #include <comphelper/namedvaluecollection.hxx> @@ -86,11 +83,8 @@ #include <memory> - -//......................................................................... namespace dbaui { -//......................................................................... using namespace dbtools; using namespace svt; using namespace com::sun::star; @@ -111,10 +105,7 @@ using namespace ::comphelper; using namespace ::cppu; DBG_NAME(ODbTypeWizDialogSetup) -//========================================================================= -//= ODbTypeWizDialogSetup -//========================================================================= -//------------------------------------------------------------------------- +// ODbTypeWizDialogSetup ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(Window* _pParent ,SfxItemSet* _pItems ,const Reference< XComponentContext >& _rxORB @@ -284,14 +275,12 @@ OUString ODbTypeWizDialogSetup::getStateDisplayName( WizardState _nState ) const return sRoadmapItem; } -//------------------------------------------------------------------------- ODbTypeWizDialogSetup::~ODbTypeWizDialogSetup() { delete m_pOutSet; DBG_DTOR(ODbTypeWizDialogSetup,NULL); } -//------------------------------------------------------------------------- IMPL_LINK(ODbTypeWizDialogSetup, OnTypeSelected, OGeneralPage*, /*_pTabPage*/) { activateDatabasePath(); @@ -312,7 +301,7 @@ void lcl_removeUnused(const ::comphelper::NamedValueCollection& _aOld,const ::co } } } -// ----------------------------------------------------------------------------- + void DataSourceInfoConverter::convert(const Reference<XComponentContext> & xContext, const ::dbaccess::ODsnTypeCollection* _pCollection,const OUString& _sOldURLPrefix,const OUString& _sNewURLPrefix,const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _xDatasource) { if ( _pCollection->getPrefix(_sOldURLPrefix) == _pCollection->getPrefix(_sNewURLPrefix) ) @@ -330,7 +319,7 @@ void DataSourceInfoConverter::convert(const Reference<XComponentContext> & xCont aDS >>= aInfo; _xDatasource->setPropertyValue(PROPERTY_INFO,uno::makeAny(aInfo)); } -//------------------------------------------------------------------------- + void ODbTypeWizDialogSetup::activateDatabasePath() { switch ( m_pGeneralPage->GetDatabaseCreationMode() ) @@ -376,7 +365,6 @@ void ODbTypeWizDialogSetup::activateDatabasePath() // the Next button in such a case. However, not for this patch ... } -//------------------------------------------------------------------------- void ODbTypeWizDialogSetup::updateTypeDependentStates() { sal_Bool bDoEnable = sal_False; @@ -394,14 +382,11 @@ void ODbTypeWizDialogSetup::updateTypeDependentStates() enableButtons( WZB_FINISH, bDoEnable); } - -//------------------------------------------------------------------------- sal_Bool ODbTypeWizDialogSetup::IsConnectionUrlRequired() { return m_pCollection->isConnectionUrlRequired(m_sURL); } -//------------------------------------------------------------------------- void ODbTypeWizDialogSetup::resetPages(const Reference< XPropertySet >& _rxDatasource) { // remove all items which relate to indirect properties from the input set @@ -418,33 +403,32 @@ void ODbTypeWizDialogSetup::resetPages(const Reference< XPropertySet >& _rxDatas // extract all relevant data from the property set of the data source m_pImpl->translateProperties(_rxDatasource, *getWriteOutputSet()); } -// ----------------------------------------------------------------------------- + const SfxItemSet* ODbTypeWizDialogSetup::getOutputSet() const { return m_pOutSet; } -// ----------------------------------------------------------------------------- + SfxItemSet* ODbTypeWizDialogSetup::getWriteOutputSet() { return m_pOutSet; } -// ----------------------------------------------------------------------------- + ::std::pair< Reference<XConnection>,sal_Bool> ODbTypeWizDialogSetup::createConnection() { return m_pImpl->createConnection(); } -// ----------------------------------------------------------------------------- + Reference< XComponentContext > ODbTypeWizDialogSetup::getORB() const { return m_pImpl->getORB(); } -// ----------------------------------------------------------------------------- + Reference< XDriver > ODbTypeWizDialogSetup::getDriver() { return m_pImpl->getDriver(); } - ::dbaccess::DATASOURCE_TYPE ODbTypeWizDialogSetup::VerifyDataSourceType(const ::dbaccess::DATASOURCE_TYPE _DatabaseType) const { ::dbaccess::DATASOURCE_TYPE LocDatabaseType = _DatabaseType; @@ -466,9 +450,6 @@ Reference< XDriver > ODbTypeWizDialogSetup::getDriver() return LocDatabaseType; } - - -// ----------------------------------------------------------------------------- OUString ODbTypeWizDialogSetup::getDatasourceType(const SfxItemSet& _rSet) const { OUString sRet = m_pImpl->getDatasourceType(_rSet); @@ -490,13 +471,11 @@ OUString ODbTypeWizDialogSetup::getDatasourceType(const SfxItemSet& _rSet) const return sRet; } -// ----------------------------------------------------------------------------- void ODbTypeWizDialogSetup::clearPassword() { m_pImpl->clearPassword(); } -// ----------------------------------------------------------------------------- TabPage* ODbTypeWizDialogSetup::createPage(WizardState _nState) { SfxTabPage* pFirstPage; @@ -600,7 +579,6 @@ TabPage* ODbTypeWizDialogSetup::createPage(WizardState _nState) return pPage; } - IMPL_LINK(ODbTypeWizDialogSetup, ImplModifiedHdl, OGenericAdministrationPage*, _pConnectionPageSetup) { m_bIsConnectable = _pConnectionPageSetup->GetRoadmapStateValue( ); @@ -614,8 +592,6 @@ IMPL_LINK(ODbTypeWizDialogSetup, ImplModifiedHdl, OGenericAdministrationPage*, _ return sal_True; } - -// ----------------------------------------------------------------------------- IMPL_LINK(ODbTypeWizDialogSetup, ImplClickHdl, OMySQLIntroPageSetup*, _pMySQLIntroPageSetup) { OUString sURLPrefix; @@ -635,21 +611,18 @@ IMPL_LINK(ODbTypeWizDialogSetup, ImplClickHdl, OMySQLIntroPageSetup*, _pMySQLInt return sal_True; } -// ----------------------------------------------------------------------------- IMPL_LINK(ODbTypeWizDialogSetup, OnChangeCreationMode, OGeneralPageWizard*, /*_pGeneralPage*/) { activateDatabasePath(); return sal_True; } -// ----------------------------------------------------------------------------- IMPL_LINK(ODbTypeWizDialogSetup, OnRecentDocumentSelected, OGeneralPageWizard*, /*_pGeneralPage*/) { enableButtons( WZB_FINISH, m_pGeneralPage->GetSelectedDocument().sURL.Len() != 0 ); return 0L; } -// ----------------------------------------------------------------------------- IMPL_LINK(ODbTypeWizDialogSetup, OnSingleDocumentChosen, OGeneralPageWizard*, /*_pGeneralPage*/) { if ( prepareLeaveCurrentState( eFinish ) ) @@ -657,7 +630,6 @@ IMPL_LINK(ODbTypeWizDialogSetup, OnSingleDocumentChosen, OGeneralPageWizard*, /* return 0L; } -// ----------------------------------------------------------------------------- void ODbTypeWizDialogSetup::enterState(WizardState _nState) { m_sURL = m_pImpl->getDatasourceType(*m_pOutSet); @@ -675,7 +647,6 @@ void ODbTypeWizDialogSetup::enterState(WizardState _nState) } } -//------------------------------------------------------------------------- sal_Bool ODbTypeWizDialogSetup::saveDatasource() { SfxTabPage* pPage = static_cast<SfxTabPage*>(WizardDialog::GetPage(getCurrentState())); @@ -684,8 +655,6 @@ sal_Bool ODbTypeWizDialogSetup::saveDatasource() return sal_True; } - -// ----------------------------------------------------------------------------- sal_Bool ODbTypeWizDialogSetup::leaveState(WizardState _nState) { if (_nState == PAGE_DBSETUPWIZARD_MYSQL_INTRO) @@ -698,20 +667,17 @@ sal_Bool ODbTypeWizDialogSetup::leaveState(WizardState _nState) return pPage && pPage->DeactivatePage(m_pOutSet) != 0; } -// ----------------------------------------------------------------------------- void ODbTypeWizDialogSetup::setTitle(const OUString& /*_sTitle*/) { OSL_FAIL( "ODbTypeWizDialogSetup::setTitle: not implemented!" ); // why? } -//------------------------------------------------------------------------- void ODbTypeWizDialogSetup::enableConfirmSettings( bool _bEnable ) { (void)_bEnable; } -//------------------------------------------------------------------------- namespace { bool lcl_handle( const Reference< XInteractionHandler2 >& _rxHandler, const Any& _rRequest ) @@ -725,7 +691,6 @@ namespace } } -//------------------------------------------------------------------------- sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() { Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(getORB(), 0) ); @@ -777,7 +742,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() } return sal_False; } - // ------------------------------------------------------------------------ + sal_Bool ODbTypeWizDialogSetup::IsDatabaseDocumentToBeOpened() const { if ( m_pGeneralPage->GetDatabaseCreationMode() == OGeneralPageWizard::eOpenExisting ) @@ -789,7 +754,6 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() return sal_True; } - // ------------------------------------------------------------------------ sal_Bool ODbTypeWizDialogSetup::IsTableWizardToBeStarted() const { if ( m_pGeneralPage->GetDatabaseCreationMode() == OGeneralPageWizard::eOpenExisting ) @@ -801,7 +765,6 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() return sal_False; } - //------------------------------------------------------------------------- void ODbTypeWizDialogSetup::CreateDatabase() { OUString sUrl; @@ -830,7 +793,6 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() m_pImpl->saveChanges(*m_pOutSet); } - //------------------------------------------------------------------------- void ODbTypeWizDialogSetup::RegisterDataSourceByLocation(const OUString& _sPath) { Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource(); @@ -841,8 +803,6 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() xDatabaseContext->registerObject(sDatabaseName, xDatasource); } - - //------------------------------------------------------------------------- sal_Bool ODbTypeWizDialogSetup::callSaveAsDialog() { sal_Bool bRet = sal_False; @@ -881,7 +841,6 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() return bRet; } - //------------------------------------------------------------------------- void ODbTypeWizDialogSetup::createUniqueFolderName(INetURLObject* pURL) { Reference< XSimpleFileAccess3 > xSimpleFileAccess(ucb::SimpleFileAccess::create(getORB())); @@ -899,7 +858,6 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() } } - //------------------------------------------------------------------------- String ODbTypeWizDialogSetup::createUniqueFileName(const INetURLObject& _rURL) { Reference< XSimpleFileAccess3 > xSimpleFileAccess(ucb::SimpleFileAccess::create(getORB())); @@ -919,17 +877,14 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() } return aExistenceCheck.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET ); } - // ----------------------------------------------------------------------------- IWizardPageController* ODbTypeWizDialogSetup::getPageController( TabPage* _pCurrentPage ) const { OGenericAdministrationPage* pPage = static_cast<OGenericAdministrationPage*>(_pCurrentPage); return pPage; } - // ----------------------------------------------------------------------------- namespace { - // ............................................................................. typedef ::cppu::WeakImplHelper1 < XTerminateListener > AsyncLoader_Base; class AsyncLoader : public AsyncLoader_Base @@ -956,7 +911,6 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() DECL_LINK( OnOpenDocument, void* ); }; - // ............................................................................. AsyncLoader::AsyncLoader( const Reference< XComponentContext >& _rxORB, const OUString& _rURL ) :m_sURL( _rURL ) ,m_aAsyncCaller( LINK( this, AsyncLoader, OnOpenDocument ) ) @@ -973,7 +927,6 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() } } - // ............................................................................. void AsyncLoader::doLoadAsync() { OSL_ENSURE( !m_aAsyncCaller.IsRunning(), "AsyncLoader:doLoadAsync: already running!" ); @@ -989,7 +942,6 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() m_aAsyncCaller.Call( NULL ); } - // ............................................................................. IMPL_LINK( AsyncLoader, OnOpenDocument, void*, /*_pEmptyArg*/ ) { try @@ -1027,23 +979,19 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() return 0L; } - // ............................................................................. void SAL_CALL AsyncLoader::queryTermination( const com::sun::star::lang::EventObject& /*Event*/ ) throw (TerminationVetoException, RuntimeException) { throw TerminationVetoException(); } - // ............................................................................. void SAL_CALL AsyncLoader::notifyTermination( const com::sun::star::lang::EventObject& /*Event*/ ) throw (RuntimeException) { } - // ............................................................................. void SAL_CALL AsyncLoader::disposing( const com::sun::star::lang::EventObject& /*Source*/ ) throw (RuntimeException) { } } - // ----------------------------------------------------------------------------- sal_Bool ODbTypeWizDialogSetup::onFinish() { if ( m_pGeneralPage->GetDatabaseCreationMode() == OGeneralPageWizard::eOpenExisting ) @@ -1082,8 +1030,6 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() } } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index c822b6de009e..379cc306b342 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -18,7 +18,6 @@ */ #include <config_features.h> - #include "detailpages.hxx" #include "sqlmessage.hxx" #include "dsmeta.hxx" @@ -49,10 +48,8 @@ #include <comphelper/types.hxx> #include "AutoControls.hrc" -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdbc; @@ -61,11 +58,8 @@ namespace dbaui using namespace ::com::sun::star::container; using namespace ::dbtools; - //======================================================================== - //= OCommonBehaviourTabPage - //======================================================================== + // OCommonBehaviourTabPage DBG_NAME(OCommonBehaviourTabPage) - //------------------------------------------------------------------------ OCommonBehaviourTabPage::OCommonBehaviourTabPage(Window* pParent, sal_uInt16 nResId, const SfxItemSet& _rCoreAttrs, sal_uInt32 nControlFlags,bool _bFreeResource) @@ -123,7 +117,6 @@ namespace dbaui FreeResource(); } - // ----------------------------------------------------------------------- OCommonBehaviourTabPage::~OCommonBehaviourTabPage() { DELETEZ(m_pOptionsLabel); @@ -144,7 +137,6 @@ namespace dbaui DBG_DTOR(OCommonBehaviourTabPage,NULL); } - // ----------------------------------------------------------------------- void OCommonBehaviourTabPage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { if ((m_nControlFlags & CBTP_USE_OPTIONS) == CBTP_USE_OPTIONS) @@ -158,7 +150,6 @@ namespace dbaui _rControlList.push_back(new ODisableWrapper<FixedText>(m_pCharsetLabel)); } } - // ----------------------------------------------------------------------- void OCommonBehaviourTabPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { if ((m_nControlFlags & CBTP_USE_OPTIONS) == CBTP_USE_OPTIONS) @@ -168,7 +159,6 @@ namespace dbaui _rControlList.push_back(new OSaveValueWrapper<ListBox>(m_pCharset)); } - // ----------------------------------------------------------------------- void OCommonBehaviourTabPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -195,7 +185,6 @@ namespace dbaui } OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue); } - // ----------------------------------------------------------------------- sal_Bool OCommonBehaviourTabPage::FillItemSet(SfxItemSet& _rSet) { sal_Bool bChangedSomething = sal_False; @@ -214,11 +203,8 @@ namespace dbaui return bChangedSomething; } - //======================================================================== - //= ODbaseDetailsPage - //======================================================================== + // ODbaseDetailsPage DBG_NAME(ODbaseDetailsPage) - //------------------------------------------------------------------------ ODbaseDetailsPage::ODbaseDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ) :OCommonBehaviourTabPage(pParent, PAGE_DBASE, _rCoreAttrs, CBTP_USE_CHARSET ,false) ,m_aShowDeleted (this, ModuleRes(CB_SHOWDELETEDROWS)) @@ -237,26 +223,22 @@ namespace dbaui FreeResource(); } - // ----------------------------------------------------------------------- ODbaseDetailsPage::~ODbaseDetailsPage() { DBG_DTOR(ODbaseDetailsPage,NULL); } - // ----------------------------------------------------------------------- SfxTabPage* ODriversSettings::CreateDbase( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new ODbaseDetailsPage( pParent, _rAttrSet ) ); } - // ----------------------------------------------------------------------- void ODbaseDetailsPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { OCommonBehaviourTabPage::fillControls(_rControlList); _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aShowDeleted)); } - // ----------------------------------------------------------------------- void ODbaseDetailsPage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { OCommonBehaviourTabPage::fillWindows(_rControlList); @@ -264,7 +246,6 @@ namespace dbaui _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFT_Message)); _rControlList.push_back(new ODisableWrapper<PushButton>(&m_aIndexes)); } - // ----------------------------------------------------------------------- void ODbaseDetailsPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -290,7 +271,6 @@ namespace dbaui OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue); } - // ----------------------------------------------------------------------- sal_Bool ODbaseDetailsPage::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); @@ -299,7 +279,6 @@ namespace dbaui return bChangedSomething; } - //------------------------------------------------------------------------ IMPL_LINK( ODbaseDetailsPage, OnButtonClicked, Button*, pButton ) { if (&m_aIndexes == pButton) @@ -317,11 +296,8 @@ namespace dbaui return 0; } - //======================================================================== - //= OAdoDetailsPage - //======================================================================== + // OAdoDetailsPage DBG_NAME(OAdoDetailsPage) - // ----------------------------------------------------------------------- OAdoDetailsPage::OAdoDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ) :OCommonBehaviourTabPage(pParent, PAGE_ADO, _rCoreAttrs, CBTP_USE_CHARSET ) { @@ -329,22 +305,17 @@ namespace dbaui } - // ----------------------------------------------------------------------- OAdoDetailsPage::~OAdoDetailsPage() { DBG_DTOR(OAdoDetailsPage,NULL); } - // ----------------------------------------------------------------------- SfxTabPage* ODriversSettings::CreateAdo( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OAdoDetailsPage( pParent, _rAttrSet ) ); } - // ----------------------------------------------------------------------- - //======================================================================== - //= OOdbcDetailsPage - //======================================================================== + // OOdbcDetailsPage OOdbcDetailsPage::OOdbcDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ) :OCommonBehaviourTabPage(pParent, PAGE_ODBC, _rCoreAttrs, CBTP_USE_CHARSET | CBTP_USE_OPTIONS,false) ,m_aFL_1 (this, ModuleRes(FL_SEPARATOR1)) @@ -362,32 +333,27 @@ namespace dbaui pWindows[i]->SetZOrder(pWindows[i-1], WINDOW_ZORDER_BEHIND); } - // ----------------------------------------------------------------------- SfxTabPage* ODriversSettings::CreateODBC( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OOdbcDetailsPage( pParent, _rAttrSet ) ); } - // ----------------------------------------------------------------------- sal_Bool OOdbcDetailsPage::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); fillBool(_rSet,&m_aUseCatalog,DSID_USECATALOG,bChangedSomething); return bChangedSomething; } - // ----------------------------------------------------------------------- void OOdbcDetailsPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { OCommonBehaviourTabPage::fillControls(_rControlList); _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aUseCatalog)); } - // ----------------------------------------------------------------------- void OOdbcDetailsPage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { OCommonBehaviourTabPage::fillWindows(_rControlList); _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aFL_1)); } - // ----------------------------------------------------------------------- void OOdbcDetailsPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -401,9 +367,7 @@ namespace dbaui OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue); } - //======================================================================== - //= OOdbcDetailsPage - //======================================================================== + // OOdbcDetailsPage OUserDriverDetailsPage::OUserDriverDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ) :OCommonBehaviourTabPage(pParent, PAGE_USERDRIVER, _rCoreAttrs, CBTP_USE_CHARSET | CBTP_USE_OPTIONS ,false) @@ -417,13 +381,11 @@ namespace dbaui FreeResource(); } - // ----------------------------------------------------------------------- SfxTabPage* ODriversSettings::CreateUser( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OUserDriverDetailsPage( pParent, _rAttrSet ) ); } - // ----------------------------------------------------------------------- sal_Bool OUserDriverDetailsPage::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); @@ -434,7 +396,6 @@ namespace dbaui return bChangedSomething; } - // ----------------------------------------------------------------------- void OUserDriverDetailsPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { OCommonBehaviourTabPage::fillControls(_rControlList); @@ -442,14 +403,12 @@ namespace dbaui _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aUseCatalog)); _rControlList.push_back(new OSaveValueWrapper<NumericField>(&m_aNFPortNumber)); } - // ----------------------------------------------------------------------- void OUserDriverDetailsPage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { OCommonBehaviourTabPage::fillWindows(_rControlList); _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTHostname)); _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aPortNumber)); } - // ----------------------------------------------------------------------- void OUserDriverDetailsPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -473,23 +432,18 @@ namespace dbaui OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue); } - //======================================================================== - //= OMySQLODBCDetailsPage - //======================================================================== + // OMySQLODBCDetailsPage OMySQLODBCDetailsPage::OMySQLODBCDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ) :OCommonBehaviourTabPage(pParent, PAGE_MYSQL_ODBC, _rCoreAttrs, CBTP_USE_CHARSET ) { } - // ----------------------------------------------------------------------- SfxTabPage* ODriversSettings::CreateMySQLODBC( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OMySQLODBCDetailsPage( pParent, _rAttrSet ) ); } - //======================================================================== - //= OMySQLJDBCDetailsPage - //======================================================================== + // OMySQLJDBCDetailsPage OGeneralSpecialJDBCDetailsPage::OGeneralSpecialJDBCDetailsPage( Window* pParent,sal_uInt16 _nResId, const SfxItemSet& _rCoreAttrs ,sal_uInt16 _nPortId) :OCommonBehaviourTabPage(pParent, _nResId, _rCoreAttrs, CBTP_USE_CHARSET ,false) ,m_aFL_1 (this, ModuleRes( FL_SEPARATOR1) ) @@ -545,7 +499,6 @@ namespace dbaui FreeResource(); } - // ----------------------------------------------------------------------- void OGeneralSpecialJDBCDetailsPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { OCommonBehaviourTabPage::fillControls(_rControlList); @@ -555,7 +508,6 @@ namespace dbaui _rControlList.push_back(new OSaveValueWrapper<NumericField>(&m_aNFPortNumber)); _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aEDSocket)); } - // ----------------------------------------------------------------------- void OGeneralSpecialJDBCDetailsPage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { OCommonBehaviourTabPage::fillWindows(_rControlList); @@ -567,7 +519,6 @@ namespace dbaui _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aFL_1)); } - // ----------------------------------------------------------------------- sal_Bool OGeneralSpecialJDBCDetailsPage::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); @@ -579,7 +530,6 @@ namespace dbaui return bChangedSomething; } - // ----------------------------------------------------------------------- void OGeneralSpecialJDBCDetailsPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -618,7 +568,6 @@ namespace dbaui m_aEDDriverClass.SetModifyFlag(); } } - // ----------------------------------------------------------------------- IMPL_LINK(OGeneralSpecialJDBCDetailsPage, OnTestJavaClickHdl, PushButton*, /*_pButton*/) { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); @@ -645,7 +594,6 @@ namespace dbaui aMsg.Execute(); return 0L; } - // ----------------------------------------------------------------------- IMPL_LINK(OGeneralSpecialJDBCDetailsPage, OnEditModified, Edit*, _pEdit) { if ( m_bUseClass && _pEdit == &m_aEDDriverClass ) @@ -656,9 +604,7 @@ namespace dbaui return 0L; } - //======================================================================== - //= MySQLNativePage - //======================================================================== + // MySQLNativePage MySQLNativePage::MySQLNativePage( Window* pParent, const SfxItemSet& _rCoreAttrs ) :OCommonBehaviourTabPage(pParent, PAGE_MYSQL_NATIVE, _rCoreAttrs, CBTP_USE_CHARSET, false ) ,m_aSeparator1 ( this, ModuleRes( FL_SEPARATOR1) ) @@ -682,7 +628,6 @@ namespace dbaui FreeResource(); } - // ----------------------------------------------------------------------- void MySQLNativePage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { OCommonBehaviourTabPage::fillControls( _rControlList ); @@ -691,7 +636,6 @@ namespace dbaui _rControlList.push_back(new OSaveValueWrapper<Edit>(&m_aUserName)); _rControlList.push_back(new OSaveValueWrapper<CheckBox>(&m_aPasswordRequired)); } - // ----------------------------------------------------------------------- void MySQLNativePage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { OCommonBehaviourTabPage::fillWindows( _rControlList ); @@ -702,7 +646,6 @@ namespace dbaui _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aUserNameLabel)); } - // ----------------------------------------------------------------------- sal_Bool MySQLNativePage::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet( _rSet ); @@ -719,7 +662,6 @@ namespace dbaui return bChangedSomething; } - // ----------------------------------------------------------------------- void MySQLNativePage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -741,26 +683,21 @@ namespace dbaui OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue); } - // ----------------------------------------------------------------------- SfxTabPage* ODriversSettings::CreateMySQLJDBC( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OGeneralSpecialJDBCDetailsPage( pParent,PAGE_MYSQL_JDBC, _rAttrSet,DSID_MYSQL_PORTNUMBER ) ); } - // ----------------------------------------------------------------------- SfxTabPage* ODriversSettings::CreateMySQLNATIVE( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new MySQLNativePage( pParent, _rAttrSet ) ); } - // ----------------------------------------------------------------------- SfxTabPage* ODriversSettings::CreateOracleJDBC( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OGeneralSpecialJDBCDetailsPage( pParent,PAGE_ORACLE_JDBC, _rAttrSet,DSID_ORACLE_PORTNUMBER) ); } - //======================================================================== - //= OLDAPDetailsPage - //======================================================================== + // OLDAPDetailsPage OLDAPDetailsPage::OLDAPDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ) :OCommonBehaviourTabPage(pParent, PAGE_LDAP, _rCoreAttrs,0,false) ,m_aFL_1 (this, ModuleRes( FL_SEPARATOR1) ) @@ -784,13 +721,11 @@ namespace dbaui FreeResource(); } - // ----------------------------------------------------------------------- SfxTabPage* ODriversSettings::CreateLDAP( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OLDAPDetailsPage( pParent, _rAttrSet ) ); } - // ----------------------------------------------------------------------- sal_Bool OLDAPDetailsPage::FillItemSet( SfxItemSet& _rSet ) { sal_Bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet); @@ -801,7 +736,6 @@ namespace dbaui fillBool(_rSet,&m_aCBUseSSL,DSID_CONN_LDAP_USESSL,bChangedSomething); return bChangedSomething; } - //------------------------------------------------------------------------ IMPL_LINK( OLDAPDetailsPage, OnCheckBoxClick, CheckBox*, pCheckBox ) { callModifiedHdl(); @@ -821,7 +755,6 @@ namespace dbaui return 0; } - // ----------------------------------------------------------------------- void OLDAPDetailsPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { OCommonBehaviourTabPage::fillControls(_rControlList); @@ -830,7 +763,6 @@ namespace dbaui _rControlList.push_back(new OSaveValueWrapper<NumericField>(&m_aNFPortNumber)); _rControlList.push_back(new OSaveValueWrapper<NumericField>(&m_aNFRowCount)); } - // ----------------------------------------------------------------------- void OLDAPDetailsPage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { OCommonBehaviourTabPage::fillWindows(_rControlList); @@ -839,14 +771,12 @@ namespace dbaui _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aFTRowCount)); _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aFL_1)); } - // ----------------------------------------------------------------------- void OLDAPDetailsPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) sal_Bool bValid, bReadonly; getFlags(_rSet, bValid, bReadonly); - SFX_ITEMSET_GET(_rSet, pBaseDN, SfxStringItem, DSID_CONN_LDAP_BASEDN, sal_True); SFX_ITEMSET_GET(_rSet, pUseSSL, SfxBoolItem, DSID_CONN_LDAP_USESSL, sal_True); SFX_ITEMSET_GET(_rSet, pPortNumber, SfxInt32Item, DSID_CONN_LDAP_PORTNUMBER, sal_True); @@ -863,12 +793,8 @@ namespace dbaui OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue); } - - //======================================================================== - //= OTextDetailsPage - //======================================================================== + // OTextDetailsPage DBG_NAME(OTextDetailsPage) - //------------------------------------------------------------------------ OTextDetailsPage::OTextDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ) :OCommonBehaviourTabPage(pParent, PAGE_TEXT, _rCoreAttrs, 0, false ) { @@ -878,7 +804,6 @@ namespace dbaui FreeResource(); } - // ----------------------------------------------------------------------- OTextDetailsPage::~OTextDetailsPage() { DELETEZ(m_pTextConnectionHelper); @@ -886,26 +811,22 @@ namespace dbaui DBG_DTOR(OTextDetailsPage,NULL); } - // ----------------------------------------------------------------------- SfxTabPage* ODriversSettings::CreateText( Window* pParent, const SfxItemSet& _rAttrSet ) { return ( new OTextDetailsPage( pParent, _rAttrSet ) ); } - // ----------------------------------------------------------------------- void OTextDetailsPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { OCommonBehaviourTabPage::fillControls(_rControlList); m_pTextConnectionHelper->fillControls(_rControlList); } - // ----------------------------------------------------------------------- void OTextDetailsPage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { OCommonBehaviourTabPage::fillWindows(_rControlList); m_pTextConnectionHelper->fillWindows(_rControlList); } - // ----------------------------------------------------------------------- void OTextDetailsPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // first check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -916,7 +837,6 @@ namespace dbaui OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue); } - // ----------------------------------------------------------------------- sal_Bool OTextDetailsPage::FillItemSet( SfxItemSet& rSet ) { sal_Bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(rSet); @@ -924,27 +844,22 @@ namespace dbaui return bChangedSomething; } - // ----------------------------------------------------------------------- sal_Bool OTextDetailsPage::prepareLeave() { return m_pTextConnectionHelper->prepareLeave(); } - //------------------------------------------------------------------------ SfxTabPage* ODriversSettings::CreateGeneratedValuesPage( Window* _pParent, const SfxItemSet& _rAttrSet ) { return new GeneratedValuesPage( _pParent, _rAttrSet ); } - //------------------------------------------------------------------------ SfxTabPage* ODriversSettings::CreateSpecialSettingsPage( Window* _pParent, const SfxItemSet& _rAttrSet ) { OUString eType = ODbDataSourceAdministrationHelper::getDatasourceType( _rAttrSet ); DataSourceMetaData aMetaData( eType ); return new SpecialSettingsPage( _pParent, _rAttrSet, aMetaData ); } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/detailpages.hxx b/dbaccess/source/ui/dlg/detailpages.hxx index 9e1a3e792e7a..bf04af7a25c3 100644 --- a/dbaccess/source/ui/dlg/detailpages.hxx +++ b/dbaccess/source/ui/dlg/detailpages.hxx @@ -33,14 +33,9 @@ #include <svtools/dialogcontrolling.hxx> - -//......................................................................... namespace dbaui { -//......................................................................... - //========================================================================= - //= OCommonBehaviourTabPage - //========================================================================= + // OCommonBehaviourTabPage #define CBTP_NONE 0x00000000 #define CBTP_USE_CHARSET 0x00000002 #define CBTP_USE_OPTIONS 0x00000004 @@ -90,9 +85,7 @@ namespace dbaui virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList); }; - //======================================================================== - //= ODbaseDetailsPage - //======================================================================== + // ODbaseDetailsPage class ODbaseDetailsPage : public OCommonBehaviourTabPage { public: @@ -121,9 +114,7 @@ namespace dbaui DECL_LINK( OnButtonClicked, Button * ); }; - //======================================================================== - //= OAdoDetailsPage - //======================================================================== + // OAdoDetailsPage class OAdoDetailsPage : public OCommonBehaviourTabPage { protected: @@ -133,9 +124,7 @@ namespace dbaui OAdoDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ); }; - //======================================================================== - //= OOdbcDetailsPage - //======================================================================== + // OOdbcDetailsPage class OOdbcDetailsPage : public OCommonBehaviourTabPage { public: @@ -151,10 +140,7 @@ namespace dbaui CheckBox m_aUseCatalog; }; - - //======================================================================== - //= OUserDriverDetailsPage - //======================================================================== + // OUserDriverDetailsPage class OUserDriverDetailsPage : public OCommonBehaviourTabPage { public: @@ -173,18 +159,14 @@ namespace dbaui CheckBox m_aUseCatalog; }; - //======================================================================== - //= OMySQLODBCDetailsPage - //======================================================================== + // OMySQLODBCDetailsPage class OMySQLODBCDetailsPage : public OCommonBehaviourTabPage { public: OMySQLODBCDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ); }; - //======================================================================== - //= OGeneralSpecialJDBCDetailsPage - //======================================================================== + // OGeneralSpecialJDBCDetailsPage class OGeneralSpecialJDBCDetailsPage : public OCommonBehaviourTabPage { public: @@ -196,7 +178,6 @@ namespace dbaui protected: - virtual sal_Bool FillItemSet( SfxItemSet& _rCoreAttrs ); virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList); @@ -222,9 +203,7 @@ namespace dbaui bool m_bUseClass; }; - //======================================================================== - //= MySQLNativePage - //======================================================================== + // MySQLNativePage class MySQLNativePage : public OCommonBehaviourTabPage { public: @@ -247,9 +226,7 @@ namespace dbaui virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList); }; - //======================================================================== - //= OOdbcDetailsPage - //======================================================================== + // OOdbcDetailsPage class OLDAPDetailsPage : public OCommonBehaviourTabPage { public: @@ -275,9 +252,7 @@ namespace dbaui DECL_LINK( OnCheckBoxClick, CheckBox * ); }; - //======================================================================== - //= OMozillaDetailsPage Detail page for Mozilla and Thunderbird addressbook - //======================================================================== + // OMozillaDetailsPage Detail page for Mozilla and Thunderbird addressbook class OMozillaDetailsPage : public OCommonBehaviourTabPage { protected: @@ -287,9 +262,7 @@ namespace dbaui OMozillaDetailsPage( Window* pParent, const SfxItemSet& _rCoreAttrs ); }; - //======================================================================== - //= OTextDetailsPage - //======================================================================== + // OTextDetailsPage class OTextDetailsPage : public OCommonBehaviourTabPage { public: @@ -314,9 +287,7 @@ namespace dbaui private: }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_DETAILPAGES_HXX_ diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx index 8393306ec1b3..5568a1fa1a72 100644 --- a/dbaccess/source/ui/dlg/directsql.cxx +++ b/dbaccess/source/ui/dlg/directsql.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "directsql.hxx" #include "dbu_dlg.hrc" #include <vcl/msgbox.hxx> @@ -28,20 +27,15 @@ #include <rtl/strbuf.hxx> #include <com/sun/star/sdbc/XRow.hpp> -//........................................................................ namespace dbaui { -//........................................................................ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::lang; - //==================================================================== - //= DirectSQLDialog - //==================================================================== + // DirectSQLDialog DBG_NAME(DirectSQLDialog) -//-------------------------------------------------------------------- DirectSQLDialog::DirectSQLDialog( Window* _pParent, const Reference< XConnection >& _rxConn ) :ModalDialog(_pParent, "DirectSQLDialog" , "dbaccess/ui/directsqldialog.ui") ,m_nHistoryLimit(20) @@ -82,7 +76,6 @@ DBG_NAME(DirectSQLDialog) OnStatementModified(m_pSQL); } - //-------------------------------------------------------------------- DirectSQLDialog::~DirectSQLDialog() { { @@ -93,7 +86,6 @@ DBG_NAME(DirectSQLDialog) DBG_DTOR(DirectSQLDialog,NULL); } - //-------------------------------------------------------------------- void DirectSQLDialog::_disposing( const EventObject& _rSource ) { SolarMutexGuard aSolarGuard; @@ -112,14 +104,12 @@ DBG_NAME(DirectSQLDialog) PostUserEvent(LINK(this, DirectSQLDialog, OnClose)); } - //-------------------------------------------------------------------- sal_Int32 DirectSQLDialog::getHistorySize() const { CHECK_INVARIANTS("DirectSQLDialog::getHistorySize"); return m_aStatementHistory.size(); } - //-------------------------------------------------------------------- void DirectSQLDialog::implEnsureHistoryLimit() { CHECK_INVARIANTS("DirectSQLDialog::implEnsureHistoryLimit"); @@ -137,7 +127,6 @@ DBG_NAME(DirectSQLDialog) } } - //-------------------------------------------------------------------- void DirectSQLDialog::implAddToStatementHistory(const String& _rStatement) { CHECK_INVARIANTS("DirectSQLDialog::implAddToStatementHistory"); @@ -158,7 +147,6 @@ DBG_NAME(DirectSQLDialog) } #ifdef DBG_UTIL - //-------------------------------------------------------------------- const sal_Char* DirectSQLDialog::impl_CheckInvariants() const { if (m_aStatementHistory.size() != m_aNormalizedHistory.size()) @@ -177,7 +165,6 @@ DBG_NAME(DirectSQLDialog) } #endif - //-------------------------------------------------------------------- void DirectSQLDialog::implExecuteStatement(const String& _rStatement) { CHECK_INVARIANTS("DirectSQLDialog::implExecuteStatement"); @@ -250,7 +237,6 @@ DBG_NAME(DirectSQLDialog) addStatusText(sStatus); } - //-------------------------------------------------------------------- void DirectSQLDialog::addStatusText(const String& _rMessage) { OUString sAppendMessage = OUString::number(m_nStatusCount++) + ": " + _rMessage + "\n\n"; @@ -261,7 +247,6 @@ DBG_NAME(DirectSQLDialog) m_pStatus->SetSelection(Selection(sCompleteMessage.getLength(), sCompleteMessage.getLength())); } - //-------------------------------------------------------------------- void DirectSQLDialog::addOutputText(const String& _rMessage) { String sAppendMessage = _rMessage; @@ -272,7 +257,6 @@ DBG_NAME(DirectSQLDialog) m_pOutput->SetText(sCompleteMessage); } - //-------------------------------------------------------------------- void DirectSQLDialog::executeCurrent() { CHECK_INVARIANTS("DirectSQLDialog::executeCurrent"); @@ -289,7 +273,6 @@ DBG_NAME(DirectSQLDialog) m_pSQL->GrabFocus(); } - //-------------------------------------------------------------------- void DirectSQLDialog::switchToHistory(sal_Int32 _nHistoryPos, sal_Bool _bUpdateListBox) { CHECK_INVARIANTS("DirectSQLDialog::switchToHistory"); @@ -316,28 +299,24 @@ DBG_NAME(DirectSQLDialog) OSL_FAIL("DirectSQLDialog::switchToHistory: invalid position!"); } - //-------------------------------------------------------------------- IMPL_LINK( DirectSQLDialog, OnStatementModified, void*, /*NOTINTERESTEDIN*/ ) { m_pExecute->Enable(!m_pSQL->GetText().isEmpty()); return 0L; } - //-------------------------------------------------------------------- IMPL_LINK( DirectSQLDialog, OnClose, void*, /*NOTINTERESTEDIN*/ ) { EndDialog( RET_OK ); return 0L; } - //-------------------------------------------------------------------- IMPL_LINK( DirectSQLDialog, OnExecute, void*, /*NOTINTERESTEDIN*/ ) { executeCurrent(); return 0L; } - //-------------------------------------------------------------------- IMPL_LINK( DirectSQLDialog, OnListEntrySelected, void*, /*NOTINTERESTEDIN*/ ) { if (!m_pSQLHistory->IsTravelSelect()) @@ -349,8 +328,6 @@ DBG_NAME(DirectSQLDialog) return 0L; } -//........................................................................ } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dlgattr.cxx b/dbaccess/source/ui/dlg/dlgattr.cxx index e4d6da3151b3..708cf96ea6a5 100644 --- a/dbaccess/source/ui/dlg/dlgattr.cxx +++ b/dbaccess/source/ui/dlg/dlgattr.cxx @@ -34,7 +34,6 @@ using namespace dbaui; DBG_NAME(SbaSbAttrDlg) -//================================================================== SbaSbAttrDlg::SbaSbAttrDlg(Window* pParent, const SfxItemSet* pCellAttrs, SvNumberFormatter* pFormatter, sal_uInt16 nFlags, sal_Bool bRow) : SfxTabDialog(pParent, ModuleRes( DLG_ATTR ), pCellAttrs ) ,aTitle(ModuleRes(ST_ROW)) @@ -56,7 +55,6 @@ SbaSbAttrDlg::SbaSbAttrDlg(Window* pParent, const SfxItemSet* pCellAttrs, SvNumb FreeResource(); } -// ----------------------------------------------------------------------- SbaSbAttrDlg::~SbaSbAttrDlg() { delete pNumberInfoItem; @@ -64,7 +62,6 @@ SbaSbAttrDlg::~SbaSbAttrDlg() DBG_DTOR(SbaSbAttrDlg,NULL); } -// ----------------------------------------------------------------------- void SbaSbAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); @@ -82,5 +79,4 @@ void SbaSbAttrDlg::PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ) } } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx index 18d934094ccc..09cd05a08091 100644 --- a/dbaccess/source/ui/dlg/dlgsave.cxx +++ b/dbaccess/source/ui/dlg/dlgsave.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dlgsave.hxx" #include "dlgsave.hrc" #include <vcl/msgbox.hxx> @@ -39,7 +38,6 @@ #include "objectnamecheck.hxx" #include <tools/diagnose_ex.h> - using namespace dbaui; using namespace dbtools; using namespace ::com::sun::star::uno; @@ -81,9 +79,9 @@ public: const IObjectNameCheck& _rObjectNameCheck, sal_Int32 _nFlags); }; -// ----------------------------------------------------------------------------- + } // dbaui -// ----------------------------------------------------------------------------- + OSaveAsDlgImpl::OSaveAsDlgImpl( Window * _pParent, const sal_Int32& _rType, const Reference< XConnection>& _xConnection, @@ -121,7 +119,7 @@ OSaveAsDlgImpl::OSaveAsDlgImpl( Window * _pParent, m_aCatalog.SetDropDownLineCount( 10 ); m_aSchema.SetDropDownLineCount( 10 ); } -// ----------------------------------------------------------------------------- + OSaveAsDlgImpl::OSaveAsDlgImpl( Window * _pParent, const String& rDefault, const IObjectNameCheck& _rObjectNameCheck, @@ -147,10 +145,8 @@ OSaveAsDlgImpl::OSaveAsDlgImpl( Window * _pParent, m_aSchema.SetDropDownLineCount( 10 ); } -// ----------------------------------------------------------------------------- using namespace ::com::sun::star::lang; -//================================================================== namespace { typedef Reference< XResultSet > (SAL_CALL XDatabaseMetaData::*FGetMetaStrings)(); @@ -185,7 +181,6 @@ namespace } } -//================================================================== OSaveAsDlg::OSaveAsDlg( Window * pParent, const sal_Int32& _rType, const Reference< XComponentContext >& _rxContext, @@ -301,7 +296,7 @@ OSaveAsDlg::OSaveAsDlg( Window * pParent, implInit(); } -// ----------------------------------------------------------------------------- + OSaveAsDlg::OSaveAsDlg( Window * pParent, const Reference< XComponentContext >& _rxContext, const String& rDefault, @@ -315,12 +310,12 @@ OSaveAsDlg::OSaveAsDlg( Window * pParent, implInitOnlyTitle(_sLabel); implInit(); } -// ----------------------------------------------------------------------------- + OSaveAsDlg::~OSaveAsDlg() { DELETEZ(m_pImpl); } -// ----------------------------------------------------------------------------- + IMPL_LINK(OSaveAsDlg, ButtonClickHdl, Button *, pButton) { if (pButton == &m_pImpl->m_aPB_OK) @@ -350,7 +345,6 @@ IMPL_LINK(OSaveAsDlg, ButtonClickHdl, Button *, pButton) } return 0; } -// ----------------------------------------------------------------------------- IMPL_LINK(OSaveAsDlg, EditModifyHdl, Edit *, pEdit ) { @@ -358,7 +352,7 @@ IMPL_LINK(OSaveAsDlg, EditModifyHdl, Edit *, pEdit ) m_pImpl->m_aPB_OK.Enable(!m_pImpl->m_aTitle.GetText().isEmpty()); return 0; } -// ----------------------------------------------------------------------------- + void OSaveAsDlg::implInitOnlyTitle(const String& _rLabel) { m_pImpl->m_aLabel.SetText(_rLabel); @@ -383,7 +377,7 @@ void OSaveAsDlg::implInitOnlyTitle(const String& _rLabel) m_pImpl->m_aTitle.SetText(m_pImpl->m_aName); m_pImpl->m_aTitle.setCheck(sal_False); // enable non valid sql chars as well } -// ----------------------------------------------------------------------------- + void OSaveAsDlg::implInit() { if ( 0 == ( m_pImpl->m_nFlags & SAD_ADDITIONAL_DESCRIPTION ) ) @@ -427,7 +421,7 @@ void OSaveAsDlg::implInit() m_pImpl->m_aTitle.GrabFocus(); FreeResource(); } -// ----------------------------------------------------------------------------- + String OSaveAsDlg::getName() const { return m_pImpl->m_aName; } String OSaveAsDlg::getCatalog() const { return m_pImpl->m_aCatalog.IsVisible() ? m_pImpl->m_aCatalog.GetText() : OUString(); } String OSaveAsDlg::getSchema() const { return m_pImpl->m_aSchema.IsVisible() ? m_pImpl->m_aSchema.GetText() : OUString(); } diff --git a/dbaccess/source/ui/dlg/dlgsize.cxx b/dbaccess/source/ui/dlg/dlgsize.cxx index 01cb05f759dd..c60d0f10aa71 100644 --- a/dbaccess/source/ui/dlg/dlgsize.cxx +++ b/dbaccess/source/ui/dlg/dlgsize.cxx @@ -22,17 +22,13 @@ #include "dbu_dlg.hrc" #include "moduledbu.hxx" -//......................................................................... namespace dbaui { -//......................................................................... - #define DEF_ROW_HEIGHT 45 #define DEF_COL_WIDTH 227 DBG_NAME(DlgSize) -//================================================================== DlgSize::DlgSize( Window* pParent, sal_Int32 nVal, sal_Bool bRow, sal_Int32 _nAlternativeStandard ) :ModalDialog( pParent, ModuleRes(bRow ? DLG_ROWHEIGHT : DLG_COLWIDTH)) ,m_nPrevValue(nVal) @@ -63,20 +59,17 @@ DlgSize::DlgSize( Window* pParent, sal_Int32 nVal, sal_Bool bRow, sal_Int32 _nAl FreeResource(); } -//------------------------------------------------------------------------------ DlgSize::~DlgSize() { DBG_DTOR(DlgSize,NULL); } -//------------------------------------------------------------------------------ void DlgSize::SetValue( sal_Int32 nVal ) { aMF_VALUE.SetValue(nVal, FUNIT_CM ); } -//------------------------------------------------------------------------------ sal_Int32 DlgSize::GetValue() { if (aCB_STANDARD.IsChecked()) @@ -84,7 +77,6 @@ sal_Int32 DlgSize::GetValue() return (sal_Int32)aMF_VALUE.GetValue( FUNIT_CM ); } -//------------------------------------------------------------------------------ IMPL_LINK( DlgSize, CbClickHdl, Button *, pButton ) { @@ -104,10 +96,7 @@ IMPL_LINK( DlgSize, CbClickHdl, Button *, pButton ) } return 0; } -// ----------------------------------------------------------------------------- -//......................................................................... -} // namespace dbaui -//......................................................................... +} // namespace dbaui /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dsnItem.hxx b/dbaccess/source/ui/dlg/dsnItem.hxx index 9ac247394b62..8f1b636f8f3f 100644 --- a/dbaccess/source/ui/dlg/dsnItem.hxx +++ b/dbaccess/source/ui/dlg/dsnItem.hxx @@ -22,21 +22,13 @@ #include <svl/poolitem.hxx> -//......................................................................... namespace dbaccess { -//......................................................................... class ODsnTypeCollection; -//......................................................................... } -//......................................................................... -//......................................................................... namespace dbaui { -//......................................................................... - //========================================================================= - //= DbuTypeCollectionItem - //========================================================================= + // DbuTypeCollectionItem /** allows an ODsnTypeCollection to be transported in an SfxItemSet */ class DbuTypeCollectionItem : public SfxPoolItem @@ -53,9 +45,7 @@ namespace dbaui ::dbaccess::ODsnTypeCollection* getCollection() const { return m_pCollection; } }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_DSNITEM_HXX_ diff --git a/dbaccess/source/ui/dlg/dsselect.cxx b/dbaccess/source/ui/dlg/dsselect.cxx index 3fe579f10139..fea904bcdeac 100644 --- a/dbaccess/source/ui/dlg/dsselect.cxx +++ b/dbaccess/source/ui/dlg/dsselect.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dsselect.hxx" #include "dsselect.hrc" #include "dbu_dlg.hrc" @@ -41,17 +40,14 @@ #include <svl/eitem.hxx> #include <svl/itemset.hxx> -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::ui::dialogs; using namespace ::comphelper; -//================================================================== ODatasourceSelectDialog::ODatasourceSelectDialog(Window* _pParent, const StringBag& _rDatasources, SfxItemSet* _pOutputSet) :ModalDialog(_pParent, ModuleRes(DLG_DATASOURCE_SELECTION)) ,m_aDescription (this, ModuleRes(FT_DESCRIPTION)) @@ -75,12 +71,10 @@ ODatasourceSelectDialog::ODatasourceSelectDialog(Window* _pParent, const StringB FreeResource(); } -// ----------------------------------------------------------------------- ODatasourceSelectDialog::~ODatasourceSelectDialog() { } -// ----------------------------------------------------------------------- IMPL_LINK( ODatasourceSelectDialog, ListDblClickHdl, ListBox *, pListBox ) { if (pListBox->GetSelectEntryCount()) @@ -88,7 +82,6 @@ IMPL_LINK( ODatasourceSelectDialog, ListDblClickHdl, ListBox *, pListBox ) return 0; } -// ----------------------------------------------------------------------- sal_Bool ODatasourceSelectDialog::Close() { #ifdef HAVE_ODBC_ADMINISTRATION @@ -99,7 +92,6 @@ sal_Bool ODatasourceSelectDialog::Close() return ModalDialog::Close(); } -// ----------------------------------------------------------------------- #ifdef HAVE_ODBC_ADMINISTRATION IMPL_LINK_NOARG(ODatasourceSelectDialog, ManageClickHdl) { @@ -139,7 +131,6 @@ IMPL_LINK( ODatasourceSelectDialog, ManageProcessFinished, void*, /**/ ) } #endif -// ----------------------------------------------------------------------------- void ODatasourceSelectDialog::fillListBox(const StringBag& _rDatasources) { OUString sSelected; @@ -164,8 +155,6 @@ void ODatasourceSelectDialog::fillListBox(const StringBag& _rDatasources) } } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/dsselect.hxx b/dbaccess/source/ui/dlg/dsselect.hxx index 8828f45b6b6f..2c332cbc865d 100644 --- a/dbaccess/source/ui/dlg/dsselect.hxx +++ b/dbaccess/source/ui/dlg/dsselect.hxx @@ -34,14 +34,10 @@ #include <memory> class SfxItemSet; -//......................................................................... namespace dbaui { -//......................................................................... -//========================================================================= -//= ODatasourceSelector -//========================================================================= +// ODatasourceSelector class ODatasourceSelectDialog : public ModalDialog { protected: @@ -77,9 +73,7 @@ protected: void fillListBox(const StringBag& _rDatasources); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_DSSELECT_HXX_ diff --git a/dbaccess/source/ui/dlg/finteraction.cxx b/dbaccess/source/ui/dlg/finteraction.cxx index 3b08159b58b9..ba4adf9f3881 100644 --- a/dbaccess/source/ui/dlg/finteraction.cxx +++ b/dbaccess/source/ui/dlg/finteraction.cxx @@ -17,25 +17,19 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "finteraction.hxx" #include <tools/debug.hxx> #include <osl/diagnose.h> #include <com/sun/star/ucb/InteractiveIOException.hpp> -//........................................................................ namespace dbaui { -//........................................................................ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::task; using namespace ::com::sun::star::ucb; - //==================================================================== - //= OFilePickerInteractionHandler - //==================================================================== + // OFilePickerInteractionHandler DBG_NAME( OFilePickerInteractionHandler ) - //-------------------------------------------------------------------- OFilePickerInteractionHandler::OFilePickerInteractionHandler( const Reference< XInteractionHandler >& _rxMaster ) :m_xMaster( _rxMaster ) ,m_bDoesNotExist(sal_False) @@ -44,13 +38,11 @@ namespace dbaui OSL_ENSURE( m_xMaster.is(), "OFilePickerInteractionHandler::OFilePickerInteractionHandler: invalid master handler!" ); } - //-------------------------------------------------------------------- OFilePickerInteractionHandler::~OFilePickerInteractionHandler( ) { DBG_DTOR( OFilePickerInteractionHandler, NULL ); } - //-------------------------------------------------------------------- void SAL_CALL OFilePickerInteractionHandler::handle( const Reference< XInteractionRequest >& _rxRequest ) throw (RuntimeException) { InteractiveIOException aIoException; @@ -67,8 +59,6 @@ namespace dbaui m_xMaster->handle( _rxRequest ); } -//........................................................................ } // namespace svt -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/finteraction.hxx b/dbaccess/source/ui/dlg/finteraction.hxx index 90bacd2bd28f..1df4220745d2 100644 --- a/dbaccess/source/ui/dlg/finteraction.hxx +++ b/dbaccess/source/ui/dlg/finteraction.hxx @@ -23,14 +23,10 @@ #include <cppuhelper/implbase1.hxx> #include <com/sun/star/task/XInteractionHandler.hpp> -//........................................................................ namespace dbaui { -//........................................................................ - //==================================================================== - //= OFilePickerInteractionHandler - //==================================================================== + // OFilePickerInteractionHandler typedef ::cppu::WeakImplHelper1 < ::com::sun::star::task::XInteractionHandler > OFilePickerInteractionHandler_Base; @@ -55,9 +51,7 @@ namespace dbaui virtual ~OFilePickerInteractionHandler(); }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // DBAUI_FILEPICKER_INTERACTION_HXX diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index f0562ec3220b..f9aac8f358e0 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dsnItem.hxx" #include "generalpage.hxx" #include <connectivity/dbexception.hxx> @@ -44,20 +43,15 @@ #include <unotools/confignode.hxx> #include <osl/diagnose.h> -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; - //========================================================================= - //= OGeneralPage - //========================================================================= - //------------------------------------------------------------------------- + // OGeneralPage OGeneralPage::OGeneralPage( Window* pParent, const OUString& _rUIXMLDescription, const SfxItemSet& _rItems ) :OGenericAdministrationPage( pParent, "PageGeneral", _rUIXMLDescription, _rItems ) ,m_pSpecialMessage ( NULL ) @@ -85,12 +79,10 @@ namespace dbaui m_pEmbeddedDBType->SetSelectHdl(LINK(this, OGeneralPage, OnEmbeddedDBTypeSelected)); } - //------------------------------------------------------------------------- OGeneralPage::~OGeneralPage() { } - //------------------------------------------------------------------------- namespace { struct DisplayedType @@ -111,7 +103,6 @@ namespace dbaui }; } - //------------------------------------------------------------------------- void OGeneralPage::initializeTypeList() { if ( m_bInitTypeList ) @@ -151,7 +142,6 @@ namespace dbaui } } - //------------------------------------------------------------------------- void OGeneralPage::initializeEmbeddedDBList() { if ( m_bInitEmbeddedDBList ) @@ -191,12 +181,10 @@ namespace dbaui } } - //------------------------------------------------------------------------- void OGeneralPage::setParentTitle(const OUString&) { } - //------------------------------------------------------------------------- void OGeneralPage::switchMessage(const OUString& _sURLPrefix) { SPECIAL_MESSAGE eMessage = smNone; @@ -205,7 +193,6 @@ namespace dbaui eMessage = smUnsupportedType; } - if ( eMessage != m_eLastMessage ) { sal_uInt16 nResId = 0; @@ -220,7 +207,6 @@ namespace dbaui } } - //------------------------------------------------------------------------- void OGeneralPage::onTypeSelected(const OUString& _sURLPrefix) { // the new URL text as indicated by the selection history @@ -232,7 +218,6 @@ namespace dbaui m_aTypeSelectHandler.Call(this); } - //------------------------------------------------------------------------- void OGeneralPage::implInitControls( const SfxItemSet& _rSet, sal_Bool _bSaveValue ) { initializeTypeList(); @@ -252,7 +237,6 @@ namespace dbaui OGenericAdministrationPage::implInitControls( _rSet, _bSaveValue ); } - //------------------------------------------------------------------------- OUString OGeneralPage::getEmbeddedDBName( const SfxItemSet& _rSet ) { // first check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -301,7 +285,6 @@ namespace dbaui return sDisplayName; } - //------------------------------------------------------------------------- OUString OGeneralPage::getDatasourceName( const SfxItemSet& _rSet ) { // first check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -378,8 +361,6 @@ namespace dbaui return _inout_rDisplayName.getLength() > 0; } - - // ----------------------------------------------------------------------- void OGeneralPage::insertDatasourceTypeEntryData(const OUString& _sType, String sDisplayName) { // insert a (temporary) entry @@ -389,7 +370,6 @@ namespace dbaui m_aURLPrefixes[nPos] = _sType; } - // ----------------------------------------------------------------------- void OGeneralPage::insertEmbeddedDBTypeEntryData(const OUString& _sType, String sDisplayName) { // insert a (temporary) entry @@ -399,19 +379,16 @@ namespace dbaui m_aEmbeddedURLPrefixes[nPos] = _sType; } - // ----------------------------------------------------------------------- void OGeneralPage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back( new ODisableWrapper<FixedText>( m_pSpecialMessage ) ); } - // ----------------------------------------------------------------------- void OGeneralPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back( new OSaveValueWrapper<ListBox>( m_pDatasourceType ) ); } - //------------------------------------------------------------------------- void OGeneralPage::implSetCurrentType( const OUString& _eType ) { if ( _eType == m_eCurrentSelection ) @@ -420,7 +397,6 @@ namespace dbaui m_eCurrentSelection = _eType; } - //------------------------------------------------------------------------- void OGeneralPage::Reset(const SfxItemSet& _rCoreAttrs) { // reset all locale data @@ -430,7 +406,6 @@ namespace dbaui OGenericAdministrationPage::Reset(_rCoreAttrs); } - //------------------------------------------------------------------------- IMPL_LINK( OGeneralPage, OnEmbeddedDBTypeSelected, ListBox*, _pBox ) { // get the type from the entry data @@ -451,7 +426,6 @@ namespace dbaui return 0L; } - //------------------------------------------------------------------------- IMPL_LINK( OGeneralPage, OnDatasourceTypeSelected, ListBox*, _pBox ) { // get the type from the entry data @@ -472,16 +446,12 @@ namespace dbaui return 0L; } - //========================================================================= - //= OGeneralPageDialog - //========================================================================= - //------------------------------------------------------------------------- + // OGeneralPageDialog OGeneralPageDialog::OGeneralPageDialog( Window* pParent, const SfxItemSet& _rItems ) :OGeneralPage( pParent, "dbaccess/ui/generalpagedialog.ui", _rItems ) { } - //------------------------------------------------------------------------- void OGeneralPageDialog::setParentTitle( const OUString& _sURLPrefix ) { const OUString sName = m_pCollection->getTypeDisplayName( _sURLPrefix ); @@ -492,7 +462,6 @@ namespace dbaui } } - //------------------------------------------------------------------------- void OGeneralPageDialog::implInitControls( const SfxItemSet& _rSet, sal_Bool _bSaveValue ) { OGeneralPage::implInitControls( _rSet, _bSaveValue ); @@ -504,7 +473,6 @@ namespace dbaui m_pDatasourceType->Enable( bValid ); } - //------------------------------------------------------------------------- sal_Bool OGeneralPageDialog::FillItemSet( SfxItemSet& _rCoreAttrs ) { sal_Bool bChangedSomething = sal_False; @@ -521,10 +489,7 @@ namespace dbaui return bChangedSomething; } - //========================================================================= - //= OGeneralPageWizard - //========================================================================= - //------------------------------------------------------------------------- + // OGeneralPageWizard OGeneralPageWizard::OGeneralPageWizard( Window* pParent, const SfxItemSet& _rItems ) :OGeneralPage( pParent, "dbaccess/ui/generalpagewizard.ui", _rItems ) ,m_pFT_HeaderText ( NULL ) @@ -580,7 +545,6 @@ namespace dbaui m_pPB_OpenDatabase->SetClickHdl( LINK( this, OGeneralPageWizard, OnOpenDocument ) ); } - //------------------------------------------------------------------------- OGeneralPageWizard::CreationMode OGeneralPageWizard::GetDatabaseCreationMode() const { if ( m_pRB_CreateDatabase->IsChecked() ) @@ -590,7 +554,6 @@ namespace dbaui return eOpenExisting; } - //------------------------------------------------------------------------- void OGeneralPageWizard::GetFocus() { OGeneralPage::GetFocus(); @@ -600,7 +563,6 @@ namespace dbaui m_pDatasourceType->GrabFocus(); } - //------------------------------------------------------------------------- void OGeneralPageWizard::implInitControls( const SfxItemSet& _rSet, sal_Bool _bSaveValue ) { OGeneralPage::implInitControls( _rSet, _bSaveValue ); @@ -635,7 +597,6 @@ namespace dbaui m_eOriginalCreationMode = GetDatabaseCreationMode(); } - //------------------------------------------------------------------------- OUString OGeneralPageWizard::getDatasourceName(const SfxItemSet& _rSet) { // Sets jdbc as the default selected databse on startup. @@ -645,7 +606,6 @@ namespace dbaui return OGeneralPage::getDatasourceName( _rSet ); } - //------------------------------------------------------------------------- bool OGeneralPageWizard::approveDatasourceType( ::dbaccess::DATASOURCE_TYPE eType, OUString& _inout_rDisplayName ) { switch ( eType ) @@ -666,7 +626,6 @@ namespace dbaui return OGeneralPage::approveDatasourceType( eType, _inout_rDisplayName ); } - //------------------------------------------------------------------------- sal_Bool OGeneralPageWizard::FillItemSet(SfxItemSet& _rCoreAttrs) { sal_Bool bChangedSomething = sal_False; @@ -706,7 +665,6 @@ namespace dbaui return bChangedSomething; } - //------------------------------------------------------------------------- OGeneralPageWizard::DocumentDescriptor OGeneralPageWizard::GetSelectedDocument() const { DocumentDescriptor aDocument; @@ -720,7 +678,6 @@ namespace dbaui return aDocument; } - //------------------------------------------------------------------------- IMPL_LINK( OGeneralPageWizard, OnCreateDatabaseModeSelected, RadioButton*, /*_pBox*/ ) { if ( m_aCreationModeHandler.IsSet() ) @@ -729,7 +686,6 @@ namespace dbaui return 1L; } - //------------------------------------------------------------------------- IMPL_LINK( OGeneralPageWizard, OnSetupModeSelected, RadioButton*, /*_pBox*/ ) { if ( m_aCreationModeHandler.IsSet() ) @@ -738,14 +694,12 @@ namespace dbaui return 1L; } - //------------------------------------------------------------------------- IMPL_LINK( OGeneralPageWizard, OnDocumentSelected, ListBox*, /*_pBox*/ ) { m_aDocumentSelectionHandler.Call( this ); return 0L; } - //------------------------------------------------------------------------- IMPL_LINK( OGeneralPageWizard, OnOpenDocument, PushButton*, /*_pBox*/ ) { ::sfx2::FileDialogHelper aFileDlg( @@ -777,8 +731,6 @@ namespace dbaui return 0L; } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx index 719aa471f298..2510cb3a9cd0 100644 --- a/dbaccess/source/ui/dlg/generalpage.hxx +++ b/dbaccess/source/ui/dlg/generalpage.hxx @@ -28,13 +28,9 @@ #include <svtools/dialogcontrolling.hxx> #include <memory> -//......................................................................... namespace dbaui { -//......................................................................... - //========================================================================= - //= OGeneralPage - //========================================================================= + // OGeneralPage class OGeneralPage : public OGenericAdministrationPage { protected: @@ -111,9 +107,7 @@ namespace dbaui DECL_LINK(OnEmbeddedDBTypeSelected, ListBox*); }; - //========================================================================= - //= OGeneralPageDialog - //========================================================================= + // OGeneralPageDialog class OGeneralPageDialog : public OGeneralPage { public: @@ -126,9 +120,7 @@ namespace dbaui virtual void setParentTitle( const OUString& _sURLPrefix ); }; - //========================================================================= - //= OGeneralPageWizard - //========================================================================= + // OGeneralPageWizard class OGeneralPageWizard : public OGeneralPage { public: @@ -197,9 +189,7 @@ namespace dbaui DECL_LINK( OnOpenDocument, PushButton* ); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_GENERALPAGE_HXX_ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index 0530b1f9cb1e..7595e63b3fe6 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -35,10 +35,8 @@ #include "browserids.hxx" #include <connectivity/dbtools.hxx> #include <osl/diagnose.h> -//...................................................................... namespace dbaui { -//...................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::container; @@ -47,23 +45,18 @@ namespace dbaui using namespace ::com::sun::star::lang; using namespace ::dbtools; - //================================================================== - //= helper - //================================================================== - //------------------------------------------------------------------ + // helper sal_Bool operator ==(const OIndexField& _rLHS, const OIndexField& _rRHS) { return (_rLHS.sFieldName == _rRHS.sFieldName) && (_rLHS.bSortAscending == _rRHS.bSortAscending); } - //------------------------------------------------------------------ sal_Bool operator !=(const OIndexField& _rLHS, const OIndexField& _rRHS) { return !(_rLHS == _rRHS); } - //------------------------------------------------------------------ sal_Bool operator ==(const IndexFields& _rLHS, const IndexFields& _rRHS) { if (_rLHS.size() != _rRHS.size()) @@ -81,16 +74,12 @@ namespace dbaui return sal_True; } - //------------------------------------------------------------------ sal_Bool operator !=(const IndexFields& _rLHS, const IndexFields& _rRHS) { return !(_rLHS == _rRHS); } - //================================================================== - //= DbaIndexList - //================================================================== - //------------------------------------------------------------------ + // DbaIndexList DbaIndexList::DbaIndexList(Window* _pParent, const ResId& _rId) :SvTreeListBox(_pParent, _rId) ,m_bSuspendSelectHdl(sal_False) @@ -98,7 +87,6 @@ namespace dbaui } extern sal_Bool isCharOk(sal_Unicode _cChar,sal_Bool _bFirstChar,sal_Bool _bUpperCase,const OUString& _sAllowedChars); - //------------------------------------------------------------------ sal_Bool DbaIndexList::EditedEntry( SvTreeListEntry* _pEntry, const OUString& _rNewText ) { // first check if this is valid SQL92 name @@ -135,21 +123,18 @@ namespace dbaui return sal_False; } - //------------------------------------------------------------------ void DbaIndexList::enableSelectHandler() { OSL_ENSURE(m_bSuspendSelectHdl, "DbaIndexList::enableSelectHandler: invalid call (this is not cumulative)!"); m_bSuspendSelectHdl = sal_False; } - //------------------------------------------------------------------ void DbaIndexList::disableSelectHandler() { OSL_ENSURE(!m_bSuspendSelectHdl, "DbaIndexList::enableSelectHandler: invalid call (this is not cumulative)!"); m_bSuspendSelectHdl = sal_True; } - //------------------------------------------------------------------ void DbaIndexList::SelectNoHandlerCall( SvTreeListEntry* _pEntry ) { disableSelectHandler(); @@ -157,7 +142,6 @@ namespace dbaui enableSelectHandler(); } - //------------------------------------------------------------------ sal_Bool DbaIndexList::Select( SvTreeListEntry* pEntry, sal_Bool _bSelect ) { sal_Bool bReturn = SvTreeListBox::Select(pEntry, _bSelect); @@ -168,11 +152,8 @@ namespace dbaui return bReturn; } - //================================================================== - //= DbaIndexDialog - //================================================================== + // DbaIndexDialog DBG_NAME(DbaIndexDialog) -//------------------------------------------------------------------ DbaIndexDialog::DbaIndexDialog( Window* _pParent, const Sequence< OUString >& _rFieldNames, const Reference< XNameAccess >& _rxIndexes, const Reference< XConnection >& _rxConnection, @@ -272,7 +253,6 @@ DBG_NAME(DbaIndexDialog) } } - //------------------------------------------------------------------ void DbaIndexDialog::updateToolbox() { m_aActions.EnableItem(ID_INDEX_NEW, !m_aIndexes.IsEditingActive()); @@ -280,7 +260,6 @@ DBG_NAME(DbaIndexDialog) SvTreeListEntry* pSelected = m_aIndexes.FirstSelected(); sal_Bool bSelectedAnything = NULL != pSelected; - if (pSelected) { // is the current entry modified? @@ -298,7 +277,6 @@ DBG_NAME(DbaIndexDialog) m_aActions.EnableItem(ID_INDEX_RENAME, bSelectedAnything); } - //------------------------------------------------------------------ void DbaIndexDialog::fillIndexList() { Image aPKeyIcon(ModuleRes( IMG_PKEYICON )); @@ -320,7 +298,6 @@ DBG_NAME(DbaIndexDialog) OnIndexSelected(&m_aIndexes); } - //------------------------------------------------------------------ DbaIndexDialog::~DbaIndexDialog( ) { setToolBox(NULL); @@ -330,7 +307,6 @@ DBG_NAME(DbaIndexDialog) DBG_DTOR(DbaIndexDialog,NULL); } - //------------------------------------------------------------------ sal_Bool DbaIndexDialog::implCommit(SvTreeListEntry* _pEntry) { OSL_ENSURE(_pEntry, "DbaIndexDialog::implCommit: invalid entry!"); @@ -367,7 +343,6 @@ DBG_NAME(DbaIndexDialog) return !aExceptionInfo.isValid(); } - //------------------------------------------------------------------ void DbaIndexDialog::OnNewIndex() { // commit the current entry, if necessary @@ -412,7 +387,6 @@ DBG_NAME(DbaIndexDialog) updateToolbox(); } - //------------------------------------------------------------------ void DbaIndexDialog::OnDropIndex(sal_Bool _bConfirm) { // the selected index @@ -438,7 +412,6 @@ DBG_NAME(DbaIndexDialog) } } - //------------------------------------------------------------------ sal_Bool DbaIndexDialog::implDropIndex(SvTreeListEntry* _pEntry, sal_Bool _bRemoveFromCollection) { // do the drop @@ -489,7 +462,6 @@ DBG_NAME(DbaIndexDialog) return !aExceptionInfo.isValid(); } - //------------------------------------------------------------------ void DbaIndexDialog::OnRenameIndex() { // the selected index @@ -505,7 +477,6 @@ DBG_NAME(DbaIndexDialog) updateToolbox(); } - //------------------------------------------------------------------ void DbaIndexDialog::OnSaveIndex() { // the selected index @@ -518,7 +489,6 @@ DBG_NAME(DbaIndexDialog) updateToolbox(); } - //------------------------------------------------------------------ void DbaIndexDialog::OnResetIndex() { // the selected index @@ -551,7 +521,6 @@ DBG_NAME(DbaIndexDialog) updateToolbox(); } - //------------------------------------------------------------------ IMPL_LINK( DbaIndexDialog, OnIndexAction, ToolBox*, /*NOTINTERESTEDIN*/ ) { sal_uInt16 nClicked = m_aActions.GetCurItemId(); @@ -576,7 +545,6 @@ DBG_NAME(DbaIndexDialog) return 0L; } - //------------------------------------------------------------------ IMPL_LINK( DbaIndexDialog, OnCloseDialog, void*, /*NOTINTERESTEDIN*/ ) { if (m_aIndexes.IsEditingActive()) @@ -624,7 +592,6 @@ DBG_NAME(DbaIndexDialog) return 0L; } - //------------------------------------------------------------------ IMPL_LINK( DbaIndexDialog, OnEditIndexAgain, SvTreeListEntry*, _pEntry ) { m_bEditAgain = sal_False; @@ -632,7 +599,6 @@ DBG_NAME(DbaIndexDialog) return 0L; } - //------------------------------------------------------------------ IMPL_LINK( DbaIndexDialog, OnEntryEdited, SvTreeListEntry*, _pEntry ) { Indexes::iterator aPosition = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(_pEntry->GetUserData()); @@ -675,7 +641,6 @@ DBG_NAME(DbaIndexDialog) return 1L; } - //------------------------------------------------------------------ sal_Bool DbaIndexDialog::implSaveModified(sal_Bool _bPlausibility) { if (m_pPreviousSelection) @@ -704,7 +669,6 @@ DBG_NAME(DbaIndexDialog) return sal_True; } - //------------------------------------------------------------------ sal_Bool DbaIndexDialog::implCheckPlausibility(const ConstIndexesIterator& _rPos) { // need at least one field @@ -739,7 +703,6 @@ DBG_NAME(DbaIndexDialog) return sal_True; } - //------------------------------------------------------------------ sal_Bool DbaIndexDialog::implCommitPreviouslySelected() { if (m_pPreviousSelection) @@ -757,7 +720,6 @@ DBG_NAME(DbaIndexDialog) return sal_True; } - //------------------------------------------------------------------ IMPL_LINK( DbaIndexDialog, OnModified, void*, /*NOTINTERESTEDIN*/ ) { OSL_ENSURE(m_pPreviousSelection, "DbaIndexDialog, OnModified: invalid call!"); @@ -769,7 +731,6 @@ DBG_NAME(DbaIndexDialog) return 1L; } - //------------------------------------------------------------------ void DbaIndexDialog::updateControls(const SvTreeListEntry* _pEntry) { if (_pEntry) @@ -799,7 +760,6 @@ DBG_NAME(DbaIndexDialog) } } - //------------------------------------------------------------------ IMPL_LINK( DbaIndexDialog, OnIndexSelected, DbaIndexList*, /*NOTINTERESTEDIN*/ ) { m_aIndexes.EndSelection(); @@ -836,7 +796,6 @@ DBG_NAME(DbaIndexDialog) updateToolbox(); return 0L; } - // ----------------------------------------------------------------------------- void DbaIndexDialog::StateChanged( StateChangedType nType ) { ModalDialog::StateChanged( nType ); @@ -854,7 +813,6 @@ DBG_NAME(DbaIndexDialog) checkImageList(); } } - // ----------------------------------------------------------------------------- void DbaIndexDialog::DataChanged( const DataChangedEvent& rDCEvt ) { ModalDialog::DataChanged( rDCEvt ); @@ -867,7 +825,6 @@ DBG_NAME(DbaIndexDialog) checkImageList(); } } - //------------------------------------------------------------------ ImageList DbaIndexDialog::getImageList(sal_Int16 _eBitmapSet) const { sal_Int16 nN = IMG_INDEX_DLG_SC; @@ -877,7 +834,6 @@ DBG_NAME(DbaIndexDialog) } return ImageList(ModuleRes(nN)); } - //------------------------------------------------------------------ void DbaIndexDialog::resizeControls(const Size& _rDiff) { // we use large images so we must change them @@ -909,8 +865,6 @@ DBG_NAME(DbaIndexDialog) } } -//...................................................................... } // namespace dbaui -//...................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx index b0c2eb8f797d..4b68d3e3b949 100644 --- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx +++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx @@ -17,16 +17,13 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "indexfieldscontrol.hxx" #include "dbu_dlg.hrc" #include <osl/diagnose.h> #include "dbaccess_helpid.hrc" -//...................................................................... namespace dbaui { -//...................................................................... #define BROWSER_STANDARD_FLAGS BROWSER_COLUMNSELECTION | BROWSER_HLINESFULL | BROWSER_VLINESFULL | \ BROWSER_HIDECURSOR | BROWSER_HIDESELECT | BROWSER_AUTO_HSCROLL | BROWSER_AUTO_VSCROLL @@ -37,9 +34,7 @@ namespace dbaui using namespace ::com::sun::star::uno; using namespace ::svt; - //================================================================== - //= DbaMouseDownListBoxController - //================================================================== + // DbaMouseDownListBoxController class DbaMouseDownListBoxController : public ListBoxCellController { protected: @@ -63,21 +58,18 @@ namespace dbaui DECL_LINK( OnMultiplexModify, void* ); }; - //------------------------------------------------------------------ void DbaMouseDownListBoxController::SetAdditionalModifyHdl(const Link& _rHdl) { m_aAdditionalModifyHdl = _rHdl; implCheckLinks(); } - //------------------------------------------------------------------ void DbaMouseDownListBoxController::SetModifyHdl(const Link& _rHdl) { m_aOriginalModifyHdl = _rHdl; implCheckLinks(); } - //------------------------------------------------------------------ IMPL_LINK( DbaMouseDownListBoxController, OnMultiplexModify, void*, _pArg ) { if (m_aAdditionalModifyHdl.IsSet()) @@ -87,7 +79,6 @@ namespace dbaui return 0L; } - //------------------------------------------------------------------ void DbaMouseDownListBoxController::implCheckLinks() { if (m_aAdditionalModifyHdl.IsSet() || m_aOriginalModifyHdl.IsSet()) @@ -96,11 +87,8 @@ namespace dbaui ListBoxCellController::SetModifyHdl(Link()); } - //================================================================== - //= IndexFieldsControl - //================================================================== + // IndexFieldsControl DBG_NAME(IndexFieldsControl) -//------------------------------------------------------------------ IndexFieldsControl::IndexFieldsControl( Window* _pParent, const ResId& _rId ,sal_Int32 _nMaxColumnsInIndex,sal_Bool _bAddIndexAppendix) :EditBrowseBox(_pParent, _rId, EBBF_SMART_TAB_TRAVEL | EBBF_ACTIVATE_ON_BUTTONDOWN, BROWSER_STANDARD_FLAGS) ,m_aSeekRow(m_aFields.end()) @@ -115,7 +103,6 @@ DBG_NAME(IndexFieldsControl) GetDataWindow().SetUniqueId( UID_DLGINDEX_INDEXDETAILS_MAIN ); } - //------------------------------------------------------------------ IndexFieldsControl::~IndexFieldsControl() { delete m_pSortingCell; @@ -124,7 +111,6 @@ DBG_NAME(IndexFieldsControl) DBG_DTOR(IndexFieldsControl,NULL); } - //------------------------------------------------------------------ sal_Bool IndexFieldsControl::SeekRow(long nRow) { if (!EditBrowseBox::SeekRow(nRow)) @@ -143,7 +129,6 @@ DBG_NAME(IndexFieldsControl) return sal_True; } - //------------------------------------------------------------------ void IndexFieldsControl::PaintCell( OutputDevice& _rDev, const Rectangle& _rRect, sal_uInt16 _nColumnId ) const { Point aPos(_rRect.TopLeft()); @@ -174,7 +159,6 @@ DBG_NAME(IndexFieldsControl) _rDev.SetClipRegion(); } - //------------------------------------------------------------------ void IndexFieldsControl::initializeFrom(const IndexFields& _rFields) { // copy the field descriptions @@ -193,7 +177,6 @@ DBG_NAME(IndexFieldsControl) GoToRowColumnId(0, COLUMN_ID_FIELDNAME); } - //------------------------------------------------------------------ void IndexFieldsControl::commitTo(IndexFields& _rFields) { // do not just copy the array, we may have empty field names (which should not be copied) @@ -211,7 +194,6 @@ DBG_NAME(IndexFieldsControl) _rFields.resize(aDest - _rFields.begin()); } - //------------------------------------------------------------------ sal_uInt32 IndexFieldsControl::GetTotalCellWidth(long _nRow, sal_uInt16 _nColId) { if (COLUMN_ID_ORDER == _nColId) @@ -224,7 +206,6 @@ DBG_NAME(IndexFieldsControl) return EditBrowseBox::GetTotalCellWidth(_nRow, _nColId); } - //------------------------------------------------------------------ void IndexFieldsControl::Init(const Sequence< OUString >& _rAvailableFields) { RemoveColumns(); @@ -277,7 +258,6 @@ DBG_NAME(IndexFieldsControl) m_pFieldNameCell->InsertEntry(*pFields); } - //------------------------------------------------------------------ CellController* IndexFieldsControl::GetController(long _nRow, sal_uInt16 _nColumnId) { if (!IsEnabled()) @@ -308,7 +288,6 @@ DBG_NAME(IndexFieldsControl) return pReturn; } - //------------------------------------------------------------------ sal_Bool IndexFieldsControl::implGetFieldDesc(long _nRow, ConstIndexFieldsIterator& _rPos) { _rPos = m_aFields.end(); @@ -318,13 +297,11 @@ DBG_NAME(IndexFieldsControl) return sal_True; } - //------------------------------------------------------------------ sal_Bool IndexFieldsControl::IsModified() const { return EditBrowseBox::IsModified(); } - //------------------------------------------------------------------ sal_Bool IndexFieldsControl::SaveModified() { if (!IsModified()) @@ -394,7 +371,6 @@ DBG_NAME(IndexFieldsControl) return sal_True; } - //------------------------------------------------------------------ void IndexFieldsControl::InitController(CellControllerRef& /*_rController*/, long _nRow, sal_uInt16 _nColumnId) { ConstIndexFieldsIterator aFieldDescription; @@ -417,7 +393,6 @@ DBG_NAME(IndexFieldsControl) } } - //------------------------------------------------------------------ IMPL_LINK( IndexFieldsControl, OnListEntrySelected, ListBox*, _pBox ) { if (!_pBox->IsTravelSelect() && m_aModifyHdl.IsSet()) @@ -453,7 +428,6 @@ DBG_NAME(IndexFieldsControl) } return 0L; } - //------------------------------------------------------------------ OUString IndexFieldsControl::GetCellText(long _nRow,sal_uInt16 nColId) const { ConstIndexFieldsIterator aRow = m_aFields.end(); @@ -464,7 +438,6 @@ DBG_NAME(IndexFieldsControl) } return GetRowCellText(aRow,nColId); } - //------------------------------------------------------------------ String IndexFieldsControl::GetRowCellText(const ConstIndexFieldsIterator& _rRow,sal_uInt16 nColId) const { if (_rRow < m_aFields.end()) @@ -484,15 +457,11 @@ DBG_NAME(IndexFieldsControl) } return String(); } - //------------------------------------------------------------------ sal_Bool IndexFieldsControl::IsTabAllowed(sal_Bool /*bForward*/) const { return sal_False; } - //------------------------------------------------------------------ -//...................................................................... } // namespace dbaui -//...................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/odbcconfig.cxx b/dbaccess/source/ui/dlg/odbcconfig.cxx index 24d47a6721cb..e462ff45bfad 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.cxx +++ b/dbaccess/source/ui/dlg/odbcconfig.cxx @@ -18,7 +18,6 @@ */ #include <config_folders.h> - #include "odbcconfig.hxx" #ifdef SYSTEM_ODBC_HEADERS @@ -86,11 +85,8 @@ #endif // HAVE_ODBC_SUPPORT -//......................................................................... namespace dbaui { -//......................................................................... - #ifdef HAVE_ODBC_SUPPORT typedef SQLRETURN (SQL_API* TSQLManageDataSource) (SQLHWND hwndParent); @@ -106,11 +102,8 @@ typedef SQLRETURN (SQL_API* TSQLDataSources) (SQLHENV EnvironmentHandle, SQLUSMA #define NSQLDataSources(a,b,c,d,e,f,g,h) (*(TSQLDataSources)(m_pDataSources))(a,b,c,d,e,f,g,h) #endif -//========================================================================= -//= OOdbcLibWrapper -//========================================================================= +// OOdbcLibWrapper DBG_NAME(OOdbcLibWrapper) -//------------------------------------------------------------------------- #ifdef HAVE_ODBC_SUPPORT OOdbcLibWrapper::OOdbcLibWrapper() :m_pOdbcLib(NULL) @@ -118,9 +111,9 @@ OOdbcLibWrapper::OOdbcLibWrapper() DBG_CTOR(OOdbcLibWrapper,NULL); } + #endif -//------------------------------------------------------------------------- sal_Bool OOdbcLibWrapper::load(const sal_Char* _pLibPath) { m_sLibPath = OUString::createFromAscii(_pLibPath); @@ -133,7 +126,6 @@ sal_Bool OOdbcLibWrapper::load(const sal_Char* _pLibPath) #endif } -//------------------------------------------------------------------------- void OOdbcLibWrapper::unload() { #ifdef HAVE_ODBC_SUPPORT @@ -145,13 +137,11 @@ void OOdbcLibWrapper::unload() #endif } -//------------------------------------------------------------------------- oslGenericFunction OOdbcLibWrapper::loadSymbol(const sal_Char* _pFunctionName) { return osl_getFunctionSymbol(m_pOdbcLib, OUString::createFromAscii(_pFunctionName).pData); } -//------------------------------------------------------------------------- OOdbcLibWrapper::~OOdbcLibWrapper() { unload(); @@ -159,9 +149,7 @@ OOdbcLibWrapper::~OOdbcLibWrapper() DBG_DTOR(OOdbcLibWrapper,NULL); } -//========================================================================= -//= OOdbcEnumeration -//========================================================================= +// OOdbcEnumeration struct OdbcTypesImpl { #ifdef HAVE_ODBC_SUPPORT @@ -171,8 +159,8 @@ struct OdbcTypesImpl void* pDummy; #endif }; + DBG_NAME(OOdbcEnumeration) -//------------------------------------------------------------------------- OOdbcEnumeration::OOdbcEnumeration() #ifdef HAVE_ODBC_SUPPORT :m_pAllocHandle(NULL) @@ -208,7 +196,6 @@ OOdbcEnumeration::OOdbcEnumeration() } } -//------------------------------------------------------------------------- OOdbcEnumeration::~OOdbcEnumeration() { freeEnv(); @@ -217,7 +204,6 @@ OOdbcEnumeration::~OOdbcEnumeration() DBG_DTOR(OOdbcEnumeration,NULL); } -//------------------------------------------------------------------------- sal_Bool OOdbcEnumeration::allocEnv() { OSL_ENSURE(isLoaded(), "OOdbcEnumeration::allocEnv: not loaded!"); @@ -240,7 +226,6 @@ sal_Bool OOdbcEnumeration::allocEnv() #endif } -//------------------------------------------------------------------------- void OOdbcEnumeration::freeEnv() { #ifdef HAVE_ODBC_SUPPORT @@ -250,7 +235,6 @@ void OOdbcEnumeration::freeEnv() #endif } -//------------------------------------------------------------------------- void OOdbcEnumeration::getDatasourceNames(StringBag& _rNames) { OSL_ENSURE(isLoaded(), "OOdbcEnumeration::getDatasourceNames: not loaded!"); @@ -293,9 +277,7 @@ void OOdbcEnumeration::getDatasourceNames(StringBag& _rNames) #ifdef HAVE_ODBC_ADMINISTRATION -//========================================================================= -//= ProcessTerminationWait -//========================================================================= +// ProcessTerminationWait class ProcessTerminationWait : public ::osl::Thread { oslProcess m_hProcessHandle; @@ -317,17 +299,13 @@ protected: } }; -//========================================================================= -//= OOdbcManagement -//========================================================================= -//------------------------------------------------------------------------- +// OOdbcManagement OOdbcManagement::OOdbcManagement( const Link& _rAsyncFinishCallback ) :m_pProcessWait( NULL ) ,m_aAsyncFinishCallback( _rAsyncFinishCallback ) { } -//------------------------------------------------------------------------- OOdbcManagement::~OOdbcManagement() { // wait for our thread to be finished @@ -335,7 +313,6 @@ OOdbcManagement::~OOdbcManagement() m_pProcessWait->join(); } -//------------------------------------------------------------------------- bool OOdbcManagement::manageDataSources_async() { OSL_PRECOND( !isRunning(), "OOdbcManagement::manageDataSources_async: still running from the previous call!" ); @@ -356,7 +333,6 @@ bool OOdbcManagement::manageDataSources_async() return true; } -//------------------------------------------------------------------------- bool OOdbcManagement::isRunning() const { return ( m_pProcessWait.get() && m_pProcessWait->isRunning() ); @@ -364,8 +340,6 @@ bool OOdbcManagement::isRunning() const #endif // HAVE_ODBC_ADMINISTRATION -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/odbcconfig.hxx b/dbaccess/source/ui/dlg/odbcconfig.hxx index 1feeab014c40..8db6771e6bfa 100644 --- a/dbaccess/source/ui/dlg/odbcconfig.hxx +++ b/dbaccess/source/ui/dlg/odbcconfig.hxx @@ -35,14 +35,10 @@ #include <memory> -//......................................................................... namespace dbaui { -//......................................................................... -//========================================================================= -//= OOdbcLibWrapper -//========================================================================= +// OOdbcLibWrapper /** base for helper classes wrapping functionality from an ODBC library */ class OOdbcLibWrapper @@ -74,9 +70,7 @@ protected: void unload(); }; -//========================================================================= -//= OOdbcEnumeration -//========================================================================= +// OOdbcEnumeration struct OdbcTypesImpl; class OOdbcEnumeration : public OOdbcLibWrapper { @@ -105,9 +99,7 @@ protected: void freeEnv(); }; -//========================================================================= -//= OOdbcManagement -//========================================================================= +// OOdbcManagement #ifdef HAVE_ODBC_ADMINISTRATION class ProcessTerminationWait; class OOdbcManagement @@ -124,9 +116,7 @@ public: }; #endif -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_ODBC_CONFIG_HXX_ diff --git a/dbaccess/source/ui/dlg/optionalboolitem.cxx b/dbaccess/source/ui/dlg/optionalboolitem.cxx index dde4342b56c2..301896d5e57a 100644 --- a/dbaccess/source/ui/dlg/optionalboolitem.cxx +++ b/dbaccess/source/ui/dlg/optionalboolitem.cxx @@ -17,33 +17,25 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "optionalboolitem.hxx" -//........................................................................ namespace dbaui { -//........................................................................ - //==================================================================== - //= OptionalBoolItem - //==================================================================== + // OptionalBoolItem TYPEINIT1( OptionalBoolItem, SfxPoolItem ); - //-------------------------------------------------------------------- OptionalBoolItem::OptionalBoolItem( sal_Int16 _nWhich ) :SfxPoolItem( _nWhich ) ,m_aValue() { } - //-------------------------------------------------------------------- OptionalBoolItem::OptionalBoolItem( const OptionalBoolItem& _rSource ) :SfxPoolItem( _rSource ) ,m_aValue( _rSource.m_aValue ) { } - //-------------------------------------------------------------------- int OptionalBoolItem::operator==( const SfxPoolItem& _rItem ) const { const OptionalBoolItem* pCompare = PTR_CAST( OptionalBoolItem, &_rItem ); @@ -56,14 +48,11 @@ namespace dbaui return 0; } - //-------------------------------------------------------------------- SfxPoolItem* OptionalBoolItem::Clone( SfxItemPool* /*_pPool*/ ) const { return new OptionalBoolItem( *this ); } -//........................................................................ } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/optionalboolitem.hxx b/dbaccess/source/ui/dlg/optionalboolitem.hxx index 274432126dbe..ebe466342e46 100644 --- a/dbaccess/source/ui/dlg/optionalboolitem.hxx +++ b/dbaccess/source/ui/dlg/optionalboolitem.hxx @@ -24,14 +24,10 @@ #include <boost/optional.hpp> -//........................................................................ namespace dbaui { -//........................................................................ - //==================================================================== - //= OptionalBoolItem - //==================================================================== + // OptionalBoolItem class OptionalBoolItem : public SfxPoolItem { ::boost::optional< bool > m_aValue; @@ -53,9 +49,7 @@ namespace dbaui GetFullValue() const { return m_aValue; } }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // DBACCESS_OPTIONALBOOLITEM_HXX diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx index 2191c8b02d70..fe1ae459d6aa 100644 --- a/dbaccess/source/ui/dlg/paramdialog.cxx +++ b/dbaccess/source/ui/dlg/paramdialog.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "paramdialog.hxx" #include "paramdialog.hrc" #include "dbu_dlg.hrc" @@ -38,10 +37,8 @@ #define EF_VISITED 0x0001 #define EF_DIRTY 0x0002 -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -51,14 +48,8 @@ namespace dbaui using namespace ::com::sun::star::util; using namespace ::connectivity; - //================================================================== - //= OParameterDialog - //================================================================== - - //------------------------------------------------------------------------------ - + // OParameterDialog - //------------------------------------------------------------------------------ DBG_NAME(OParameterDialog) OParameterDialog::OParameterDialog( @@ -124,7 +115,6 @@ DBG_NAME(OParameterDialog) DBG_UNHANDLED_EXCEPTION(); } - Construct(); m_aResetVisitFlag.SetTimeoutHdl(LINK(this, OParameterDialog, OnVisitedTimeout)); @@ -132,7 +122,6 @@ DBG_NAME(OParameterDialog) FreeResource(); } - //------------------------------------------------------------------------------ OParameterDialog::~OParameterDialog() { if (m_aResetVisitFlag.IsActive()) @@ -141,7 +130,6 @@ DBG_NAME(OParameterDialog) DBG_DTOR(OParameterDialog,NULL); } - //------------------------------------------------------------------------------ void OParameterDialog::Construct() { m_aAllParams.SetSelectHdl(LINK(this, OParameterDialog, OnEntrySelected)); @@ -171,7 +159,6 @@ DBG_NAME(OParameterDialog) m_aParam.GrabFocus(); } - //------------------------------------------------------------------------------ IMPL_LINK(OParameterDialog, OnValueLoseFocus, Control*, /*pSource*/) { if (m_nCurrentlySelected != LISTBOX_ENTRY_NOTFOUND) @@ -229,7 +216,6 @@ DBG_NAME(OParameterDialog) return 0L; } - //------------------------------------------------------------------------------ IMPL_LINK(OParameterDialog, OnButtonClicked, PushButton*, pButton) { if (&m_aCancelBtn == pButton) @@ -304,7 +290,6 @@ DBG_NAME(OParameterDialog) return 0L; } - //------------------------------------------------------------------------------ IMPL_LINK(OParameterDialog, OnEntrySelected, ListBox*, /*pList*/) { if (m_aResetVisitFlag.IsActive()) @@ -342,7 +327,6 @@ DBG_NAME(OParameterDialog) return 0L; } - //------------------------------------------------------------------------------ IMPL_LINK(OParameterDialog, OnVisitedTimeout, Timer*, /*pTimer*/) { OSL_ENSURE(m_nCurrentlySelected != LISTBOX_ENTRY_NOTFOUND, "OParameterDialog::OnVisitedTimeout : invalid call !"); @@ -391,7 +375,6 @@ DBG_NAME(OParameterDialog) return 0L; } - //------------------------------------------------------------------------------ IMPL_LINK(OParameterDialog, OnValueModified, Control*, /*pBox*/) { // mark the currently selected entry as dirty @@ -403,9 +386,6 @@ DBG_NAME(OParameterDialog) return 0L; } - -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index 381291e661f8..48dd475f6b18 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -744,6 +744,7 @@ IMPL_LINK_INLINE_START( DlgFilterCrit, ListSelectCompHdl, ListBox *, /*pListBox* EnableLines(); return 0; } + IMPL_LINK_INLINE_END( DlgFilterCrit, ListSelectCompHdl, ListBox *, pListBox ) void DlgFilterCrit::BuildWherePart() diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx index c241c77076b6..d7d4ba33edf4 100644 --- a/dbaccess/source/ui/dlg/queryorder.cxx +++ b/dbaccess/source/ui/dlg/queryorder.cxx @@ -148,6 +148,7 @@ IMPL_LINK_INLINE_START( DlgOrderCrit, FieldListSelectHdl, ListBox *, /*pListBox* EnableLines(); return 0; } + IMPL_LINK_INLINE_END( DlgOrderCrit, FieldListSelectHdl, ListBox *, pListBox ) void DlgOrderCrit::impl_initializeOrderList_nothrow() diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index c35fba5f4568..214a1d3ed3a3 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "sqlmessage.hxx" #include "dbu_dlg.hrc" #include "sqlmessage.hrc" @@ -52,14 +51,11 @@ using namespace com::sun::star::uno; using namespace com::sun::star::sdb; using namespace com::sun::star::sdbc; -//......................................................................... namespace dbaui { -//......................................................................... namespace { - //------------------------------------------------------------------------------ class IImageProvider { public: @@ -68,7 +64,6 @@ namespace virtual ~IImageProvider() { } }; - //------------------------------------------------------------------------------ class ILabelProvider { public: @@ -77,7 +72,6 @@ namespace virtual ~ILabelProvider() { }; }; - //------------------------------------------------------------------------------ class ImageProvider : public IImageProvider { private: @@ -99,7 +93,6 @@ namespace } }; - //------------------------------------------------------------------------------ class LabelProvider : public ILabelProvider { private: @@ -116,7 +109,6 @@ namespace } }; - //------------------------------------------------------------------------------ class ProviderFactory { private: @@ -185,7 +177,6 @@ namespace }; - //------------------------------------------------------------------------------ /// a stripped version of the SQLException, packed for displaying struct ExceptionDisplayInfo { @@ -214,7 +205,6 @@ namespace typedef ::std::vector< ExceptionDisplayInfo > ExceptionDisplayChain; - //------------------------------------------------------------------------------ /// strips the [OOoBase] vendor identifier from the given error message, if applicable OUString lcl_stripOOoBaseVendor( const OUString& _rErrorMessage ) { @@ -236,7 +226,6 @@ namespace return sErrorMessage; } - //------------------------------------------------------------------------------ void lcl_buildExceptionChain( const SQLExceptionInfo& _rErrorInfo, const ProviderFactory& _rFactory, ExceptionDisplayChain& _out_rChain ) { { @@ -293,7 +282,6 @@ namespace } } - //------------------------------------------------------------------------------ void lcl_insertExceptionEntry( SvTreeListBox& _rList, size_t _nElementPos, const ExceptionDisplayInfo& _rEntry ) { Image aEntryImage( _rEntry.pImageProvider->getImage() ); @@ -303,7 +291,6 @@ namespace } } -//============================================================================== class OExceptionChainDialog : public ModalDialog { FixedLine m_aFrame; @@ -327,7 +314,6 @@ protected: }; DBG_NAME(OExceptionChainDialog) -//------------------------------------------------------------------------------ OExceptionChainDialog::OExceptionChainDialog( Window* pParent, const ExceptionDisplayChain& _rExceptions ) :ModalDialog(pParent, ModuleRes(DLG_SQLEXCEPTIONCHAIN)) ,m_aFrame (this, ModuleRes(FL_DETAILS)) @@ -382,13 +368,11 @@ OExceptionChainDialog::OExceptionChainDialog( Window* pParent, const ExceptionDi } } -//------------------------------------------------------------------------------ OExceptionChainDialog::~OExceptionChainDialog() { DBG_DTOR(OExceptionChainDialog,NULL); } -//------------------------------------------------------------------------------ IMPL_LINK_NOARG(OExceptionChainDialog, OnExceptionSelected) { SvTreeListEntry* pSelected = m_aExceptionList.FirstSelected(); @@ -428,9 +412,7 @@ IMPL_LINK_NOARG(OExceptionChainDialog, OnExceptionSelected) return 0L; } -//============================================================================== -//= SQLMessageBox_Impl -//============================================================================== +// SQLMessageBox_Impl struct SQLMessageBox_Impl { ExceptionDisplayChain aDisplayInfo; @@ -443,7 +425,6 @@ struct SQLMessageBox_Impl } }; -//------------------------------------------------------------------------------ namespace { void lcl_positionInAppFont( const Window& _rParent, Window& _rChild, long _nX, long _nY, long _Width, long _Height ) @@ -472,12 +453,10 @@ namespace } } -//------------------------------------------------------------------------------ void OSQLMessageBox::impl_positionControls() { OSL_PRECOND( !m_pImpl->aDisplayInfo.empty(), "OSQLMessageBox::impl_positionControls: nothing to display at all?" ); - if ( m_pImpl->aDisplayInfo.empty() ) return; const ExceptionDisplayInfo* pSecondInfo = NULL; @@ -573,7 +552,6 @@ void OSQLMessageBox::impl_positionControls() SetPageSizePixel( aDialogSize ); } -//------------------------------------------------------------------------------ void OSQLMessageBox::impl_initImage( MessageType _eImage ) { switch (_eImage) @@ -596,7 +574,6 @@ void OSQLMessageBox::impl_initImage( MessageType _eImage ) } } -//------------------------------------------------------------------------------ void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle ) { if ( _nStyle & WB_YES_NO_CANCEL ) @@ -641,7 +618,6 @@ void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle ) } } -//------------------------------------------------------------------------------ void OSQLMessageBox::impl_addDetailsButton() { size_t nFirstPageVisible = m_aMessage.IsVisible() ? 2 : 1; @@ -674,7 +650,6 @@ void OSQLMessageBox::impl_addDetailsButton() } } -//------------------------------------------------------------------------------ void OSQLMessageBox::Construct( WinBits _nStyle, MessageType _eImage ) { SetText( @@ -703,7 +678,6 @@ void OSQLMessageBox::Construct( WinBits _nStyle, MessageType _eImage ) impl_addDetailsButton(); } -//------------------------------------------------------------------------------ OSQLMessageBox::OSQLMessageBox(Window* _pParent, const SQLExceptionInfo& _rException, WinBits _nStyle, const OUString& _rHelpURL ) :ButtonDialog( _pParent, WB_HORZ | WB_STDDIALOG ) ,m_aInfoImage( this ) @@ -715,7 +689,6 @@ OSQLMessageBox::OSQLMessageBox(Window* _pParent, const SQLExceptionInfo& _rExcep Construct( _nStyle, AUTO ); } -//------------------------------------------------------------------------------ OSQLMessageBox::OSQLMessageBox( Window* _pParent, const OUString& _rTitle, const OUString& _rMessage, WinBits _nStyle, MessageType _eType, const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo ) :ButtonDialog( _pParent, WB_HORZ | WB_STDDIALOG ) ,m_aInfoImage( this ) @@ -733,12 +706,10 @@ OSQLMessageBox::OSQLMessageBox( Window* _pParent, const OUString& _rTitle, const Construct( _nStyle, _eType ); } -//-------------------------------------------------------------------------- OSQLMessageBox::~OSQLMessageBox() { } -//-------------------------------------------------------------------------- IMPL_LINK( OSQLMessageBox, ButtonClickHdl, Button *, /*pButton*/ ) { OExceptionChainDialog aDlg( this, m_pImpl->aDisplayInfo ); @@ -746,26 +717,20 @@ IMPL_LINK( OSQLMessageBox, ButtonClickHdl, Button *, /*pButton*/ ) return 0; } -//================================================================== // OSQLWarningBox -//================================================================== OSQLWarningBox::OSQLWarningBox( Window* _pParent, const OUString& _rMessage, WinBits _nStyle, const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo ) :OSQLMessageBox( _pParent, String( ModuleRes( STR_EXCEPTION_WARNING ) ), _rMessage, _nStyle, OSQLMessageBox::Warning, _pAdditionalErrorInfo ) { } -//================================================================== // OSQLErrorBox -//================================================================== OSQLErrorBox::OSQLErrorBox( Window* _pParent, const OUString& _rMessage, WinBits _nStyle, const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo ) :OSQLMessageBox( _pParent, String( ModuleRes( STR_EXCEPTION_ERROR ) ), _rMessage, _nStyle, OSQLMessageBox::Error, _pAdditionalErrorInfo ) { } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index d8996a85045f..84ac954342ce 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "tablespage.hxx" #include "dbu_dlg.hrc" #include "dbadmin.hrc" @@ -54,10 +53,8 @@ #include <cppuhelper/exc_hlp.hxx> #include "AutoControls.hrc" -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdbc; @@ -72,11 +69,8 @@ namespace dbaui using namespace ::dbtools; using namespace ::comphelper; - //======================================================================== - //= OTableSubscriptionPage - //======================================================================== + // OTableSubscriptionPage DBG_NAME(OTableSubscriptionPage) -//------------------------------------------------------------------------ OTableSubscriptionPage::OTableSubscriptionPage( Window* pParent, const SfxItemSet& _rCoreAttrs,OTableSubscriptionDialog* _pTablesDlg ) :OGenericAdministrationPage( pParent, ModuleRes(PAGE_TABLESUBSCRIPTION), _rCoreAttrs ) ,m_aTables (this, ModuleRes(FL_SEPARATOR1)) @@ -103,7 +97,6 @@ DBG_NAME(OTableSubscriptionPage) m_aTablesList.SetCheckHandler(LINK(this, OTableSubscriptionPage, OnTreeEntryChecked)); } - //------------------------------------------------------------------------ OTableSubscriptionPage::~OTableSubscriptionPage() { // just to make sure that our connection will be removed @@ -116,7 +109,6 @@ DBG_NAME(OTableSubscriptionPage) DBG_DTOR(OTableSubscriptionPage,NULL); } - // ----------------------------------------------------------------------------- void OTableSubscriptionPage::StateChanged( StateChangedType nType ) { OGenericAdministrationPage::StateChanged( nType ); @@ -127,7 +119,6 @@ DBG_NAME(OTableSubscriptionPage) m_aTablesList.notifyHiContrastChanged(); } } - // ----------------------------------------------------------------------------- void OTableSubscriptionPage::DataChanged( const DataChangedEvent& rDCEvt ) { OGenericAdministrationPage::DataChanged( rDCEvt ); @@ -140,7 +131,6 @@ DBG_NAME(OTableSubscriptionPage) m_aTablesList.notifyHiContrastChanged(); } } - //------------------------------------------------------------------ void OTableSubscriptionPage::resizeControls(const Size& _rDiff) { if ( _rDiff.Height() ) @@ -153,7 +143,6 @@ DBG_NAME(OTableSubscriptionPage) ); } } - //------------------------------------------------------------------------ void OTableSubscriptionPage::implCheckTables(const Sequence< OUString >& _rTables) { // the meta data for the current connection, used for splitting up table names @@ -220,7 +209,6 @@ DBG_NAME(OTableSubscriptionPage) m_aTablesList.CheckButtons(); } - //------------------------------------------------------------------------ void OTableSubscriptionPage::implCompleteTablesCheck( const ::com::sun::star::uno::Sequence< OUString >& _rTableFilter ) { if (!_rTableFilter.getLength()) @@ -238,7 +226,6 @@ DBG_NAME(OTableSubscriptionPage) } } - //------------------------------------------------------------------------- void OTableSubscriptionPage::implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) @@ -396,7 +383,6 @@ DBG_NAME(OTableSubscriptionPage) OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue); } - //------------------------------------------------------------------------ void OTableSubscriptionPage::CheckAll( sal_Bool _bCheck ) { SvButtonState eState = _bCheck ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED; @@ -411,7 +397,6 @@ DBG_NAME(OTableSubscriptionPage) m_aTablesList.checkWildcard(m_aTablesList.getAllObjectsEntry()); } - //------------------------------------------------------------------------ int OTableSubscriptionPage::DeactivatePage(SfxItemSet* _pSet) { int nResult = OGenericAdministrationPage::DeactivatePage(_pSet); @@ -425,12 +410,10 @@ DBG_NAME(OTableSubscriptionPage) return nResult; } - //------------------------------------------------------------------------ IMPL_LINK( OTableSubscriptionPage, OnTreeEntryChecked, Control*, _pControl ) { return OnControlModified(_pControl); } - //------------------------------------------------------------------------ IMPL_LINK( OTableSubscriptionPage, OnTreeEntryCompare, const SvSortData*, _pSortData ) { const SvTreeListEntry* pLHS = static_cast<const SvTreeListEntry*>(_pSortData->pLeft); @@ -463,7 +446,6 @@ DBG_NAME(OTableSubscriptionPage) return nCompareResult; } - //------------------------------------------------------------------------ Sequence< OUString > OTableSubscriptionPage::collectDetailedSelection() const { Sequence< OUString > aTableFilter; @@ -557,7 +539,6 @@ DBG_NAME(OTableSubscriptionPage) return aTableFilter; } - //------------------------------------------------------------------------ SvTreeListEntry* OTableSubscriptionPage::implNextSibling(SvTreeListEntry* _pEntry) const { SvTreeListEntry* pReturn = NULL; @@ -570,7 +551,6 @@ DBG_NAME(OTableSubscriptionPage) return pReturn; } - //------------------------------------------------------------------------ sal_Bool OTableSubscriptionPage::FillItemSet( SfxItemSet& _rCoreAttrs ) { sal_Bool bValid, bReadonly; @@ -580,7 +560,6 @@ DBG_NAME(OTableSubscriptionPage) // don't store anything if the data we're working with is invalid or readonly return sal_True; - ///////////////////////////////////////////////////////////////////////// // create the output string which contains all the table names if ( m_xCurrentConnection.is() ) { // collect the table filter data only if we have a connection - else no tables are displayed at all @@ -600,20 +579,15 @@ DBG_NAME(OTableSubscriptionPage) return sal_True; } - // ----------------------------------------------------------------------- void OTableSubscriptionPage::fillControls(::std::vector< ISaveValueWrapper* >& /*_rControlList*/) { } - // ----------------------------------------------------------------------- void OTableSubscriptionPage::fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList) { _rControlList.push_back(new ODisableWrapper<OTableTreeListBox>(&m_aTablesList)); _rControlList.push_back(new ODisableWrapper<FixedLine>(&m_aTables)); _rControlList.push_back(new ODisableWrapper<FixedText>(&m_aExplanation)); } - // ----------------------------------------------------------------------- -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/dlg/tablespage.hxx b/dbaccess/source/ui/dlg/tablespage.hxx index 9bc084b1e12f..876e6078ac14 100644 --- a/dbaccess/source/ui/dlg/tablespage.hxx +++ b/dbaccess/source/ui/dlg/tablespage.hxx @@ -28,15 +28,10 @@ #include "tabletree.hxx" #include <com/sun/star/sdbc/XConnection.hpp> - -//......................................................................... namespace dbaui { -//......................................................................... - //======================================================================== - //= OTableSubscriptionPage - //======================================================================== + // OTableSubscriptionPage class OTableSubscriptionDialog; class OTableSubscriptionPage :public OGenericAdministrationPage @@ -65,7 +60,6 @@ namespace dbaui virtual void StateChanged( StateChangedType nStateChange ); virtual void DataChanged( const DataChangedEvent& rDCEvt ); - /** will be called when the controls need to be resized. */ virtual void resizeControls(const Size& _rDiff); @@ -82,7 +76,6 @@ namespace dbaui private: - /** check the tables in <member>m_aTablesList</member> according to <arg>_rTables</arg> */ void implCheckTables(const ::com::sun::star::uno::Sequence< OUString >& _rTables); @@ -104,9 +97,7 @@ namespace dbaui void implCompleteTablesCheck( const ::com::sun::star::uno::Sequence< OUString >& _rTableFilter ); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_TABLESPAGE_HXX_ diff --git a/dbaccess/source/ui/dlg/textconnectionsettings.cxx b/dbaccess/source/ui/dlg/textconnectionsettings.cxx index 2841341aa019..c4ca7ca2e410 100644 --- a/dbaccess/source/ui/dlg/textconnectionsettings.cxx +++ b/dbaccess/source/ui/dlg/textconnectionsettings.cxx @@ -26,13 +26,9 @@ #include <vcl/msgbox.hxx> -//........................................................................ namespace dbaui { - //==================================================================== - //= TextConnectionSettingsDialog - //==================================================================== - //-------------------------------------------------------------------- + // TextConnectionSettingsDialog TextConnectionSettingsDialog::TextConnectionSettingsDialog( Window* _pParent, SfxItemSet& _rItems ) :ModalDialog( _pParent, ModuleRes( DLG_TEXT_CONNECTION_SETTINGS ) ) ,m_aOK( this, ModuleRes( 1 ) ) @@ -45,12 +41,10 @@ namespace dbaui m_aOK.SetClickHdl( LINK( this, TextConnectionSettingsDialog, OnOK ) ); } - //-------------------------------------------------------------------- TextConnectionSettingsDialog::~TextConnectionSettingsDialog() { } - //-------------------------------------------------------------------- void TextConnectionSettingsDialog::bindItemStorages( SfxItemSet& _rSet, PropertyValues& _rValues ) { _rValues[ PROPERTY_ID_HEADER_LINE ].reset( new SetItemPropertyStorage( _rSet, DSID_TEXTFILEHEADER ) ); @@ -61,14 +55,12 @@ namespace dbaui _rValues[ PROPERTY_ID_ENCODING ].reset( new SetItemPropertyStorage( _rSet, DSID_CHARSET ) ); } - //-------------------------------------------------------------------- short TextConnectionSettingsDialog::Execute() { m_pTextConnectionHelper->implInitControls( m_rItems, sal_True ); return ModalDialog::Execute(); } - //-------------------------------------------------------------------- IMPL_LINK( TextConnectionSettingsDialog, OnOK, PushButton*, /*_pButton*/ ) { if ( m_pTextConnectionHelper->prepareLeave() ) @@ -82,8 +74,6 @@ namespace dbaui return 0L; } -//........................................................................ } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/AppElementType.hxx b/dbaccess/source/ui/inc/AppElementType.hxx index ef535422b38a..e0983cf1dbd5 100644 --- a/dbaccess/source/ui/inc/AppElementType.hxx +++ b/dbaccess/source/ui/inc/AppElementType.hxx @@ -21,10 +21,8 @@ #include <com/sun/star/sdb/application/DatabaseObject.hpp> -//........................................................................ namespace dbaui { -//........................................................................ enum ElementType { @@ -51,9 +49,7 @@ namespace dbaui E_OPEN_FOR_MAIL }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // DBAUI_APPELEMENTTYPE_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/CollectionView.hxx b/dbaccess/source/ui/inc/CollectionView.hxx index 6ec8a4140117..3ec0b8f5fc78 100644 --- a/dbaccess/source/ui/inc/CollectionView.hxx +++ b/dbaccess/source/ui/inc/CollectionView.hxx @@ -27,10 +27,8 @@ #include <com/sun/star/ucb/XContent.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -//......................................................................... namespace dbaui { -//......................................................................... /* this class allows to browse through the collection of forms and reports */ class OCollectionView : public ModalDialog @@ -69,12 +67,8 @@ namespace dbaui ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent> getSelectedFolder() const; OUString getName() const; }; -//......................................................................... } // namespace dbaui -//......................................................................... - #endif //DBAUI_COLLECTIONVIEW_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/ColumnControlWindow.hxx b/dbaccess/source/ui/inc/ColumnControlWindow.hxx index 76c290e5f840..4f5e4e30396d 100644 --- a/dbaccess/source/ui/inc/ColumnControlWindow.hxx +++ b/dbaccess/source/ui/inc/ColumnControlWindow.hxx @@ -24,13 +24,9 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/util/XNumberFormatter.hpp> -//......................................................................... namespace dbaui { -//......................................................................... - // ============================================================================================= // OColumnControlWindow - // ============================================================================================= class OColumnControlWindow : public OFieldDescControl { ::com::sun::star::lang::Locale m_aLocale; @@ -68,9 +64,7 @@ namespace dbaui virtual const OTypeInfoMap* getTypeInfo() const; TOTypeInfoSP getDefaultTyp() const; }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // DBAUI_COLUMNCONTROLWINDOW_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/ConnectionLine.hxx b/dbaccess/source/ui/inc/ConnectionLine.hxx index 8e8283169c52..83e8310e1203 100644 --- a/dbaccess/source/ui/inc/ConnectionLine.hxx +++ b/dbaccess/source/ui/inc/ConnectionLine.hxx @@ -28,12 +28,10 @@ class OutputDevice; namespace dbaui { - //================================================================== // ConnData ---------->* ConnLineData // ^1 ^1 // | | // Conn ---------->* ConnLine - //================================================================== /* the class OConnectionLine represents the graphical line between the to two windows diff --git a/dbaccess/source/ui/inc/ConnectionLineData.hxx b/dbaccess/source/ui/inc/ConnectionLineData.hxx index 4ddb87927606..628d0c42c8f7 100644 --- a/dbaccess/source/ui/inc/ConnectionLineData.hxx +++ b/dbaccess/source/ui/inc/ConnectionLineData.hxx @@ -30,15 +30,11 @@ namespace dbaui { - //================================================================== // ConnData ---------->* ConnLineData // ^1 ^1 // | | // Conn ---------->* ConnLine - //================================================================== - - //================================================================== /** the class OConnectionLineData contains the data of a connection e.g. the source and the destanation field @@ -82,8 +78,6 @@ namespace dbaui OConnectionLineData& operator=( const OConnectionLineData& rConnLineData ); }; - //------------------------------------------------------------------------- - //------------------------------------------------------------------ typedef ::rtl::Reference< OConnectionLineData > OConnectionLineDataRef; typedef ::std::vector< OConnectionLineDataRef > OConnectionLineDataVec; } diff --git a/dbaccess/source/ui/inc/FieldControls.hxx b/dbaccess/source/ui/inc/FieldControls.hxx index 1f2648973dbb..46b703c602f7 100644 --- a/dbaccess/source/ui/inc/FieldControls.hxx +++ b/dbaccess/source/ui/inc/FieldControls.hxx @@ -25,7 +25,6 @@ #include "SqlNameEdit.hxx" #include "moduledbu.hxx" - namespace dbaui { namespace @@ -39,7 +38,6 @@ namespace dbaui } } - //================================================================== class OPropColumnEditCtrl : public OSQLNameEdit { OModuleClient m_aModuleClient; @@ -69,7 +67,6 @@ namespace dbaui { m_strHelpText=String(ModuleRes(nHelpId)); } - //================================================================== class OPropEditCtrl : public Edit { OModuleClient m_aModuleClient; @@ -105,7 +102,6 @@ namespace dbaui m_strHelpText =String(ModuleRes(nHelpId)); } - //================================================================== class OPropNumericEditCtrl : public NumericField { short m_nPos; @@ -140,7 +136,6 @@ namespace dbaui m_strHelpText =String(ModuleRes(nHelpId)); } - //================================================================== class OPropListBoxCtrl : public ListBox { short m_nPos; @@ -177,6 +172,4 @@ namespace dbaui } #endif // DBAUI_FIELDCONTROLS_HXX - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/GeneralUndo.hxx b/dbaccess/source/ui/inc/GeneralUndo.hxx index 6a1a60f8de72..51d83a05d60e 100644 --- a/dbaccess/source/ui/inc/GeneralUndo.hxx +++ b/dbaccess/source/ui/inc/GeneralUndo.hxx @@ -24,7 +24,6 @@ namespace dbaui { - // ================================================================================================ // SbaCommentUndoAction - Undo-Basisklasse fuer Aktionen, deren GetComment einen aus einer Sba-Resource // geladenen String liefert @@ -44,5 +43,4 @@ namespace dbaui } #endif // DBAUI_GENERALUNDO_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/JoinController.hxx b/dbaccess/source/ui/inc/JoinController.hxx index f7477d9ba134..14d95335997b 100644 --- a/dbaccess/source/ui/inc/JoinController.hxx +++ b/dbaccess/source/ui/inc/JoinController.hxx @@ -82,18 +82,15 @@ namespace dbaui public: OJoinController(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rM); - // --------------------------------------------------------------- // attribute access inline TTableWindowData* getTableWindowData() { return &m_vTableData; } inline TTableConnectionData* getTableConnectionData() { return &m_vTableConnectionData;} inline OAddTableDlg* getAddTableDialog()const { return m_pAddTableDialog; } - // --------------------------------------------------------------- // OSingleDocumentController overridables virtual void reconnect( sal_Bool _bUI ); virtual void impl_onModifyChanged(); - // --------------------------------------------------------------- // own overridables /** determines whether or not it's allowed for database views to participate in the game */ @@ -108,8 +105,6 @@ namespace dbaui */ virtual OJoinDesignView* getJoinView(); - - // --------------------------------------------------------------- /** erase the data in the data vector @param _pData the data whioch should be erased @@ -120,7 +115,6 @@ namespace dbaui void SaveTabWinPosSize(OTableWindow* pTabWin, long nOffsetX, long nOffsetY); - // --------------------------------------------------------------- // UNO interface overridables // XEventListener virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException); @@ -130,8 +124,6 @@ namespace dbaui // ::com::sun::star::frame::XController virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException ); - - // --------------------------------------------------------------- // misc /** only defines a method to save a SQLException in d&d methods to show the error at a later state set the internal member m_aExceptionInfo to _rInfo diff --git a/dbaccess/source/ui/inc/RTableConnectionData.hxx b/dbaccess/source/ui/inc/RTableConnectionData.hxx index 1f86862a5bb7..2e20e8bc0052 100644 --- a/dbaccess/source/ui/inc/RTableConnectionData.hxx +++ b/dbaccess/source/ui/inc/RTableConnectionData.hxx @@ -32,7 +32,6 @@ namespace dbaui const sal_uInt16 CARDINAL_ONE_ONE = 0x0004; class OConnectionLineData; - //================================================================== class ORelationTableConnectionData : public OTableConnectionData { friend bool operator==(const ORelationTableConnectionData& lhs, const ORelationTableConnectionData& rhs); @@ -71,7 +70,6 @@ namespace dbaui */ virtual sal_Bool Update(); - void SetCardinality(); inline void SetUpdateRules( sal_Int32 nAttr ){ m_nUpdateRules = nAttr; } inline void SetDeleteRules( sal_Int32 nAttr ){ m_nDeleteRules = nAttr; } @@ -88,6 +86,4 @@ namespace dbaui #endif // DBAUI_RTABLECONNECTIONDATA_HXX - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/RefFunctor.hxx b/dbaccess/source/ui/inc/RefFunctor.hxx index 84a697b5bf14..fa9c69e6dd26 100644 --- a/dbaccess/source/ui/inc/RefFunctor.hxx +++ b/dbaccess/source/ui/inc/RefFunctor.hxx @@ -39,9 +39,7 @@ namespace dbaui m_aFunction(_aType.get()); } }; -// ----------------------------------------------------------------------------- } // namespace dbaui -// ----------------------------------------------------------------------------- #endif //DBAUI_REFFUNCTOR_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/RelationControl.hxx b/dbaccess/source/ui/inc/RelationControl.hxx index 5926d48f04ee..72d27f5efa01 100644 --- a/dbaccess/source/ui/inc/RelationControl.hxx +++ b/dbaccess/source/ui/inc/RelationControl.hxx @@ -25,7 +25,6 @@ namespace dbaui { - //======================================================================== class OTableListBoxControl; class IRelationControlInterface; class ORelationControl; diff --git a/dbaccess/source/ui/inc/RelationDlg.hxx b/dbaccess/source/ui/inc/RelationDlg.hxx index 6d8de83f29b2..0aef7b3effc4 100644 --- a/dbaccess/source/ui/inc/RelationDlg.hxx +++ b/dbaccess/source/ui/inc/RelationDlg.hxx @@ -28,12 +28,10 @@ #include "RelControliFace.hxx" #include "moduledbu.hxx" - namespace dbaui { class OJoinTableView; class OTableListBoxControl; - //======================================================================== class ORelationDialog : public ModalDialog ,public IRelationControlInterface { @@ -56,7 +54,6 @@ namespace dbaui CancelButton aPB_CANCEL; HelpButton aPB_HELP; - TTableConnectionData::value_type m_pConnData; TTableConnectionData::value_type m_pOrigConnData; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xConnection; @@ -101,5 +98,4 @@ namespace dbaui } #endif // DBAUI_RELATIONDIALOG_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/SqlNameEdit.hxx b/dbaccess/source/ui/inc/SqlNameEdit.hxx index 9d638e7c18c4..8cf281cc3cb5 100644 --- a/dbaccess/source/ui/inc/SqlNameEdit.hxx +++ b/dbaccess/source/ui/inc/SqlNameEdit.hxx @@ -52,7 +52,6 @@ namespace dbaui } sal_Bool checkString(const OUString& _sToCheck,OUString& _rsCorrected); }; - //================================================================== class OSQLNameEdit : public Edit ,public OSQLNameChecker { @@ -97,5 +96,4 @@ namespace dbaui } #endif // DBAUI_SQLNAMEEDIT_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/TableCopyHelper.hxx b/dbaccess/source/ui/inc/TableCopyHelper.hxx index 01835f762a30..f2b1dc503543 100644 --- a/dbaccess/source/ui/inc/TableCopyHelper.hxx +++ b/dbaccess/source/ui/inc/TableCopyHelper.hxx @@ -29,10 +29,8 @@ #include <functional> class SvTreeListEntry; -//........................................................................ namespace dbaui { -//........................................................................ class OGenericUnoController; /// unary_function Functor object for class DataFlavorExVector::value_type returntype is bool struct TAppSupportedSotFunctor : ::std::unary_function<DataFlavorExVector::value_type,bool> @@ -183,9 +181,7 @@ namespace dbaui ); }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // DBUI_TABLECOPYHELPER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/TableDesignView.hxx b/dbaccess/source/ui/inc/TableDesignView.hxx index 7e99ac682d8c..f23d6b3156bb 100644 --- a/dbaccess/source/ui/inc/TableDesignView.hxx +++ b/dbaccess/source/ui/inc/TableDesignView.hxx @@ -30,7 +30,6 @@ namespace dbaui class OTableController; class OTableFieldDescWin; class OTableEditorCtrl; - //================================================================== class OTableBorderWindow : public Window { Splitter m_aHorzSplitter; @@ -52,7 +51,6 @@ namespace dbaui OTableEditorCtrl* GetEditorCtrl() const { return m_pEditorCtrl; } OTableFieldDescWin* GetDescWin() const { return m_pFieldDescWin; } }; - //================================================================== class OTableDesignView : public ODataView ,public IClipboardTest { @@ -71,7 +69,6 @@ namespace dbaui IClipboardTest* getActiveChild() const; protected: - // return the Rectangle where I can paint myself virtual void resizeDocumentView(Rectangle& rRect); diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx index ae46b51dd00a..3f9bdf6b9b24 100644 --- a/dbaccess/source/ui/inc/TableWindow.hxx +++ b/dbaccess/source/ui/inc/TableWindow.hxx @@ -34,7 +34,6 @@ class SvTreeListEntry; namespace dbaui { - ////////////////////////////////////////////////////////////////////////// // Flags for the size adjustment of SbaJoinTabWins const sal_uInt16 SIZING_NONE = 0x0000; const sal_uInt16 SIZING_TOP = 0x0001; @@ -195,5 +194,4 @@ namespace dbaui } #endif //DBAUI_TABLEWINDOW_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/TablesSingleDlg.hxx b/dbaccess/source/ui/inc/TablesSingleDlg.hxx index 3c045ef40777..6e0638cae43a 100644 --- a/dbaccess/source/ui/inc/TablesSingleDlg.hxx +++ b/dbaccess/source/ui/inc/TablesSingleDlg.hxx @@ -36,14 +36,10 @@ namespace com { namespace sun { namespace star { } }}} -//......................................................................... namespace dbaui { -//......................................................................... class ODbDataSourceAdministrationHelper; - //======================================================================== - //= OTableSubscriptionDialog - //======================================================================== + // OTableSubscriptionDialog class OTableSubscriptionDialog : public SfxNoLayoutSingleTabDialog, public IItemSetHelper { ::std::auto_ptr<ODbDataSourceAdministrationHelper> m_pImpl; @@ -74,9 +70,7 @@ class ODbDataSourceAdministrationHelper; virtual short Execute(); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_TABLESSINGLEDLG_HXX_ diff --git a/dbaccess/source/ui/inc/TokenWriter.hxx b/dbaccess/source/ui/inc/TokenWriter.hxx index f7bbb8205526..b6cf5b8360d2 100644 --- a/dbaccess/source/ui/inc/TokenWriter.hxx +++ b/dbaccess/source/ui/inc/TokenWriter.hxx @@ -47,9 +47,7 @@ namespace com { namespace sun { namespace star { namespace dbaui { - // ========================================================================= // ODatabaseImportExport base class for import/export - // ========================================================================= class ODatabaseExport; typedef ::cppu::WeakImplHelper1< ::com::sun::star::lang::XEventListener> ODatabaseImportExport_BASE; class ODatabaseImportExport : public ODatabaseImportExport_BASE @@ -123,15 +121,12 @@ namespace dbaui void enableCheckOnly() { m_bCheckOnly = sal_True; } sal_Bool isCheckEnabled() const { return m_bCheckOnly; } - private: virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException); void impl_initFromDescriptor( const ::svx::ODataAccessDescriptor& _aDataDescriptor, bool _bPlusDefaultInit ); }; - // ========================================================================= // RTF Import and Export - // ========================================================================= class ORTFImportExport : public ODatabaseImportExport { @@ -154,9 +149,7 @@ namespace dbaui virtual sal_Bool Write(); virtual sal_Bool Read(); }; - // ========================================================================= // HTML Import and Export - // ========================================================================= #define SBA_HTML_FONTSIZES 7 const sal_Int16 nIndentMax = 23; class OHTMLImportExport : public ODatabaseImportExport @@ -199,18 +192,16 @@ namespace dbaui virtual sal_Bool Read(); }; - // ========================================================================= // normal RowSet Import and Export - // ========================================================================= class ORowSetImportExport : public ODatabaseImportExport { OModuleClient m_aModuleClient; ::std::vector<sal_Int32> m_aColumnMapping; ::std::vector<sal_Int32> m_aColumnTypes; - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > m_xTargetResultSetUpdate; // - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowUpdate > m_xTargetRowUpdate; // - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > m_xTargetResultSetMetaData; // + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetUpdate > m_xTargetResultSetUpdate; + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowUpdate > m_xTargetRowUpdate; + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > m_xTargetResultSetMetaData; Window* m_pParent; sal_Bool m_bAlreadyAsked; @@ -242,6 +233,4 @@ namespace dbaui } #endif // DBAUI_TOKENWRITER_HXX - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/TypeInfo.hxx b/dbaccess/source/ui/inc/TypeInfo.hxx index 5e8c0d6ebd3f..f81ab55be1c9 100644 --- a/dbaccess/source/ui/inc/TypeInfo.hxx +++ b/dbaccess/source/ui/inc/TypeInfo.hxx @@ -19,7 +19,6 @@ #ifndef DBAUI_TYPEINFO_HXX #define DBAUI_TYPEINFO_HXX - #include <rtl/ustring.hxx> #include <com/sun/star/sdbc/DataType.hpp> #include <com/sun/star/sdbc/ColumnSearch.hpp> @@ -27,11 +26,8 @@ #include <boost/shared_ptr.hpp> #include <map> - - namespace dbaui { -//======================================================================== // Based on these ids the language dependent OUString are fetched from the resource const sal_uInt16 TYPE_UNKNOWN = 0; const sal_uInt16 TYPE_TEXT = 1; @@ -84,7 +80,6 @@ const sal_uInt16 TYPE_BIT = 31; sal_Int16 nSearchType; // if it is possible to search for type - sal_Bool bCurrency : 1, // currency bAutoIncrement : 1, // if automatic incrementing field bNullable : 1, // if field can be NULL @@ -133,5 +128,4 @@ const sal_uInt16 TYPE_BIT = 31; #endif // DBAUI_TYPEINFO_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx index 7c4f62401e35..474685fc0502 100644 --- a/dbaccess/source/ui/inc/UITools.hxx +++ b/dbaccess/source/ui/inc/UITools.hxx @@ -71,10 +71,8 @@ class Font; class SvNumberFormatter; class SfxFilter; -// ......................................................................... namespace dbaui { -// ......................................................................... /** creates a new connection and appends the eventlistener @param _rsDataSourceName name of the datasource @@ -414,10 +412,7 @@ namespace dbaui // detect installed locale void AppendConfigToken( OUString& _rURL, sal_Bool _bQuestionMark ); -// ......................................................................... } -// ......................................................................... #endif // DBAUI_TOOLS_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/UserAdminDlg.hxx b/dbaccess/source/ui/inc/UserAdminDlg.hxx index 470fa6b95494..da672145631e 100644 --- a/dbaccess/source/ui/inc/UserAdminDlg.hxx +++ b/dbaccess/source/ui/inc/UserAdminDlg.hxx @@ -36,14 +36,10 @@ namespace com { namespace sun { namespace star { } }}} -//......................................................................... namespace dbaui { -//......................................................................... class ODbDataSourceAdministrationHelper; - //========================================================================= - //= OUserAdminDlg - //========================================================================= + // OUserAdminDlg /** implements the user adin dialog */ @@ -80,9 +76,7 @@ namespace dbaui virtual void setTitle(const OUString& _sTitle); virtual void enableConfirmSettings( bool _bEnable ); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // DBAUI_USERADMINDLG_HXX diff --git a/dbaccess/source/ui/inc/VertSplitView.hxx b/dbaccess/source/ui/inc/VertSplitView.hxx index 55ccc1cbac5f..e537982e0f5c 100644 --- a/dbaccess/source/ui/inc/VertSplitView.hxx +++ b/dbaccess/source/ui/inc/VertSplitView.hxx @@ -25,7 +25,6 @@ class Splitter; namespace dbaui { - //================================================================== class OSplitterView : public Window { Splitter* m_pSplitter; diff --git a/dbaccess/source/ui/inc/WCPage.hxx b/dbaccess/source/ui/inc/WCPage.hxx index bae5fef2ed87..71bd4dbbc3f7 100644 --- a/dbaccess/source/ui/inc/WCPage.hxx +++ b/dbaccess/source/ui/inc/WCPage.hxx @@ -31,7 +31,6 @@ namespace dbaui { class OWizColumnSelect; class OWizNormalExtend; - //======================================================================== class OCopyTable : public OWizardPage { protected: @@ -54,7 +53,6 @@ namespace dbaui sal_Bool m_bPKeyAllowed; sal_Bool m_bUseHeaderAllowed; - DECL_LINK( AppendDataClickHdl, Button* ); DECL_LINK( RadioChangeHdl, Button* ); DECL_LINK( KeyClickHdl, Button* ); @@ -94,5 +92,4 @@ namespace dbaui } #endif // DBAUI_WIZARD_CPAGE_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/WColumnSelect.hxx b/dbaccess/source/ui/inc/WColumnSelect.hxx index f960ead3e383..71cb8c479d48 100644 --- a/dbaccess/source/ui/inc/WColumnSelect.hxx +++ b/dbaccess/source/ui/inc/WColumnSelect.hxx @@ -31,9 +31,7 @@ namespace dbaui { class OFieldDescription; - // ======================================================== // Wizard Page: OWizColumnSelect - // ======================================================== class OWizColumnSelect : public OWizardPage { @@ -46,11 +44,9 @@ namespace dbaui ImageButton m_ibColumns_LH; MultiListBox m_lbNewColumnNames; // right side - DECL_LINK( ButtonClickHdl, Button * ); DECL_LINK( ListDoubleClickHdl, MultiListBox * ); - void clearListBox(MultiListBox& _rListBox); void fillColumns( ListBox* pRight, ::std::vector< OUString> &_rRightColumns); @@ -73,7 +69,6 @@ namespace dbaui void enableButtons(); - sal_uInt16 adjustColumnPosition(ListBox* _pLeft, const OUString& _sColumnName, ODatabaseExport::TColumnVector::size_type nCurrentPos, @@ -91,6 +86,4 @@ namespace dbaui } #endif // DBAUI_WIZ_COLUMNSELECT_HXX - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx index 659f13c66a3b..186aa872668f 100644 --- a/dbaccess/source/ui/inc/WCopyTable.hxx +++ b/dbaccess/source/ui/inc/WCopyTable.hxx @@ -91,9 +91,7 @@ namespace dbaui } }; - // ======================================================== // ICopyTableSourceObject - // ======================================================== /** interface to an object to copy to another DB, using the OCopyTableWizard when the wizard is used to copy an object to another DB, it usually requires @@ -142,9 +140,7 @@ namespace dbaui virtual ~ICopyTableSourceObject(); }; - // ======================================================== // ObjectCopySource - // ======================================================== class ObjectCopySource : public ICopyTableSourceObject { private: @@ -175,9 +171,7 @@ namespace dbaui getPreparedSelectStatement() const; }; - // ======================================================== // NamedTableCopySource - // ======================================================== class NamedTableCopySource : public ICopyTableSourceObject { private: @@ -216,9 +210,7 @@ namespace dbaui impl_ensureStatement_throw(); }; - // ======================================================== // Wizard Dialog - // ======================================================== class OCopyTableWizard : public WizardDialog { friend class OWizColumnSelect; diff --git a/dbaccess/source/ui/inc/WExtendPages.hxx b/dbaccess/source/ui/inc/WExtendPages.hxx index 074368d61bfa..fc57159cf6f7 100644 --- a/dbaccess/source/ui/inc/WExtendPages.hxx +++ b/dbaccess/source/ui/inc/WExtendPages.hxx @@ -24,9 +24,7 @@ class SvStream; namespace dbaui { - // ======================================================== // Wizard Page: OWizHTMLExtend - // ======================================================== class OWizHTMLExtend : public OWizTypeSelect { protected: @@ -41,9 +39,7 @@ namespace dbaui virtual ~OWizHTMLExtend(){} }; - // ======================================================== // Wizard Page: OWizRTFExtend - // ======================================================== class OWizRTFExtend : public OWizTypeSelect { protected: @@ -59,9 +55,7 @@ namespace dbaui virtual ~OWizRTFExtend(){} }; - // ======================================================== // Wizard Page: OWizNormalExtend - // ======================================================== class OWizNormalExtend : public OWizTypeSelect { protected: @@ -72,6 +66,4 @@ namespace dbaui } #endif // DBAUI_WIZ_EXTENDPAGES_HXX - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/WNameMatch.hxx b/dbaccess/source/ui/inc/WNameMatch.hxx index bd2a2de7b15c..486e6fd01be2 100644 --- a/dbaccess/source/ui/inc/WNameMatch.hxx +++ b/dbaccess/source/ui/inc/WNameMatch.hxx @@ -28,9 +28,7 @@ namespace dbaui { - // ======================================================== // columns are at root only no children - // ======================================================== class OColumnTreeBox : public OMarkableTreeListBox { sal_Bool m_bReadOnly; @@ -48,10 +46,8 @@ namespace dbaui using OMarkableTreeListBox::Select; }; - // ======================================================== // Wizard Page: OWizNameMatching // Name matching for data appending - // ======================================================== class OWizNameMatching : public OWizardPage { FixedText m_FT_TABLE_LEFT; @@ -86,6 +82,4 @@ namespace dbaui } #endif // DBAUI_WIZ_NAMEMATCHING_HXX - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/WTabPage.hxx b/dbaccess/source/ui/inc/WTabPage.hxx index df603a807274..a97715b993d3 100644 --- a/dbaccess/source/ui/inc/WTabPage.hxx +++ b/dbaccess/source/ui/inc/WTabPage.hxx @@ -24,9 +24,7 @@ namespace dbaui { - // ======================================================== // Wizard Page - // ======================================================== class OCopyTableWizard; class OWizardPage : public TabPage { @@ -46,6 +44,4 @@ namespace dbaui } #endif // DBAUI_WIZ_TABBPAGE_HXX - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/WTypeSelect.hxx b/dbaccess/source/ui/inc/WTypeSelect.hxx index 8289bdef28f2..56803b91badd 100644 --- a/dbaccess/source/ui/inc/WTypeSelect.hxx +++ b/dbaccess/source/ui/inc/WTypeSelect.hxx @@ -33,9 +33,7 @@ class SvParser; namespace dbaui { class OTableDesignHelpBar; - // ============================================================================================= // OWizTypeSelectControl - // ============================================================================================= class OWizTypeSelectControl : public OFieldDescControl { protected: @@ -59,11 +57,8 @@ namespace dbaui virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> getConnection(); }; - - // ======================================================== // Wizard Page: OWizTypeSelectList // just defines the ::com::sun::star::ucb::Command for the Contextmenu - // ======================================================== class OWizTypeSelectList : public MultiListBox { sal_Bool m_bPKey; @@ -79,11 +74,9 @@ namespace dbaui void SetPKey(sal_Bool bPKey) { m_bPKey = bPKey; } }; - // ======================================================== // Wizard Page: OWizTypeSelect // Serves as base class for different copy properties. // Calls FillColumnList, when button AUTO is triggered - // ======================================================== class OWizTypeSelect : public OWizardPage { friend class OWizTypeSelectControl; @@ -125,11 +118,8 @@ namespace dbaui inline void setDuplicateName(sal_Bool _bDuplicateName) { m_bDuplicateName = _bDuplicateName; } }; - // ======================================================== typedef OWizTypeSelect* (*TypeSelectionPageFactory)( Window*, SvStream& ); } #endif // DBAUI_WIZ_TYPESELECT_HXX - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/adtabdlg.hxx b/dbaccess/source/ui/inc/adtabdlg.hxx index d66f20dcded1..c6c5e9137bfe 100644 --- a/dbaccess/source/ui/inc/adtabdlg.hxx +++ b/dbaccess/source/ui/inc/adtabdlg.hxx @@ -36,7 +36,6 @@ namespace dbaui { - //======================================================================== /** unifies the access to a list of table/query objects */ class TableObjectListFacade @@ -49,7 +48,6 @@ namespace dbaui virtual ~TableObjectListFacade(); }; - //======================================================================== class IAddTableDialogContext { public: @@ -65,7 +63,6 @@ namespace dbaui ~IAddTableDialogContext() {} }; - //======================================================================== class OAddTableDlg : public ModelessDialog { RadioButton m_aCaseTables; diff --git a/dbaccess/source/ui/inc/advancedsettingsdlg.hxx b/dbaccess/source/ui/inc/advancedsettingsdlg.hxx index 84b715da92df..1504f1c9c630 100644 --- a/dbaccess/source/ui/inc/advancedsettingsdlg.hxx +++ b/dbaccess/source/ui/inc/advancedsettingsdlg.hxx @@ -27,14 +27,10 @@ #include <memory> -//........................................................................ namespace dbaui { -//........................................................................ - //========================================================================= - //= AdvancedSettingsDialog - //========================================================================= + // AdvancedSettingsDialog class ODbDataSourceAdministrationHelper; /** implements the advanced page dlg of the data source properties. */ @@ -75,9 +71,7 @@ namespace dbaui virtual void enableConfirmSettings( bool _bEnable ); }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // DBACCESS_ADVANCEDSETTINGSDLG_HXX diff --git a/dbaccess/source/ui/inc/asyncmodaldialog.hxx b/dbaccess/source/ui/inc/asyncmodaldialog.hxx index 8a03d91a29b1..0906116796f9 100644 --- a/dbaccess/source/ui/inc/asyncmodaldialog.hxx +++ b/dbaccess/source/ui/inc/asyncmodaldialog.hxx @@ -22,14 +22,10 @@ #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> -//........................................................................ namespace dbaui { -//........................................................................ - //==================================================================== - //= AsyncDialogExecutor - //==================================================================== + // AsyncDialogExecutor /** helper class for executing (UNO) dialogs modal, but asynchronously */ class AsyncDialogExecutor @@ -47,9 +43,7 @@ namespace dbaui ); }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // DBACCESS_ASYNCMODALDIALOG_HXX diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx index c7651a1bbf37..27c500fa1a53 100644 --- a/dbaccess/source/ui/inc/brwctrlr.hxx +++ b/dbaccess/source/ui/inc/brwctrlr.hxx @@ -56,7 +56,6 @@ namespace dbtools namespace dbaui { - // ========================================================================= typedef ::cppu::ImplInheritanceHelper9 < OGenericUnoController , ::com::sun::star::sdb::XSQLErrorListener @@ -73,7 +72,6 @@ namespace dbaui class SbaXDataBrowserController :public SbaXDataBrowserController_Base ,public SbaGridListener { - // ========== // attributes private: // for implementing the XFormController @@ -126,7 +124,6 @@ namespace dbaui }; friend class FormErrorHelper; - // ================ // attribute access protected: ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet > getRowSet() const { return m_xRowSet; } @@ -249,7 +246,6 @@ namespace dbaui virtual sal_Bool InitializeGridModel(const ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > & xGrid); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormComponent > CreateGridModel(); // our default implementation simply instantiates a stardiv.one.form.component.Grid service // you most probably don't want to override this behaviuor @@ -272,7 +268,6 @@ namespace dbaui virtual void AddColumnListener(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xCol); virtual void RemoveColumnListener(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xCol); - // call after "major changes" (e.g. the completion of the async load). // invalidates all toolbox slots and all supported features. @@ -292,8 +287,6 @@ namespace dbaui // after setting this filter fails, the filter is reset and the form is reloaded, again. Only the // whole process (_both_ XLoadable::reload calls _together_) form the "reload operation" - // -------------------- - // empty the frame where our view resides virtual sal_Bool CommitCurrent(); // commit the current column (i.e. cell) diff --git a/dbaccess/source/ui/inc/brwview.hxx b/dbaccess/source/ui/inc/brwview.hxx index d43b1094c9f9..7bca0a3224ee 100644 --- a/dbaccess/source/ui/inc/brwview.hxx +++ b/dbaccess/source/ui/inc/brwview.hxx @@ -28,14 +28,12 @@ #include <dbaccess/dataview.hxx> #include <unotools/eventlisteneradapter.hxx> - namespace com { namespace sun { namespace star { namespace awt { class XControl; class XControlContainer; class XControlModel; }}}} -// ========================================================================= class Splitter; namespace dbaui diff --git a/dbaccess/source/ui/inc/callbacks.hxx b/dbaccess/source/ui/inc/callbacks.hxx index e914505474a3..3bec36dd42ac 100644 --- a/dbaccess/source/ui/inc/callbacks.hxx +++ b/dbaccess/source/ui/inc/callbacks.hxx @@ -34,15 +34,11 @@ struct ExecuteDropEvent; namespace cppu { class OInterfaceContainerHelper; } -//........................................................................ namespace dbaui { -//........................................................................ class IController; - //==================================================================== - //= IControlActionListener - //==================================================================== + // IControlActionListener class SAL_NO_VTABLE IControlActionListener { public: @@ -68,9 +64,7 @@ namespace dbaui ~IControlActionListener() {} }; - //==================================================================== - //= IContextMenuProvider - //==================================================================== + // IContextMenuProvider class SAL_NO_VTABLE IContextMenuProvider { public: @@ -106,9 +100,7 @@ namespace dbaui ~IContextMenuProvider() {} }; - //==================================================================== - //= IDragTransferableListener - //==================================================================== + // IDragTransferableListener class SAL_NO_VTABLE IDragTransferableListener { public: @@ -119,9 +111,7 @@ namespace dbaui ~IDragTransferableListener() {} }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // _DBACCESS_UI_CALLBACKS_HXX_ diff --git a/dbaccess/source/ui/inc/charsetlistbox.hxx b/dbaccess/source/ui/inc/charsetlistbox.hxx index 5782a1792ef9..262f2e70a01f 100644 --- a/dbaccess/source/ui/inc/charsetlistbox.hxx +++ b/dbaccess/source/ui/inc/charsetlistbox.hxx @@ -26,14 +26,10 @@ class SfxItemSet; -//........................................................................ namespace dbaui { -//........................................................................ - //==================================================================== - //= CharSetListBox - //==================================================================== + // CharSetListBox class CharSetListBox : public ListBox { public: @@ -47,9 +43,7 @@ namespace dbaui OCharsetDisplay m_aCharSets; }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // CHARSETLISTBOX_HXX diff --git a/dbaccess/source/ui/inc/charsets.hxx b/dbaccess/source/ui/inc/charsets.hxx index 0828feac0f82..34edadc05548 100644 --- a/dbaccess/source/ui/inc/charsets.hxx +++ b/dbaccess/source/ui/inc/charsets.hxx @@ -24,14 +24,10 @@ #include <rtl/ustring.hxx> #include <svx/txenctab.hxx> -//......................................................................... namespace dbaui { -//......................................................................... - //========================================================================= - //= OCharsetDisplay - //========================================================================= + // OCharsetDisplay typedef ::dbtools::OCharsetMap OCharsetDisplay_Base; class OCharsetDisplay :protected OCharsetDisplay_Base @@ -68,9 +64,7 @@ namespace dbaui using OCharsetDisplay_Base::find; }; - //------------------------------------------------------------------------- //- CharsetDisplayDerefHelper - //------------------------------------------------------------------------- typedef ::dbtools::CharsetIteratorDerefHelper CharsetDisplayDerefHelper_Base; class CharsetDisplayDerefHelper : protected CharsetDisplayDerefHelper_Base { @@ -89,9 +83,7 @@ namespace dbaui CharsetDisplayDerefHelper(const ::dbtools::CharsetIteratorDerefHelper& _rBase, const OUString& _rDisplayName); }; - //------------------------------------------------------------------------- //- OCharsetDisplay::ExtendedCharsetIterator - //------------------------------------------------------------------------- class OCharsetDisplay::ExtendedCharsetIterator { friend class OCharsetDisplay; @@ -125,9 +117,7 @@ namespace dbaui ExtendedCharsetIterator( const OCharsetDisplay* _pContainer, const base_iterator& _rPosition ); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_CHARSETS_HXX_ diff --git a/dbaccess/source/ui/inc/commontypes.hxx b/dbaccess/source/ui/inc/commontypes.hxx index 6a907217662a..f89f56972e97 100644 --- a/dbaccess/source/ui/inc/commontypes.hxx +++ b/dbaccess/source/ui/inc/commontypes.hxx @@ -29,10 +29,8 @@ namespace com { namespace sun { namespace star { } } } } -//......................................................................... namespace dbaui { -//......................................................................... DECLARE_STL_STDKEY_SET( OUString, StringBag ); DECLARE_STL_VECTOR( sal_Int8, ByteVector ); @@ -40,9 +38,7 @@ namespace dbaui typedef ::utl::SharedUNOComponent< ::com::sun::star::sdbc::XConnection > SharedConnection; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_COMMON_TYPES_HXX_ diff --git a/dbaccess/source/ui/inc/curledit.hxx b/dbaccess/source/ui/inc/curledit.hxx index 981d790b8dc4..4006f403f164 100644 --- a/dbaccess/source/ui/inc/curledit.hxx +++ b/dbaccess/source/ui/inc/curledit.hxx @@ -25,14 +25,10 @@ #include "dsntypes.hxx" #include <memory> -//......................................................................... namespace dbaui { -//......................................................................... -//========================================================================= -//= OConnectionURLEdit -//========================================================================= +// OConnectionURLEdit /** an edit control which may be used to edit connection URLs like "sdbc:odbc:" or "jdbc:". It prevents the user from editing this prefix, though it is normally shown. @@ -55,7 +51,6 @@ public: virtual void SetText(const OUString& _rStr, const Selection& _rNewSelection); virtual OUString GetText() const; - /** Showsthe Prefix @param _bShowPrefix If <TRUE/> than the prefix will be visible, otherwise not. @@ -71,9 +66,7 @@ public: inline void SetTypeCollection(::dbaccess::ODsnTypeCollection* _pTypeCollection) { m_pTypeCollection = _pTypeCollection; } }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_CURLEDIT_HXX_ diff --git a/dbaccess/source/ui/inc/databaseobjectview.hxx b/dbaccess/source/ui/inc/databaseobjectview.hxx index 95211ca67375..fa92f260e081 100644 --- a/dbaccess/source/ui/inc/databaseobjectview.hxx +++ b/dbaccess/source/ui/inc/databaseobjectview.hxx @@ -37,11 +37,8 @@ #include <boost/shared_ptr.hpp> - -// ......................................................................... namespace dbaui { -// ......................................................................... /** encapsulates access to the view of a database object. @todo @@ -60,7 +57,6 @@ namespace dbaui m_xApplication; OUString m_sComponentURL; - private: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > doDispatch( @@ -149,9 +145,7 @@ namespace dbaui ); }; - //====================================================================== - //= QueryDesigner - //====================================================================== + // QueryDesigner class QueryDesigner : public DatabaseObjectView { protected: @@ -173,9 +167,7 @@ namespace dbaui ); }; - //====================================================================== - //= TableDesigner - //====================================================================== + // TableDesigner class TableDesigner : public DatabaseObjectView { protected: @@ -211,9 +203,7 @@ namespace dbaui impl_getConnectionProvidedDesigner_nothrow( const OUString& _rTableName ); }; - //====================================================================== - //= ResultSetBrowser - //====================================================================== + // ResultSetBrowser class ResultSetBrowser : public DatabaseObjectView { private: @@ -235,9 +225,7 @@ namespace dbaui ); }; - //====================================================================== - //= RelationDesigner - //====================================================================== + // RelationDesigner class RelationDesigner : public DatabaseObjectView { public: @@ -247,9 +235,7 @@ namespace dbaui const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxParentFrame ); }; -// ......................................................................... } // namespace dbaui -// ......................................................................... #endif // DBACCESS_DATABASE_OBJECT_VIEW_HXX diff --git a/dbaccess/source/ui/inc/datasourceconnector.hxx b/dbaccess/source/ui/inc/datasourceconnector.hxx index 76b3f27f6d60..fd7d86661281 100644 --- a/dbaccess/source/ui/inc/datasourceconnector.hxx +++ b/dbaccess/source/ui/inc/datasourceconnector.hxx @@ -31,14 +31,10 @@ namespace dbtools } class Window; -//......................................................................... namespace dbaui { -//......................................................................... - //===================================================================== - //= ODatasourceConnector - //===================================================================== + // ODatasourceConnector class ODatasourceConnector { protected: @@ -78,9 +74,7 @@ namespace dbaui ) const; }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_DATASOURCECONNECTOR_HXX_ diff --git a/dbaccess/source/ui/inc/dbadmin.hxx b/dbaccess/source/ui/inc/dbadmin.hxx index fb5758db17a0..9e7a591eb248 100644 --- a/dbaccess/source/ui/inc/dbadmin.hxx +++ b/dbaccess/source/ui/inc/dbadmin.hxx @@ -38,14 +38,10 @@ namespace com { namespace sun { namespace star { } }}} -//......................................................................... namespace dbaui { -//......................................................................... -//========================================================================= -//= ODbAdminDialog -//========================================================================= +// ODbAdminDialog class ODbDataSourceAdministrationHelper; /** tab dialog for administrating the office wide registered data sources */ @@ -127,9 +123,7 @@ private: ApplyResult implApplyChanges(); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_DBADMIN_HXX_ diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx index 16ad5901134e..0bd0badc5d96 100644 --- a/dbaccess/source/ui/inc/dbtreelistbox.hxx +++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx @@ -29,7 +29,6 @@ #include <set> - namespace dbaui { struct DBTreeEditedEntry @@ -47,7 +46,6 @@ namespace dbaui ~IEntryFilter() {} }; - //======================================================================== class IControlActionListener; class IContextMenuProvider; class DBTreeListBox :public SvTreeListBox @@ -72,7 +70,6 @@ namespace dbaui Link m_aEditedHandler; // called after someone edited an entry Link m_aEnterKeyHdl; - sal_Bool m_bHandleEnterKey; private: diff --git a/dbaccess/source/ui/inc/dbwiz.hxx b/dbaccess/source/ui/inc/dbwiz.hxx index 63748ff23fac..2949a0f810ae 100644 --- a/dbaccess/source/ui/inc/dbwiz.hxx +++ b/dbaccess/source/ui/inc/dbwiz.hxx @@ -44,14 +44,10 @@ namespace dbaccess { class ODsnTypeCollection; } -//......................................................................... namespace dbaui { -//......................................................................... -//========================================================================= -//= ODbTypeWizDialog -//========================================================================= +// ODbTypeWizDialog class OGeneralPage; class ODbDataSourceAdministrationHelper; /** tab dialog for administrating the office wide registered data sources @@ -125,9 +121,7 @@ private: DECL_LINK(OnTypeSelected, OGeneralPage*); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // DBAUI_DBWIZ_HXX diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx index fa35c499ad2e..697b9a0cb85e 100644 --- a/dbaccess/source/ui/inc/dbwizsetup.hxx +++ b/dbaccess/source/ui/inc/dbwizsetup.hxx @@ -42,16 +42,12 @@ namespace com { namespace sun { namespace star { } }}} -//......................................................................... namespace dbaui { -//......................................................................... class OGenericAdministrationPage; -//========================================================================= -//= ODbTypeWizDialogSetup -//========================================================================= +// ODbTypeWizDialogSetup class OGeneralPage; class OGeneralPageWizard; class ODbDataSourceAdministrationHelper; @@ -96,8 +92,6 @@ private: ::dbaccess::ODsnTypeCollection* m_pCollection; /// the DSN type collection instance - - public: /** ctor. The itemset given should have been created by <method>createItemSet</method> and should be destroyed after the dialog has been destroyed @@ -188,9 +182,7 @@ private: DECL_LINK(ImplModifiedHdl, OGenericAdministrationPage*); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // DBAUI_DBWIZ2_HXX diff --git a/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx b/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx index 8e09bb6ad9f8..82157a97e57d 100644 --- a/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx +++ b/dbaccess/source/ui/inc/defaultobjectnamecheck.hxx @@ -29,14 +29,10 @@ #include <memory> #include <boost/noncopyable.hpp> -//........................................................................ namespace dbaui { -//........................................................................ - //==================================================================== - //= HierarchicalNameCheck - //==================================================================== + // HierarchicalNameCheck struct HierarchicalNameCheck_Impl; /** class implementing the IObjectNameCheck interface, and checking given object names against a hierarchical name container @@ -74,9 +70,7 @@ namespace dbaui HierarchicalNameCheck(); // never implemented }; - //==================================================================== - //= DynamicTableOrQueryNameCheck - //==================================================================== + // DynamicTableOrQueryNameCheck struct DynamicTableOrQueryNameCheck_Impl; /** class implementing the IObjectNameCheck interface, and checking a given name for being valid as either a query or a table name. @@ -126,9 +120,7 @@ namespace dbaui DynamicTableOrQueryNameCheck(); // never implemented }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // DBACCESS_SOURCE_UI_INC_DEFAULTOBJECTNAMECHECK_HXX diff --git a/dbaccess/source/ui/inc/directsql.hxx b/dbaccess/source/ui/inc/directsql.hxx index 3876bf4d3c37..999854660e66 100644 --- a/dbaccess/source/ui/inc/directsql.hxx +++ b/dbaccess/source/ui/inc/directsql.hxx @@ -35,14 +35,10 @@ #include <svtools/editbrowsebox.hxx> -//........................................................................ namespace dbaui { -//........................................................................ - //==================================================================== - //= DirectSQLDialog - //==================================================================== + // DirectSQLDialog class DirectSQLDialog :public ModalDialog ,public ::utl::OEventListenerAdapter @@ -113,7 +109,6 @@ namespace dbaui #endif }; - //==================================================================== #ifdef DBG_UTIL #define CHECK_INVARIANTS(methodname) \ { \ @@ -125,9 +120,7 @@ namespace dbaui #define CHECK_INVARIANTS(methodname) #endif -//........................................................................ } // namespace dbaui -//........................................................................ #endif // _DBACCESS_UI_DIRECTSQL_HXX_ diff --git a/dbaccess/source/ui/inc/dlgattr.hxx b/dbaccess/source/ui/inc/dlgattr.hxx index eabd02b6b793..57e6550618aa 100644 --- a/dbaccess/source/ui/inc/dlgattr.hxx +++ b/dbaccess/source/ui/inc/dlgattr.hxx @@ -19,21 +19,16 @@ #ifndef DBAUI_SBATTRDLG_HXX #define DBAUI_SBATTRDLG_HXX - #include "dlgattr.hrc" #include <sfx2/tabdlg.hxx> #include <tools/solar.h> - - class SvxNumberInfoItem; class SfxItemSet; class SvNumberFormatter; -//......................................................................... namespace dbaui { -//......................................................................... class SbaSbAttrDlg : public SfxTabDialog { @@ -46,9 +41,7 @@ namespace dbaui virtual void PageCreated( sal_uInt16 nPageId, SfxTabPage& rTabPage ); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif//DBAUI_SBATTRDLG_HXX diff --git a/dbaccess/source/ui/inc/dlgsize.hxx b/dbaccess/source/ui/inc/dlgsize.hxx index 0f93c3223583..73f91b09a24c 100644 --- a/dbaccess/source/ui/inc/dlgsize.hxx +++ b/dbaccess/source/ui/inc/dlgsize.hxx @@ -27,10 +27,8 @@ #include <vcl/fixed.hxx> -//......................................................................... namespace dbaui { -//......................................................................... class DlgSize : public ModalDialog { @@ -54,9 +52,7 @@ namespace dbaui sal_Int32 GetValue(); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_DLGSIZE_HXX diff --git a/dbaccess/source/ui/inc/dsitems.hxx b/dbaccess/source/ui/inc/dsitems.hxx index 365982d7cf74..1de1555e531c 100644 --- a/dbaccess/source/ui/inc/dsitems.hxx +++ b/dbaccess/source/ui/inc/dsitems.hxx @@ -22,8 +22,7 @@ typedef sal_Int32 ItemID; -//======================================================================== -//= item ids for the data source administration dialog +// item ids for the data source administration dialog #define DSID_NAME 1 // name of a data source, SfxStringItem #define DSID_ORIGINALNAME 2 // orginal name, internal, SfxStringItem @@ -88,9 +87,7 @@ typedef sal_Int32 ItemID; #define DSID_RESPECTRESULTSETTYPE 61 // don't forget to adjust DSID_LAST_ITEM_ID below! - -//======================================================================== -//= item range. Adjust this if you introduce new items above +// item range. Adjust this if you introduce new items above #define DSID_FIRST_ITEM_ID DSID_NAME #define DSID_LAST_ITEM_ID DSID_RESPECTRESULTSETTYPE diff --git a/dbaccess/source/ui/inc/dsmeta.hxx b/dbaccess/source/ui/inc/dsmeta.hxx index e6c40abf7d80..249dcd5cccf2 100644 --- a/dbaccess/source/ui/inc/dsmeta.hxx +++ b/dbaccess/source/ui/inc/dsmeta.hxx @@ -25,14 +25,10 @@ #include <boost/shared_ptr.hpp> -//........................................................................ namespace dbaui { -//........................................................................ - //==================================================================== - //= AutheticationMode - //==================================================================== + // AutheticationMode enum AuthenticationMode { AuthNone, @@ -40,9 +36,7 @@ namespace dbaui AuthPwd }; - //==================================================================== - //= DataSourceMetaData - //==================================================================== + // DataSourceMetaData class FeatureSet; class DataSourceMetaData_Impl; /** encapsulates meta data for a data source @@ -70,9 +64,7 @@ namespace dbaui ::boost::shared_ptr< DataSourceMetaData_Impl > m_pImpl; }; - //==================================================================== - //= FeatureSet - //==================================================================== + // FeatureSet /** can be used to ask for (UI) support for certain advanced features */ class FeatureSet @@ -96,13 +88,11 @@ namespace dbaui ::std::set< ItemID > m_aContent; }; - //-------------------------------------------------------------------- inline bool FeatureSet::supportsGeneratedValues() const { return has( DSID_AUTORETRIEVEENABLED ); } - //-------------------------------------------------------------------- inline bool FeatureSet::supportsAnySpecialSetting() const { return has( DSID_SQL92CHECK ) @@ -126,9 +116,7 @@ namespace dbaui ; } -//........................................................................ } // namespace dbaui -//........................................................................ #endif // DBACCESS_DSMETA_HXX diff --git a/dbaccess/source/ui/inc/exsrcbrw.hxx b/dbaccess/source/ui/inc/exsrcbrw.hxx index 0c98ce481316..817e077fd982 100644 --- a/dbaccess/source/ui/inc/exsrcbrw.hxx +++ b/dbaccess/source/ui/inc/exsrcbrw.hxx @@ -25,9 +25,7 @@ #include <comphelper/uno3.hxx> #include <cppuhelper/implbase2.hxx> -//============================================================================== -//= SbaExternalSourceBrowser -//============================================================================== +// SbaExternalSourceBrowser namespace dbaui { diff --git a/dbaccess/source/ui/inc/formadapter.hxx b/dbaccess/source/ui/inc/formadapter.hxx index 3101068a1e4c..88f694e07c76 100644 --- a/dbaccess/source/ui/inc/formadapter.hxx +++ b/dbaccess/source/ui/inc/formadapter.hxx @@ -62,9 +62,7 @@ namespace dbaui { - //================================================================== // SbaXFormAdapter - //================================================================== typedef ::cppu::WeakImplHelper12< ::com::sun::star::sdbc::XResultSetMetaDataSupplier , ::com::sun::star::sdb::XResultSetAccess diff --git a/dbaccess/source/ui/inc/imageprovider.hxx b/dbaccess/source/ui/inc/imageprovider.hxx index a5d7ba09b270..0e047041cf43 100644 --- a/dbaccess/source/ui/inc/imageprovider.hxx +++ b/dbaccess/source/ui/inc/imageprovider.hxx @@ -28,17 +28,13 @@ #include <tools/string.hxx> #include <boost/shared_ptr.hpp> -//........................................................................ namespace dbaui { -//........................................................................ // for convenience of our clients namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject; - //==================================================================== - //= ImageProvider - //==================================================================== + // ImageProvider struct ImageProvider_Data; /** provides images for database objects such as tables, queries, forms, reports ... @@ -139,9 +135,7 @@ namespace dbaui Image getDatabaseImage(); }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // DBACCESS_IMAGEPROVIDER_HXX diff --git a/dbaccess/source/ui/inc/indexcollection.hxx b/dbaccess/source/ui/inc/indexcollection.hxx index e741fc65e35e..e31039a769f4 100644 --- a/dbaccess/source/ui/inc/indexcollection.hxx +++ b/dbaccess/source/ui/inc/indexcollection.hxx @@ -25,14 +25,10 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include "indexes.hxx" -//...................................................................... namespace dbaui { -//...................................................................... - //================================================================== - //= OIndexCollection - //================================================================== + // OIndexCollection class OIndexCollection { protected: @@ -100,10 +96,7 @@ namespace dbaui void implFillIndexInfo(OIndex& _rIndex) SAL_THROW((::com::sun::star::uno::Exception)); }; - -//...................................................................... } // namespace dbaui -//...................................................................... #endif // _DBAUI_INDEXCOLLECTION_HXX_ diff --git a/dbaccess/source/ui/inc/indexdialog.hxx b/dbaccess/source/ui/inc/indexdialog.hxx index ddb467152c73..fd845760c591 100644 --- a/dbaccess/source/ui/inc/indexdialog.hxx +++ b/dbaccess/source/ui/inc/indexdialog.hxx @@ -34,14 +34,10 @@ #include "indexes.hxx" #include <dbaccess/ToolBoxHelper.hxx> -//...................................................................... namespace dbaui { -//...................................................................... - //================================================================== - //= DbaIndexList - //================================================================== + // DbaIndexList class DbaIndexList : public SvTreeListBox { protected: @@ -78,9 +74,7 @@ namespace dbaui using SvTreeListBox::Select; }; - //================================================================== - //= DbaIndexDialog - //================================================================== + // DbaIndexDialog class IndexFieldsControl; class OIndexCollection; class DbaIndexDialog : public ModalDialog, @@ -167,9 +161,7 @@ namespace dbaui void checkControls(); }; -//...................................................................... } // namespace dbaui -//...................................................................... #endif // _DBAUI_INDEXDIALOG_HXX_ diff --git a/dbaccess/source/ui/inc/indexes.hxx b/dbaccess/source/ui/inc/indexes.hxx index d215cfaceabd..abc3a0b418f5 100644 --- a/dbaccess/source/ui/inc/indexes.hxx +++ b/dbaccess/source/ui/inc/indexes.hxx @@ -23,13 +23,9 @@ #include <tools/string.hxx> #include <comphelper/stl_types.hxx> -//...................................................................... namespace dbaui { -//...................................................................... - //================================================================== - //= OIndexField - //================================================================== + // OIndexField struct OIndexField { String sFieldName; @@ -40,9 +36,7 @@ namespace dbaui DECLARE_STL_VECTOR( OIndexField, IndexFields ); - //================================================================== - //= OIndex - //================================================================== + // OIndex struct GrantIndexAccess { friend class OIndexCollection; @@ -50,7 +44,6 @@ namespace dbaui GrantIndexAccess() { } }; - //.................................................................. struct OIndex { protected: @@ -80,16 +73,13 @@ namespace dbaui void flagAsNew(const GrantIndexAccess&) { sOriginalName = OUString(); } void flagAsCommitted(const GrantIndexAccess&) { sOriginalName = sName; } - private: OIndex(); // not implemented }; DECLARE_STL_VECTOR( OIndex, Indexes ); -//...................................................................... } // namespace dbaui -//...................................................................... #endif // _DBAUI_INDEXES_HXX_ diff --git a/dbaccess/source/ui/inc/indexfieldscontrol.hxx b/dbaccess/source/ui/inc/indexfieldscontrol.hxx index 7f4dd8c61655..4465b3fc39ee 100644 --- a/dbaccess/source/ui/inc/indexfieldscontrol.hxx +++ b/dbaccess/source/ui/inc/indexfieldscontrol.hxx @@ -25,14 +25,10 @@ #include "indexcollection.hxx" #include <com/sun/star/uno/Sequence.hxx> -//...................................................................... namespace dbaui { -//...................................................................... - //================================================================== // IndexFieldsControl - //================================================================== class IndexFieldsControl : public ::svt::EditBrowseBox { OModuleClient m_aModuleClient; @@ -94,9 +90,7 @@ namespace dbaui using ::svt::EditBrowseBox::Init; }; -//...................................................................... } // namespace dbaui -//...................................................................... #endif // _DBAUI_INDEXFIELDSCONTROL_HXX_ diff --git a/dbaccess/source/ui/inc/linkeddocuments.hxx b/dbaccess/source/ui/inc/linkeddocuments.hxx index 7f1c5dfc72d0..1f77ed693bd2 100644 --- a/dbaccess/source/ui/inc/linkeddocuments.hxx +++ b/dbaccess/source/ui/inc/linkeddocuments.hxx @@ -35,14 +35,10 @@ #include <comphelper/namedvaluecollection.hxx> class Window; -//...................................................................... namespace dbaui { -//...................................................................... - //================================================================== - //= OLinkedDocumentsAccess - //================================================================== + // OLinkedDocumentsAccess class OLinkedDocumentsAccess { protected: @@ -122,9 +118,7 @@ namespace dbaui }; -//...................................................................... } // namespace dbaui -//...................................................................... #endif // _DBAUI_LINKEDDOCUMENTS_HXX_ diff --git a/dbaccess/source/ui/inc/listviewitems.hxx b/dbaccess/source/ui/inc/listviewitems.hxx index f9a81789921f..470695926a62 100644 --- a/dbaccess/source/ui/inc/listviewitems.hxx +++ b/dbaccess/source/ui/inc/listviewitems.hxx @@ -22,16 +22,12 @@ #include <svtools/svlbitm.hxx> -//........................................................................ namespace dbaui { -//........................................................................ #define SV_ITEM_ID_BOLDLBSTRING SV_ITEM_ID_LBOXSTRING - //==================================================================== - //= OBoldListboxString - //==================================================================== + // OBoldListboxString class OBoldListboxString : public SvLBoxString { sal_Bool m_bEmphasized; @@ -53,9 +49,7 @@ namespace dbaui void emphasize(sal_Bool _bEmphasize) { m_bEmphasized = _bEmphasize; } }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // _DBAUI_LISTVIEWITEMS_HXX_ diff --git a/dbaccess/source/ui/inc/localresaccess.hxx b/dbaccess/source/ui/inc/localresaccess.hxx index ae8c8ff7ed5a..5d5e10b51fe0 100644 --- a/dbaccess/source/ui/inc/localresaccess.hxx +++ b/dbaccess/source/ui/inc/localresaccess.hxx @@ -23,14 +23,10 @@ #include <svtools/localresaccess.hxx> #include "moduledbu.hxx" -//......................................................................... namespace dbaui { -//......................................................................... -//========================================================================= -//= LocalResourceAccess -//========================================================================= +// LocalResourceAccess /** helper class for acessing local resources */ typedef ::svt::OLocalResourceAccess LRA_Base; @@ -44,9 +40,7 @@ public: } }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_LOCALRESACCESS_HXX_ diff --git a/dbaccess/source/ui/inc/marktree.hxx b/dbaccess/source/ui/inc/marktree.hxx index 05dc9e85b77d..1c6f19811f0d 100644 --- a/dbaccess/source/ui/inc/marktree.hxx +++ b/dbaccess/source/ui/inc/marktree.hxx @@ -24,15 +24,10 @@ #include "svtools/svlbitm.hxx" - -//......................................................................... namespace dbaui { -//......................................................................... -//======================================================================== -//= OMarkableTreeListBox -//======================================================================== +// OMarkableTreeListBox /** a tree list box where all entries can be marked (with a checkbox) and unmarked. In addition, inner nodes know a third state which applies if some, but not all of their descendants are marked. @@ -65,9 +60,7 @@ private: void InitButtonData(); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_MARKTREE_HXX_ diff --git a/dbaccess/source/ui/inc/moduledbu.hxx b/dbaccess/source/ui/inc/moduledbu.hxx index 3d34259e964a..49e09e73511a 100644 --- a/dbaccess/source/ui/inc/moduledbu.hxx +++ b/dbaccess/source/ui/inc/moduledbu.hxx @@ -25,14 +25,10 @@ class ResMgr; -//......................................................................... namespace dbaui { -//......................................................................... -//========================================================================= -//= OModule -//========================================================================= +// OModule class OModuleImpl; class OModule { @@ -64,9 +60,7 @@ private: static void ensureImpl(); }; -//========================================================================= -//= OModuleClient -//========================================================================= +// OModuleClient /** base class for objects which uses any global module-specific resources */ class OModuleClient @@ -76,9 +70,7 @@ public: ~OModuleClient() { OModule::revokeClient(); } }; -//========================================================================= -//= ModuleRes -//========================================================================= +// ModuleRes /** specialized ResId, using the resource manager provided by the global module */ class ModuleRes : public ::ResId @@ -87,9 +79,7 @@ public: ModuleRes(sal_uInt16 _nId) : ResId(_nId, *OModule::getResManager()) { } }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_MODULE_DBU_HXX_ diff --git a/dbaccess/source/ui/inc/objectnamecheck.hxx b/dbaccess/source/ui/inc/objectnamecheck.hxx index 8f834ebef82b..858d26de40b2 100644 --- a/dbaccess/source/ui/inc/objectnamecheck.hxx +++ b/dbaccess/source/ui/inc/objectnamecheck.hxx @@ -24,14 +24,10 @@ namespace dbtools { class SQLExceptionInfo; } -//........................................................................ namespace dbaui { -//........................................................................ - //==================================================================== - //= IObjectNameCheck - //==================================================================== + // IObjectNameCheck /** interface encapsulating the check for the validity of an object name */ class IObjectNameCheck @@ -57,9 +53,7 @@ namespace dbaui virtual ~IObjectNameCheck() { } }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // DBACCESS_SOURCE_UI_INC_OBJECTNAMECHECK_HXX diff --git a/dbaccess/source/ui/inc/opendoccontrols.hxx b/dbaccess/source/ui/inc/opendoccontrols.hxx index 14406c8b7be9..63501cb90a8c 100644 --- a/dbaccess/source/ui/inc/opendoccontrols.hxx +++ b/dbaccess/source/ui/inc/opendoccontrols.hxx @@ -25,14 +25,10 @@ #include <rtl/ustring.hxx> #include <map> -//........................................................................ namespace dbaui { -//........................................................................ - //==================================================================== - //= OpenDocumentButton - //==================================================================== + // OpenDocumentButton /** a button which can be used to open a document The text of the button is the same as for the "Open" command in the application @@ -50,9 +46,7 @@ namespace dbaui void impl_init( const sal_Char* _pAsciiModuleName ); }; - //==================================================================== - //= OpenDocumentListBox - //==================================================================== + // OpenDocumentListBox class OpenDocumentListBox : public ListBox { private: @@ -77,9 +71,7 @@ namespace dbaui void impl_init( const sal_Char* _pAsciiModuleName ); }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // DBACCESS_SOURCE_UI_INC_OPENDOCCONTROLS_HXX diff --git a/dbaccess/source/ui/inc/paramdialog.hxx b/dbaccess/source/ui/inc/paramdialog.hxx index b53887770420..b19b84b17f92 100644 --- a/dbaccess/source/ui/inc/paramdialog.hxx +++ b/dbaccess/source/ui/inc/paramdialog.hxx @@ -42,14 +42,10 @@ namespace connectivity class OSQLParseNode; } -//......................................................................... namespace dbaui { -//......................................................................... - //================================================================== - //= OParameterDialog - //================================================================== + // OParameterDialog class OParameterDialog :public ModalDialog ,public ::svxform::OParseContextClient @@ -94,7 +90,6 @@ namespace dbaui ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > getValues() const { return m_aFinalValues; } - protected: void Construct(); @@ -108,9 +103,7 @@ namespace dbaui DECL_LINK(OnValueLoseFocus, Control*); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_PARAMDIALOG_HXX_ diff --git a/dbaccess/source/ui/inc/propertysetitem.hxx b/dbaccess/source/ui/inc/propertysetitem.hxx index 82b47ae48876..f10d46f1901a 100644 --- a/dbaccess/source/ui/inc/propertysetitem.hxx +++ b/dbaccess/source/ui/inc/propertysetitem.hxx @@ -23,14 +23,10 @@ #include <svl/poolitem.hxx> #include <com/sun/star/beans/XPropertySet.hpp> -//......................................................................... namespace dbaui { -//......................................................................... - //========================================================================= - //= OPropertySetItem - //========================================================================= + // OPropertySetItem /** <type>SfxPoolItem</type> which transports a XPropertySet */ class OPropertySetItem : public SfxPoolItem @@ -51,9 +47,7 @@ namespace dbaui getPropertySet() const { return m_xSet; } }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_PROPERTYSETITEM_HXX_ diff --git a/dbaccess/source/ui/inc/propertystorage.hxx b/dbaccess/source/ui/inc/propertystorage.hxx index 66daa0be0320..3bf8350961ff 100644 --- a/dbaccess/source/ui/inc/propertystorage.hxx +++ b/dbaccess/source/ui/inc/propertystorage.hxx @@ -29,14 +29,10 @@ class SfxItemSet; -//........................................................................ namespace dbaui { -//........................................................................ - //==================================================================== - //= PropertyStorage - //==================================================================== + // PropertyStorage class SAL_NO_VTABLE PropertyStorage { public: @@ -49,9 +45,7 @@ namespace dbaui typedef ::boost::shared_ptr< PropertyStorage > PPropertyStorage; typedef ::std::map< sal_Int32, PPropertyStorage > PropertyValues; - //==================================================================== - //= SetItemPropertyStorage - //==================================================================== + // SetItemPropertyStorage typedef sal_uInt16 ItemId; /** a PropertyStorage implementation which stores the value in an item set @@ -77,9 +71,7 @@ namespace dbaui const ItemId m_nItemID; }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // PROPERTYSTORAGE_HXX diff --git a/dbaccess/source/ui/inc/querycontainerwindow.hxx b/dbaccess/source/ui/inc/querycontainerwindow.hxx index e052f9a39c33..d1126b4d3309 100644 --- a/dbaccess/source/ui/inc/querycontainerwindow.hxx +++ b/dbaccess/source/ui/inc/querycontainerwindow.hxx @@ -27,14 +27,10 @@ #include "QueryViewSwitch.hxx" #include <vcl/dockwin.hxx> -//......................................................................... namespace dbaui { -//......................................................................... - //===================================================================== - //= OBeamer - //===================================================================== + // OBeamer // tempoaray class until the beamer is implemented class OBeamer : public DockingWindow { @@ -42,9 +38,7 @@ namespace dbaui OBeamer(Window* _pParent) : DockingWindow(_pParent,0){} }; - //===================================================================== - //= OQueryContainerWindow - //===================================================================== + // OQueryContainerWindow class OQueryContainerWindow : public ODataView { OQueryViewSwitch* m_pViewSwitch; @@ -107,9 +101,7 @@ namespace dbaui }; // end of temp classes -//......................................................................... } // namespace dbaui -//......................................................................... #endif // DBAUI_QUERYCONTAINERWINDOW_HXX diff --git a/dbaccess/source/ui/inc/queryfilter.hxx b/dbaccess/source/ui/inc/queryfilter.hxx index fb0e0febf1bd..e87856d01fc8 100644 --- a/dbaccess/source/ui/inc/queryfilter.hxx +++ b/dbaccess/source/ui/inc/queryfilter.hxx @@ -60,9 +60,7 @@ namespace com } } } -//================================================================== // DlgFilterCrit -//================================================================== namespace dbaui { class DlgFilterCrit :public ModalDialog @@ -132,5 +130,4 @@ namespace dbaui #endif // DBAUI_QUERYFILTER_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/queryorder.hxx b/dbaccess/source/ui/inc/queryorder.hxx index 021fd64690bc..9b32a4413275 100644 --- a/dbaccess/source/ui/inc/queryorder.hxx +++ b/dbaccess/source/ui/inc/queryorder.hxx @@ -53,9 +53,7 @@ namespace com } } -//================================================================== // DlgOrderCrit -//================================================================== namespace dbaui { class DlgOrderCrit : public ModalDialog @@ -83,7 +81,6 @@ namespace dbaui ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xColumns; ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection; - ListBox* m_aColumnList[DOG_ROWS]; ListBox* m_aValueList[DOG_ROWS]; @@ -108,5 +105,4 @@ namespace dbaui } #endif // DBAUI_QUERYORDER_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/sbagrid.hxx b/dbaccess/source/ui/inc/sbagrid.hxx index d930cc08cf86..da1898f02faa 100644 --- a/dbaccess/source/ui/inc/sbagrid.hxx +++ b/dbaccess/source/ui/inc/sbagrid.hxx @@ -43,7 +43,6 @@ namespace com { namespace sun { namespace star { namespace dbaui { - //------------------------------------------------------------------ struct SbaURLCompare : public ::std::binary_function< ::com::sun::star::util::URL, ::com::sun::star::util::URL, bool> { bool operator() (const ::com::sun::star::util::URL& x, const ::com::sun::star::util::URL& y) const {return x.Complete == y.Complete ? true : false;} @@ -53,9 +52,7 @@ namespace dbaui { sal_Int32 operator() (const ::com::sun::star::util::URL& x) const {return x.Complete.hashCode();} }; - //================================================================== // SbaXGridControl - //================================================================== class SbaXStatusMultiplexer; class SbaXGridControl @@ -100,9 +97,7 @@ namespace dbaui virtual FmXGridPeer* imp_CreatePeer(Window* pParent); }; - //================================================================== // SbaXGridPeer - //================================================================== class SbaXGridPeer :public FmXGridPeer @@ -172,9 +167,7 @@ namespace dbaui MapDispatchToBool m_aDispatchStates; }; - //================================================================== // SbaGridHeader - //================================================================== class SbaGridHeader :public FmGridHeader @@ -202,9 +195,7 @@ namespace dbaui using FmGridHeader::StartDrag; }; - // ========================================================================= // interfaces for communication between the vcl grid control and a controller - // ------------------------------------------------------------------------- class SbaGridListener { public: @@ -220,10 +211,7 @@ namespace dbaui ~SbaGridListener() {} }; - //================================================================== // SbaGridControl - //================================================================== - //------------------------------------------------------------------ class SbaGridControl : public FmGridControl { friend class SbaGridHeader; @@ -279,7 +267,6 @@ namespace dbaui */ void CopySelectedRowsToClipboard(); - protected: // DragSourceHelper overridables virtual void StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ); diff --git a/dbaccess/source/ui/inc/sbamultiplex.hxx b/dbaccess/source/ui/inc/sbamultiplex.hxx index 9deadd748ec1..8e9c4fbf295f 100644 --- a/dbaccess/source/ui/inc/sbamultiplex.hxx +++ b/dbaccess/source/ui/inc/sbamultiplex.hxx @@ -47,7 +47,6 @@ namespace dbaui { - //------------------------------------------------------------------ // TODO : replace this class if MM provides an WeakSubObject in cppu class OSbaWeakSubObject : public ::cppu::OWeakObject { @@ -61,7 +60,6 @@ namespace dbaui virtual void SAL_CALL release() throw() { m_rParent.release(); } }; - //------------------------------------------------------------------ // declaration of a listener multiplexer class #define BEGIN_DECLARE_LISTENER_MULTIPLEXER(classname, listenerclass) \ class classname \ @@ -79,26 +77,22 @@ namespace dbaui /* ::com::sun::star::lang::XEventListener */ \ virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw(::com::sun::star::uno::RuntimeException); \ - #define DECLARE_MULTIPLEXER_VOID_METHOD(methodname, eventtype) \ virtual void SAL_CALL methodname(const eventtype& e) throw (::com::sun::star::uno::RuntimeException); \ #define DECLARE_MULTIPLEXER_BOOL_METHOD(methodname, eventtype) \ virtual sal_Bool SAL_CALL methodname(const eventtype& e) throw (::com::sun::star::uno::RuntimeException); \ - #define END_DECLARE_LISTENER_MULTIPLEXER() \ /* resolve ambiguity : both OWeakObject and OInterfaceContainerHelper have these memory operators */ \ void * SAL_CALL operator new( size_t size ) throw() { return OSbaWeakSubObject::operator new(size); } \ void SAL_CALL operator delete( void * p ) throw() { OSbaWeakSubObject::operator delete(p); } \ }; \ - //------------------------------------------------------------------ // implementation of a listener multiplexer class #define IMPLEMENT_LISTENER_MULTIPLEXER_CORE(classname, listenerclass) \ \ - /*................................................................*/ \ classname::classname(::cppu::OWeakObject& rSource, ::osl::Mutex& _rMutex) \ :OSbaWeakSubObject(rSource) \ ,OInterfaceContainerHelper(_rMutex) \ @@ -118,12 +112,10 @@ namespace dbaui \ return aReturn; \ } \ - /*................................................................*/ \ void SAL_CALL classname::disposing(const ::com::sun::star::lang::EventObject& ) throw(::com::sun::star::uno::RuntimeException)\ { \ } \ - #define IMPLEMENT_LISTENER_MULTIPLEXER_VOID_METHOD(classname, listenerclass, methodname, eventtype) \ void SAL_CALL classname::methodname(const eventtype& e) throw (::com::sun::star::uno::RuntimeException) \ { \ @@ -135,7 +127,6 @@ namespace dbaui } \ #define IMPLEMENT_LISTENER_MULTIPLEXER_BOOL_METHOD(classname, listenerclass, methodname, eventtype) \ - /*................................................................*/ \ sal_Bool SAL_CALL classname::methodname(const eventtype& e) throw (::com::sun::star::uno::RuntimeException) \ { \ eventtype aMulti(e); \ @@ -147,10 +138,8 @@ namespace dbaui return bResult; \ } \ - //------------------------------------------------------------------ // helper for classes which do event multiplexing #define IMPLEMENT_LISTENER_ADMINISTRATION(classname, listenernamespace, listenerdesc, multiplexer, braodcasterclass, broadcaster) \ - /*................................................................*/ \ void SAL_CALL classname::add##listenerdesc(const ::com::sun::star::uno::Reference< ::com::sun::star::listenernamespace::X##listenerdesc >& l) throw(::com::sun::star::uno::RuntimeException)\ { \ multiplexer.addInterface(l); \ @@ -161,7 +150,6 @@ namespace dbaui xBroadcaster->add##listenerdesc(&multiplexer); \ } \ } \ - /*................................................................*/ \ void SAL_CALL classname::remove##listenerdesc(const ::com::sun::star::uno::Reference< ::com::sun::star::listenernamespace::X##listenerdesc >& l) throw(::com::sun::star::uno::RuntimeException)\ { \ if (multiplexer.getLength() == 1) \ @@ -173,7 +161,6 @@ namespace dbaui multiplexer.removeInterface(l); \ } \ - #define STOP_MULTIPLEXER_LISTENING(listenerdesc, multiplexer, braodcasterclass, broadcaster) \ if (multiplexer.getLength()) \ { \ @@ -190,9 +177,6 @@ namespace dbaui xBroadcaster->add##listenerdesc(&multiplexer); \ } \ - - - //------------------------------------------------------------------ // declaration of property listener multiplexers // (with support for specialized and unspecialized property listeners) @@ -231,11 +215,8 @@ namespace dbaui void Notify(::cppu::OInterfaceContainerHelper& rListeners, const eventtype& e); \ }; \ - - //------------------------------------------------------------------ // implementation of property listener multiplexers #define IMPLEMENT_PROPERTY_MULTIPLEXER(classname, listenerclass, methodname, eventtype, exceptions) \ - /*................................................................*/ \ classname::classname(::cppu::OWeakObject& rSource, ::osl::Mutex& rMutex) \ :OSbaWeakSubObject(rSource) \ ,m_aListeners(rMutex) \ @@ -255,7 +236,6 @@ namespace dbaui \ return aReturn; \ } \ - /*................................................................*/ \ void SAL_CALL classname::disposing(const ::com::sun::star::lang::EventObject& ) throw(::com::sun::star::uno::RuntimeException)\ { \ } \ @@ -309,10 +289,8 @@ namespace dbaui static_cast< listenerclass*>(aIt.next())->methodname(aMulti); \ } \ - //------------------------------------------------------------------ // helper for classes which do property event multiplexing #define IMPLEMENT_PROPERTY_LISTENER_ADMINISTRATION(classname, listenerdesc, multiplexer, braodcasterclass, broadcaster) \ - /*................................................................*/ \ void SAL_CALL classname::add##listenerdesc(const OUString& rName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::X##listenerdesc >& l ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)\ { \ multiplexer.addInterface(rName, l); \ @@ -323,7 +301,6 @@ namespace dbaui xBroadcaster->add##listenerdesc(OUString(), &multiplexer); \ } \ } \ - /*................................................................*/ \ void SAL_CALL classname::remove##listenerdesc(const OUString& rName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::X##listenerdesc >& l ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)\ { \ if (multiplexer.getOverallLen() == 1) \ @@ -351,11 +328,7 @@ namespace dbaui xBroadcaster->add##listenerdesc(OUString(), &multiplexer); \ } \ - - - //================================================================== // some listener multiplexers - //================================================================== // ::com::sun::star::frame::XStatusListener BEGIN_DECLARE_LISTENER_MULTIPLEXER(SbaXStatusMultiplexer, ::com::sun::star::frame::XStatusListener) DECLARE_MULTIPLEXER_VOID_METHOD(statusChanged, ::com::sun::star::frame::FeatureStateEvent) diff --git a/dbaccess/source/ui/inc/singledoccontroller.hxx b/dbaccess/source/ui/inc/singledoccontroller.hxx index f4b1e8327fa1..eaa51b7b4c44 100644 --- a/dbaccess/source/ui/inc/singledoccontroller.hxx +++ b/dbaccess/source/ui/inc/singledoccontroller.hxx @@ -29,14 +29,10 @@ class SfxUndoAction; class SfxUndoManager; -//...................................................................................................................... namespace dbaui { -//...................................................................................................................... - //================================================================================================================== - //= OSingleDocumentController - //================================================================================================================== + // OSingleDocumentController struct OSingleDocumentController_Data; typedef ::cppu::ImplInheritanceHelper1 < DBSubComponentController , ::com::sun::star::document::XUndoManagerSupplier @@ -77,9 +73,7 @@ namespace dbaui ::std::auto_ptr< OSingleDocumentController_Data > m_pData; }; -//...................................................................................................................... } // namespace dbaui -//...................................................................................................................... #endif // DBAUI_SINGLEDOCCONTROLLER_HXX diff --git a/dbaccess/source/ui/inc/sqlmessage.hxx b/dbaccess/source/ui/inc/sqlmessage.hxx index 42c96a6f4452..a1926e9250f5 100644 --- a/dbaccess/source/ui/inc/sqlmessage.hxx +++ b/dbaccess/source/ui/inc/sqlmessage.hxx @@ -38,14 +38,10 @@ namespace com { namespace sun { namespace star { } } } } -//......................................................................... namespace dbaui { -//......................................................................... -//================================================================== // OSQLMessageBox -//================================================================== struct SQLMessageBox_Impl; class OSQLMessageBox : public ButtonDialog { @@ -107,9 +103,7 @@ private: void impl_addDetailsButton(); }; -//================================================================== // OSQLWarningBox -//================================================================== class OSQLWarningBox : public OSQLMessageBox { public: @@ -119,9 +113,7 @@ public: const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo = NULL ); }; -//================================================================== // OSQLErrorBox -//================================================================== class OSQLErrorBox : public OSQLMessageBox { public: @@ -131,9 +123,7 @@ public: const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo = NULL ); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_SQLMESSAGE_HXX_ diff --git a/dbaccess/source/ui/inc/stringlistitem.hxx b/dbaccess/source/ui/inc/stringlistitem.hxx index e3c235fd317d..e1e34e76dd26 100644 --- a/dbaccess/source/ui/inc/stringlistitem.hxx +++ b/dbaccess/source/ui/inc/stringlistitem.hxx @@ -25,14 +25,10 @@ #include <com/sun/star/uno/Sequence.hxx> #include <rtl/ustring.hxx> -//......................................................................... namespace dbaui { -//......................................................................... -//========================================================================= -//= OStringListItem -//========================================================================= +// OStringListItem /** <type>SfxPoolItem</type> which transports a sequence of <type scope="rtl">OUString</type>'s */ class OStringListItem : public SfxPoolItem @@ -50,9 +46,7 @@ public: ::com::sun::star::uno::Sequence< OUString > getList() const { return m_aList; } }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_STRINGLISTITEM_HXX_ diff --git a/dbaccess/source/ui/inc/tabletree.hxx b/dbaccess/source/ui/inc/tabletree.hxx index 0632169a6386..d6edecd755c1 100644 --- a/dbaccess/source/ui/inc/tabletree.hxx +++ b/dbaccess/source/ui/inc/tabletree.hxx @@ -31,16 +31,12 @@ #include <memory> -//......................................................................... namespace dbaui { -//......................................................................... class ImageProvider; -//======================================================================== -//= OTableTreeListBox -//======================================================================== +// OTableTreeListBox class OTableTreeListBox : public OMarkableTreeListBox { protected: @@ -180,9 +176,7 @@ protected: }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_TABLETREE_HXX_ diff --git a/dbaccess/source/ui/inc/textconnectionsettings.hxx b/dbaccess/source/ui/inc/textconnectionsettings.hxx index 96a35c81a6e5..ff9b6243fb12 100644 --- a/dbaccess/source/ui/inc/textconnectionsettings.hxx +++ b/dbaccess/source/ui/inc/textconnectionsettings.hxx @@ -28,16 +28,12 @@ #include <memory> class SfxItemSet; -//........................................................................ namespace dbaui { -//........................................................................ class OTextConnectionHelper; - //==================================================================== - //= TextConnectionSettingsDialog - //==================================================================== + // TextConnectionSettingsDialog class TextConnectionSettingsDialog : public ModalDialog { public: @@ -61,9 +57,7 @@ namespace dbaui DECL_LINK( OnOK, PushButton* ); }; -//........................................................................ } // namespace dbaui -//........................................................................ #endif // TEXTCONNECTIONSETTINGS_HXX diff --git a/dbaccess/source/ui/inc/toolboxcontroller.hxx b/dbaccess/source/ui/inc/toolboxcontroller.hxx index f360731da0c7..e28715dd2a9b 100644 --- a/dbaccess/source/ui/inc/toolboxcontroller.hxx +++ b/dbaccess/source/ui/inc/toolboxcontroller.hxx @@ -58,9 +58,7 @@ namespace dbaui // XToolbarController virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL createPopupWindow() throw (::com::sun::star::uno::RuntimeException); }; -//.......................................................................... } // dbaui -//.......................................................................... #endif //DBACCESS_TOOLBOXCONTROLLER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/undosqledit.hxx b/dbaccess/source/ui/inc/undosqledit.hxx index 85ba09c13e3e..2d913de33dfe 100644 --- a/dbaccess/source/ui/inc/undosqledit.hxx +++ b/dbaccess/source/ui/inc/undosqledit.hxx @@ -25,9 +25,7 @@ namespace dbaui { class OSqlEdit; - // ================================================================================================ // OSqlEditUndoAct - Undo-class for changing sql text - //------------------------------------------------------------------------ class OSqlEditUndoAct : public OCommentUndoAction { protected: @@ -46,5 +44,4 @@ namespace dbaui } #endif // DBAUI_UNDOSQLEDIT_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/inc/unoadmin.hxx b/dbaccess/source/ui/inc/unoadmin.hxx index 8364fa57c5b6..dcc67c6d9bc7 100644 --- a/dbaccess/source/ui/inc/unoadmin.hxx +++ b/dbaccess/source/ui/inc/unoadmin.hxx @@ -29,14 +29,10 @@ class SfxItemSet; class SfxItemPool; class SfxPoolItem; -//......................................................................... namespace dbaui { -//......................................................................... -//========================================================================= -//= ODatabaseAdministrationDialog -//========================================================================= +// ODatabaseAdministrationDialog typedef ::svt::OGenericUnoDialog ODatabaseAdministrationDialogBase; class ODatabaseAdministrationDialog :public ODatabaseAdministrationDialogBase @@ -61,9 +57,7 @@ protected: virtual void implInitialize(const com::sun::star::uno::Any& _rValue); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_UNOADMIN_ diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx index 7a61ec19c29b..44487a5db7d4 100644 --- a/dbaccess/source/ui/inc/unodatbr.hxx +++ b/dbaccess/source/ui/inc/unodatbr.hxx @@ -43,7 +43,6 @@ #include "TableCopyHelper.hxx" #include "commontypes.hxx" -// ========================================================================= class SvTreeListEntry; class Splitter; struct SvSortData; @@ -51,16 +50,13 @@ struct SvSortData; namespace com { namespace sun{ namespace star { namespace container { class XNameContainer; } } } } class SvTreeList; -// ......................................................................... namespace dbaui { -// ......................................................................... class DBTreeView; struct DBTreeEditedEntry; class ImageProvider; - // ===================================================================== typedef ::cppu::ImplHelper5 < ::com::sun::star::frame::XStatusListener , ::com::sun::star::view::XSelectionSupplier , ::com::sun::star::document::XScriptInvocationContext @@ -75,12 +71,10 @@ namespace dbaui { protected: - // --------------------------- ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XCollator > m_xCollator; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xCurrentFrameParent; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > m_xMainToolbar; - // --------------------------- struct ExternalFeature { ::com::sun::star::util::URL aURL; @@ -122,7 +116,6 @@ namespace dbaui ::boost::optional< bool > m_aDocScriptSupport; // relevant if and only if we are associated with exactly one DBDoc - virtual OUString getPrivateTitle( ) const; // attribute access public: @@ -482,9 +475,7 @@ namespace dbaui void impl_sanitizeRowSetClauses_nothrow(); }; -// ......................................................................... } // namespace dbaui -// ......................................................................... #endif // _SBA_UNODATBR_HXX_ diff --git a/dbaccess/source/ui/inc/unosqlmessage.hxx b/dbaccess/source/ui/inc/unosqlmessage.hxx index 4b32fa437a93..0a88aa53bfaa 100644 --- a/dbaccess/source/ui/inc/unosqlmessage.hxx +++ b/dbaccess/source/ui/inc/unosqlmessage.hxx @@ -22,10 +22,8 @@ #include <svtools/genericunodialog.hxx> #include "moduledbu.hxx" -//......................................................................... namespace dbaui { -//......................................................................... typedef ::svt::OGenericUnoDialog OSQLMessageDialogBase; class OSQLMessageDialog @@ -74,9 +72,7 @@ protected: virtual Dialog* createDialog(Window* _pParent); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_UNOSQLMESSAGE_HXX_ diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index 58799dee088a..ba82f993d8c0 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "DExport.hxx" #include "moduledbu.hxx" @@ -80,9 +79,7 @@ using namespace ::com::sun::star::awt; namespace CopyTableOperation = ::com::sun::star::sdb::application::CopyTableOperation; -// ========================================================================== // ODatabaseExport -// ========================================================================== DBG_NAME(ODatabaseExport) ODatabaseExport::ODatabaseExport(sal_Int32 nRows, const TPositions &_rColumnPositions, @@ -142,7 +139,7 @@ ODatabaseExport::ODatabaseExport(sal_Int32 nRows, SetColumnTypes(pList,_pInfoMap); } -//--------------------------------------------------------------------------- + ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection, const Reference< XNumberFormatter >& _rxNumberF, const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext, @@ -285,7 +282,7 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection, m_pTypeInfo = TOTypeInfoSP(new OTypeInfo()); SetColumnTypes(pList,_pInfoMap); } -//--------------------------------------------------------------------------- + ODatabaseExport::~ODatabaseExport() { DBG_DTOR(ODatabaseExport,NULL); @@ -298,7 +295,7 @@ ODatabaseExport::~ODatabaseExport() m_vDestVector.clear(); m_aDestColumns.clear(); } -// ----------------------------------------------------------------------------- + void ODatabaseExport::insertValueIntoColumn() { SAL_INFO("dbaccess.ui", "ODatabaseExport::insertValueIntoColumn" ); @@ -413,7 +410,7 @@ void ODatabaseExport::insertValueIntoColumn() } } } -// ----------------------------------------------------------------------------- + sal_Int16 ODatabaseExport::CheckString(const String& aCheckToken, sal_Int16 _nOldNumberFormat) { SAL_INFO("dbaccess.ui", "ODatabaseExport::CheckString" ); @@ -561,7 +558,7 @@ sal_Int16 ODatabaseExport::CheckString(const String& aCheckToken, sal_Int16 _nOl return nNumberFormat; } -// ----------------------------------------------------------------------------- + void ODatabaseExport::SetColumnTypes(const TColumnVector* _pList,const OTypeInfoMap* _pInfoMap) { SAL_INFO("dbaccess.ui", "ODatabaseExport::SetColumnTypes" ); @@ -634,7 +631,7 @@ void ODatabaseExport::SetColumnTypes(const TColumnVector* _pList,const OTypeInfo } } } -// ----------------------------------------------------------------------------- + void ODatabaseExport::CreateDefaultColumn(const OUString& _rColumnName) { SAL_INFO("dbaccess.ui", "ODatabaseExport::CreateDefaultColumn" ); @@ -687,7 +684,7 @@ void ODatabaseExport::CreateDefaultColumn(const OUString& _rColumnName) m_vDestVector.push_back(m_aDestColumns.insert(TColumns::value_type(aAlias,pField)).first); } -// ----------------------------------------------------------------------------- + sal_Bool ODatabaseExport::createRowSet() { SAL_INFO("dbaccess.ui", "ODatabaseExport::createRowSet" ); @@ -696,7 +693,7 @@ sal_Bool ODatabaseExport::createRowSet() return m_pUpdateHelper.get() != NULL; } -// ----------------------------------------------------------------------------- + sal_Bool ODatabaseExport::executeWizard(const OUString& _rTableName,const Any& _aTextColor,const FontDescriptor& _rFont) { SAL_INFO("dbaccess.ui", "ODatabaseExport::executeWizard" ); @@ -763,7 +760,7 @@ sal_Bool ODatabaseExport::executeWizard(const OUString& _rTableName,const Any& _ return bError; } -//--------------------------------------------------------------------------------- + void ODatabaseExport::showErrorDialog(const ::com::sun::star::sdbc::SQLException& e) { SAL_INFO("dbaccess.ui", "ODatabaseExport::showErrorDialog" ); @@ -780,7 +777,7 @@ void ODatabaseExport::showErrorDialog(const ::com::sun::star::sdbc::SQLException m_bError = sal_True; } } -// ----------------------------------------------------------------------------- + void ODatabaseExport::adjustFormat() { SAL_INFO("dbaccess.ui", "ODatabaseExport::adjustFormat" ); @@ -803,7 +800,7 @@ void ODatabaseExport::adjustFormat() eraseTokens(); } } -// ----------------------------------------------------------------------------- + void ODatabaseExport::eraseTokens() { SAL_INFO("dbaccess.ui", "ODatabaseExport::eraseTokens" ); @@ -811,7 +808,7 @@ void ODatabaseExport::eraseTokens() m_sNumToken.Erase(); m_sValToken.Erase(); } -// ----------------------------------------------------------------------------- + void ODatabaseExport::ensureFormatter() { SAL_INFO("dbaccess.ui", "ODatabaseExport::ensureFormatter" ); @@ -825,7 +822,7 @@ void ODatabaseExport::ensureFormatter() xNumberFormatSettings->getPropertyValue("NullDate") >>= m_aNullDate; } } -// ----------------------------------------------------------------------------- + Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const Reference<XDatabaseMetaData>& _xMetaData ,const Reference<XPropertySet>& _xDestTable ,const TPositions& _rvColumns) @@ -888,7 +885,5 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const R // now create,fill and execute the prepared statement return Reference< XPreparedStatement >(_xMetaData->getConnection()->prepareStatement(aSql)); } -// ----------------------------------------------------------------------------- - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx index 2938000d2063..63a6fca44189 100644 --- a/dbaccess/source/ui/misc/HtmlReader.cxx +++ b/dbaccess/source/ui/misc/HtmlReader.cxx @@ -66,11 +66,8 @@ using namespace ::com::sun::star::awt; #define DBAUI_HTML_FONTSIZES 8 // like export, HTML-Options -// ========================================================================== DBG_NAME(OHTMLReader) -// ========================================================================== // OHTMLReader -// ========================================================================== OHTMLReader::OHTMLReader(SvStream& rIn,const SharedConnection& _rxConnection, const Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext, @@ -89,7 +86,7 @@ OHTMLReader::OHTMLReader(SvStream& rIn,const SharedConnection& _rxConnection, // If the file starts with a BOM, switch to UCS2. SetSwitchToUCS2( sal_True ); } -// --------------------------------------------------------------------------- + OHTMLReader::OHTMLReader(SvStream& rIn, sal_Int32 nRows, const TPositions &_rColumnPositions, @@ -111,12 +108,12 @@ OHTMLReader::OHTMLReader(SvStream& rIn, // If the file starts with a BOM, switch to UCS2. SetSwitchToUCS2( sal_True ); } -// --------------------------------------------------------------------------- + OHTMLReader::~OHTMLReader() { DBG_DTOR(OHTMLReader,NULL); } -// --------------------------------------------------------------------------- + SvParserState OHTMLReader::CallParser() { SAL_INFO("dbaccess.ui", "OHTMLReader::CallParser" ); @@ -127,7 +124,7 @@ SvParserState OHTMLReader::CallParser() SetColumnTypes(m_pColumnList,m_pInfoMap); return m_bFoundTable ? eParseState : SVPAR_ERROR; } -// ----------------------------------------------------------------------------- + void OHTMLReader::NextToken( int nToken ) { SAL_INFO("dbaccess.ui", "OHTMLReader::NextToken" ); @@ -239,7 +236,6 @@ void OHTMLReader::NextToken( int nToken ) m_pUpdateHelper->insertRow(); } catch(SQLException& e) - ////////////////////////////////////////////////////////////////////// // handling update failure { showErrorDialog(e); @@ -297,7 +293,7 @@ void OHTMLReader::NextToken( int nToken ) } } } -// ----------------------------------------------------------------------------- + void OHTMLReader::fetchOptions() { SAL_INFO("dbaccess.ui", "OHTMLReader::fetchOptions" ); @@ -320,7 +316,7 @@ void OHTMLReader::fetchOptions() } } } -//--------------------------------------------------------------------------------- + void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal) { SAL_INFO("dbaccess.ui", "OHTMLReader::TableDataOn" ); @@ -351,7 +347,6 @@ void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal) } } -//--------------------------------------------------------------------------------- void OHTMLReader::TableFontOn(FontDescriptor& _rFont,sal_Int32 &_rTextColor) { SAL_INFO("dbaccess.ui", "OHTMLReader::TableFontOn" ); @@ -401,7 +396,7 @@ void OHTMLReader::TableFontOn(FontDescriptor& _rFont,sal_Int32 &_rTextColor) } } } -// --------------------------------------------------------------------------- + sal_Int16 OHTMLReader::GetWidthPixel( const HTMLOption& rOption ) { SAL_INFO("dbaccess.ui", "OHTMLReader::GetWidthPixel" ); @@ -423,7 +418,7 @@ sal_Int16 OHTMLReader::GetWidthPixel( const HTMLOption& rOption ) return (sal_Int16)rOption.GetNumber(); // pixel } } -// --------------------------------------------------------------------------- + sal_Bool OHTMLReader::CreateTable(int nToken) { SAL_INFO("dbaccess.ui", "OHTMLReader::CreateTable" ); @@ -534,7 +529,7 @@ sal_Bool OHTMLReader::CreateTable(int nToken) return !executeWizard(aTableName,makeAny(nTextColor),aFont) && m_xTable.is(); } -// ----------------------------------------------------------------------------- + void OHTMLReader::setTextEncoding() { SAL_INFO("dbaccess.ui", "OHTMLReader::setTextEncoding" ); @@ -543,20 +538,18 @@ void OHTMLReader::setTextEncoding() ParseMetaOptions(NULL, NULL); } -// ----------------------------------------------------------------------------- void OHTMLReader::release() { SAL_INFO("dbaccess.ui", "OHTMLReader::release" ); DBG_CHKTHIS(OHTMLReader,NULL); ReleaseRef(); } -// ----------------------------------------------------------------------------- + TypeSelectionPageFactory OHTMLReader::getTypeSelectionPageFactory() { SAL_INFO("dbaccess.ui", "OHTMLReader::getTypeSelectionPageFactory" ); DBG_CHKTHIS(OHTMLReader,NULL); return &OWizHTMLExtend::Create; } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/ModuleHelper.cxx b/dbaccess/source/ui/misc/ModuleHelper.cxx index 3d410668de78..5dfbbe533d03 100644 --- a/dbaccess/source/ui/misc/ModuleHelper.cxx +++ b/dbaccess/source/ui/misc/ModuleHelper.cxx @@ -19,17 +19,13 @@ #include "moduledbu.hxx" -//......................................................................... namespace dbaui { -//......................................................................... OModule& getGlobalDbuModule() { static OModule s_aModule("dbu"); return s_aModule; } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx index 4ae0b4561fc0..91293255de57 100644 --- a/dbaccess/source/ui/misc/RowSetDrop.cxx +++ b/dbaccess/source/ui/misc/RowSetDrop.cxx @@ -18,7 +18,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "TokenWriter.hxx" #include <com/sun/star/sdbc/XColumnLocate.hpp> #include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp> @@ -54,7 +53,7 @@ ORowSetImportExport::ORowSetImportExport( Window* _pParent, SAL_INFO("dbaccess.ui", "ORowSetImportExport::ORowSetImportExport" ); OSL_ENSURE(_pParent,"Window can't be null!"); } -// ----------------------------------------------------------------------------- + void ORowSetImportExport::initialize() { SAL_INFO("dbaccess.ui", "ORowSetImportExport::initialize" ); @@ -94,13 +93,13 @@ void ORowSetImportExport::initialize() m_aColumnTypes.push_back(DataType::OTHER); } } -// ----------------------------------------------------------------------------- + sal_Bool ORowSetImportExport::Write() { SAL_INFO("dbaccess.ui", "ORowSetImportExport::Write" ); return sal_True; } -// ----------------------------------------------------------------------------- + sal_Bool ORowSetImportExport::Read() { SAL_INFO("dbaccess.ui", "ORowSetImportExport::Read" ); @@ -155,7 +154,7 @@ sal_Bool ORowSetImportExport::Read() } return sal_True; } -// ----------------------------------------------------------------------------- + sal_Bool ORowSetImportExport::insertNewRow() { SAL_INFO("dbaccess.ui", "ORowSetImportExport::insertNewRow" ); @@ -256,8 +255,5 @@ sal_Bool ORowSetImportExport::insertNewRow() } return sal_True; } -// ----------------------------------------------------------------------------- - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/RtfReader.cxx b/dbaccess/source/ui/misc/RtfReader.cxx index ffd20b447da1..06d94701bfe6 100644 --- a/dbaccess/source/ui/misc/RtfReader.cxx +++ b/dbaccess/source/ui/misc/RtfReader.cxx @@ -56,9 +56,7 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::awt; DBG_NAME(ORTFReader) -// ========================================================================== // ORTFReader -// ========================================================================== ORTFReader::ORTFReader( SvStream& rIn, const SharedConnection& _rxConnection, const Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF, @@ -72,7 +70,7 @@ ORTFReader::ORTFReader( SvStream& rIn, DBG_CTOR(ORTFReader,NULL); m_bAppendFirstLine = false; } -// --------------------------------------------------------------------------- + ORTFReader::ORTFReader(SvStream& rIn, sal_Int32 nRows, const TPositions &_rColumnPositions, @@ -88,12 +86,12 @@ ORTFReader::ORTFReader(SvStream& rIn, DBG_CTOR(ORTFReader,NULL); m_bAppendFirstLine = false; } -// --------------------------------------------------------------------------- + ORTFReader::~ORTFReader() { DBG_DTOR(ORTFReader,NULL); } -// --------------------------------------------------------------------------- + SvParserState ORTFReader::CallParser() { SAL_INFO("dbaccess.ui", "ORTFReader::CallParser" ); @@ -104,7 +102,7 @@ SvParserState ORTFReader::CallParser() SetColumnTypes(m_pColumnList,m_pInfoMap); return m_bFoundTable ? eParseState : SVPAR_ERROR; } -// --------------------------------------------------------------------------- + void ORTFReader::NextToken( int nToken ) { SAL_INFO("dbaccess.ui", "ORTFReader::NextToken" ); @@ -215,7 +213,6 @@ void ORTFReader::NextToken( int nToken ) m_pUpdateHelper->insertRow(); } catch(SQLException& e) - ////////////////////////////////////////////////////////////////////// // handling update failure { showErrorDialog(e); @@ -258,7 +255,7 @@ void ORTFReader::NextToken( int nToken ) } } } -// --------------------------------------------------------------------------- + sal_Bool ORTFReader::CreateTable(int nToken) { SAL_INFO("dbaccess.ui", "ORTFReader::CreateTable" ); @@ -342,7 +339,7 @@ sal_Bool ORTFReader::CreateTable(int nToken) } return bOk; } -// ----------------------------------------------------------------------------- + void ORTFReader::release() { SAL_INFO("dbaccess.ui", "ORTFReader::release" ); @@ -350,15 +347,11 @@ void ORTFReader::release() ReleaseRef(); } -// ----------------------------------------------------------------------------- TypeSelectionPageFactory ORTFReader::getTypeSelectionPageFactory() { SAL_INFO("dbaccess.ui", "ORTFReader::getTypeSelectionPageFactory" ); DBG_CHKTHIS(ORTFReader,NULL); return &OWizRTFExtend::Create; } -// ----------------------------------------------------------------------------- - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx index df5ccdd49c62..55bb6bbece47 100644 --- a/dbaccess/source/ui/misc/TableCopyHelper.cxx +++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx @@ -55,10 +55,8 @@ #include <cppuhelper/exc_hlp.hxx> #include "dbexchange.hxx" -//........................................................................ namespace dbaui { -//........................................................................ using namespace ::dbtools; using namespace ::svx; using namespace ::com::sun::star::uno; @@ -73,13 +71,11 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::ucb; -// ----------------------------------------------------------------------------- OTableCopyHelper::OTableCopyHelper(OGenericUnoController* _pControler) :m_pController(_pControler) { } -// ----------------------------------------------------------------------------- void OTableCopyHelper::insertTable( const OUString& i_rSourceDataSource, const Reference<XConnection>& i_rSourceConnection, const OUString& i_rCommand, const sal_Int32 i_nCommandType, const Reference< XResultSet >& i_rSourceRows, const Sequence< Any >& i_rSelection, const sal_Bool i_bBookmarkSelection, @@ -138,7 +134,6 @@ void OTableCopyHelper::insertTable( const OUString& i_rSourceDataSource, const R } } -// ----------------------------------------------------------------------------- void OTableCopyHelper::pasteTable( const ::svx::ODataAccessDescriptor& _rPasteData, const OUString& i_rDestDataSourceName, const SharedConnection& i_rDestConnection ) { @@ -166,7 +161,6 @@ void OTableCopyHelper::pasteTable( const ::svx::ODataAccessDescriptor& _rPasteDa OSL_ENSURE( _rPasteData.has( daBookmarkSelection ), "OTableCopyHelper::pasteTable: you should specify BookmarkSelection, too, to be on the safe side!" ); } - sal_Bool bBookmarkSelection( sal_True ); if ( _rPasteData.has( daBookmarkSelection ) ) { @@ -183,7 +177,6 @@ void OTableCopyHelper::pasteTable( const ::svx::ODataAccessDescriptor& _rPasteDa i_rDestDataSourceName, i_rDestConnection ); } -// ----------------------------------------------------------------------------- void OTableCopyHelper::pasteTable( SotFormatStringId _nFormatId ,const TransferableDataHelper& _rTransData ,const OUString& i_rDestDataSource @@ -226,7 +219,6 @@ void OTableCopyHelper::pasteTable( SotFormatStringId _nFormatId m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,OUString("S1000"),0,Any())); } -// ----------------------------------------------------------------------------- void OTableCopyHelper::pasteTable( const TransferableDataHelper& _rTransData ,const OUString& i_rDestDataSource ,const SharedConnection& _xConnection) @@ -239,7 +231,6 @@ void OTableCopyHelper::pasteTable( const TransferableDataHelper& _rTransData pasteTable( SOT_FORMAT_RTF,_rTransData,i_rDestDataSource,_xConnection); } -// ----------------------------------------------------------------------------- sal_Bool OTableCopyHelper::copyTagTable(OTableCopyHelper::DropDescriptor& _rDesc, sal_Bool _bCheck,const SharedConnection& _xConnection) { Reference<XEventListener> xEvt; @@ -260,7 +251,7 @@ sal_Bool OTableCopyHelper::copyTagTable(OTableCopyHelper::DropDescriptor& _rDesc pImport->setStream(pStream); return pImport->Read(); } -// ----------------------------------------------------------------------------- + sal_Bool OTableCopyHelper::isTableFormat(const TransferableDataHelper& _rClipboard) const { sal_Bool bTableFormat = _rClipboard.HasFormat(SOT_FORMATSTR_ID_DBACCESS_TABLE) @@ -270,7 +261,7 @@ sal_Bool OTableCopyHelper::isTableFormat(const TransferableDataHelper& _rClipboa return bTableFormat; } -// ----------------------------------------------------------------------------- + sal_Bool OTableCopyHelper::copyTagTable(const TransferableDataHelper& _aDroppedData ,DropDescriptor& _rAsyncDrop ,const SharedConnection& _xConnection) @@ -305,7 +296,7 @@ sal_Bool OTableCopyHelper::copyTagTable(const TransferableDataHelper& _aDroppedD } return bRet; } -// ----------------------------------------------------------------------------- + void OTableCopyHelper::asyncCopyTagTable( DropDescriptor& _rDesc ,const OUString& i_rDestDataSource ,const SharedConnection& _xConnection) @@ -324,9 +315,7 @@ void OTableCopyHelper::asyncCopyTagTable( DropDescriptor& _rDesc else m_pController->showError(SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*m_pController,OUString("S1000"),0,Any())); } -// ----------------------------------------------------------------------------- -//........................................................................ + } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index 53d45f81adcc..7756a3c66eb2 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -87,7 +87,6 @@ const static char sFontSize[] = "font-size: "; #define CELL_X 1437 DBG_NAME(ODatabaseImportExport) -//====================================================================== ODatabaseImportExport::ODatabaseImportExport(const ::svx::ODataAccessDescriptor& _aDataDescriptor, const Reference< XComponentContext >& _rM, const Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF, @@ -119,7 +118,7 @@ ODatabaseImportExport::ODatabaseImportExport(const ::svx::ODataAccessDescriptor& } osl_atomic_decrement( &m_refCount ); } -// ----------------------------------------------------------------------------- + // import data ODatabaseImportExport::ODatabaseImportExport( const ::dbtools::SharedConnection& _rxConnection, const Reference< XNumberFormatter >& _rxNumberF, const Reference< XComponentContext >& _rM ) @@ -146,7 +145,7 @@ ODatabaseImportExport::ODatabaseImportExport( const ::dbtools::SharedConnection& { } } -//------------------------------------------------------------------- + ODatabaseImportExport::~ODatabaseImportExport() { DBG_DTOR(ODatabaseImportExport,NULL); @@ -158,7 +157,7 @@ ODatabaseImportExport::~ODatabaseImportExport() m_pReader->release(); delete m_pRowMarker; } -// ----------------------------------------------------------------------------- + void ODatabaseImportExport::dispose() { SAL_INFO("dbaccess.ui", "ODatabaseImportExport::disposing" ); @@ -181,7 +180,7 @@ void ODatabaseImportExport::dispose() m_xRowLocate.clear(); m_xFormatter.clear(); } -// ----------------------------------------------------------------------------- + void SAL_CALL ODatabaseImportExport::disposing( const EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { SAL_INFO("dbaccess.ui", "ODatabaseImportExport::disposing" ); @@ -194,14 +193,13 @@ void SAL_CALL ODatabaseImportExport::disposing( const EventObject& Source ) thro m_bNeedToReInitialize = true; } } -// ----------------------------------------------------------------------------- + void ODatabaseImportExport::initialize( const ODataAccessDescriptor& _aDataDescriptor ) { SAL_INFO("dbaccess.ui", "ODatabaseImportExport::initialize" ); impl_initFromDescriptor( _aDataDescriptor, true ); } -// ----------------------------------------------------------------------------- void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor& _aDataDescriptor, bool _bPlusDefaultInit) { SAL_INFO("dbaccess.ui", "ODatabaseImportExport::impl_initFromDescriptor" ); @@ -264,7 +262,7 @@ void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor { } } -// ----------------------------------------------------------------------------- + void ODatabaseImportExport::initialize() { SAL_INFO("dbaccess.ui", "ODatabaseImportExport::initialize" ); @@ -351,7 +349,7 @@ void ODatabaseImportExport::initialize() m_bInInitialize = sal_False; } -// ----------------------------------------------------------------------------- + sal_Bool ODatabaseImportExport::Write() { if ( m_bNeedToReInitialize ) @@ -361,7 +359,7 @@ sal_Bool ODatabaseImportExport::Write() } return sal_True; } -// ----------------------------------------------------------------------------- + sal_Bool ODatabaseImportExport::Read() { if ( m_bNeedToReInitialize ) @@ -371,7 +369,7 @@ sal_Bool ODatabaseImportExport::Read() } return sal_True; } -// ----------------------------------------------------------------------------- + void ODatabaseImportExport::impl_initializeRowMember_throw() { SAL_INFO("dbaccess.ui", "ODatabaseImportExport::impl_initializeRowMember_throw" ); @@ -384,7 +382,7 @@ void ODatabaseImportExport::impl_initializeRowMember_throw() m_xRowSetColumns.set(xSup->getColumns(),UNO_QUERY_THROW); } } -//====================================================================== + sal_Bool ORTFImportExport::Write() { SAL_INFO("dbaccess.ui", "ORTFImportExport::Write" ); @@ -467,7 +465,6 @@ sal_Bool ORTFImportExport::Write() (*m_pStream) << '{' << ODatabaseImportExport::sNewLine; (*m_pStream) << aTRRH; - OString* pHorzChar = new OString[nCount]; for ( sal_Int32 i=1; i <= nCount; ++i ) @@ -560,7 +557,7 @@ sal_Bool ORTFImportExport::Write() (*m_pStream) << (sal_uInt8) 0; return ((*m_pStream).GetError() == SVSTREAM_OK); } -// ----------------------------------------------------------------------------- + void ORTFImportExport::appendRow(OString* pHorzChar,sal_Int32 _nColumnCount,sal_Int32& k,sal_Int32& kk) { if(!m_pRowMarker || m_pRowMarker[kk] == k) @@ -624,7 +621,7 @@ void ORTFImportExport::appendRow(OString* pHorzChar,sal_Int32 _nColumnCount,sal_ } ++k; } -//------------------------------------------------------------------- + sal_Bool ORTFImportExport::Read() { SAL_INFO("dbaccess.ui", "ORTFImportExport::Read" ); @@ -643,8 +640,7 @@ sal_Bool ORTFImportExport::Read() return eState != SVPAR_ERROR; } -//------------------------------------------------------------------- -//=================================================================== + const sal_Int16 OHTMLImportExport::nDefaultFontSize[SBA_HTML_FONTSIZES] = { HTMLFONTSZ1_DFLT, HTMLFONTSZ2_DFLT, HTMLFONTSZ3_DFLT, HTMLFONTSZ4_DFLT, @@ -656,16 +652,13 @@ sal_Int16 OHTMLImportExport::nFontSize[SBA_HTML_FONTSIZES] = { 0 }; const sal_Int16 OHTMLImportExport::nCellSpacing = 0; const char OHTMLImportExport::sIndentSource[nIndentMax+1] = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"; -//======================================================================== // Macros for HTML-Export -//======================================================================== #define TAG_ON( tag ) HTMLOutFuncs::Out_AsciiTag( (*m_pStream), tag ) #define TAG_OFF( tag ) HTMLOutFuncs::Out_AsciiTag( (*m_pStream), tag, sal_False ) #define OUT_LF() (*m_pStream) << ODatabaseImportExport::sNewLine << GetIndentStr() #define TAG_ON_LF( tag ) (TAG_ON( tag ) << ODatabaseImportExport::sNewLine << GetIndentStr()) #define TAG_OFF_LF( tag ) (TAG_OFF( tag ) << ODatabaseImportExport::sNewLine << GetIndentStr()) -//------------------------------------------------------------------- OHTMLImportExport::OHTMLImportExport(const ::svx::ODataAccessDescriptor& _aDataDescriptor, const Reference< XComponentContext >& _rM, const Reference< ::com::sun::star::util::XNumberFormatter >& _rxNumberF, @@ -683,7 +676,7 @@ OHTMLImportExport::OHTMLImportExport(const ::svx::ODataAccessDescriptor& _aDataD strncpy( sIndent, sIndentSource ,std::min(sizeof(sIndent),sizeof(sIndentSource))); sIndent[0] = 0; } -//------------------------------------------------------------------- + sal_Bool OHTMLImportExport::Write() { SAL_INFO("dbaccess.ui", "OHTMLImportExport::Write" ); @@ -702,7 +695,7 @@ sal_Bool OHTMLImportExport::Write() } return sal_False; } -//------------------------------------------------------------------- + sal_Bool OHTMLImportExport::Read() { SAL_INFO("dbaccess.ui", "OHTMLImportExport::Read" ); @@ -722,7 +715,7 @@ sal_Bool OHTMLImportExport::Read() return eState != SVPAR_ERROR; } -//------------------------------------------------------------------- + void OHTMLImportExport::WriteHeader() { SAL_INFO("dbaccess.ui", "OHTMLImportExport::WriteHeader" ); @@ -739,7 +732,7 @@ void OHTMLImportExport::WriteHeader() OUT_LF(); IncIndent(-1); OUT_LF(); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_head ); } -//----------------------------------------------------------------------- + void OHTMLImportExport::WriteBody() { SAL_INFO("dbaccess.ui", "OHTMLImportExport::WriteBody" ); @@ -775,7 +768,7 @@ void OHTMLImportExport::WriteBody() TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_body ); } -//----------------------------------------------------------------------- + void OHTMLImportExport::WriteTables() { SAL_INFO("dbaccess.ui", "OHTMLImportExport::WriteTables" ); @@ -849,7 +842,6 @@ void OHTMLImportExport::WriteTables() const char **pHorJustify = new const char*[aNames.getLength()]; sal_Int32 *pColWidth = new sal_Int32[aNames.getLength()]; - sal_Int32 nHeight = 0; m_xObject->getPropertyValue(PROPERTY_ROW_HEIGHT) >>= nHeight; @@ -948,7 +940,7 @@ void OHTMLImportExport::WriteTables() IncIndent(-1); OUT_LF(); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_tbody ); IncIndent(-1); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_table ); } -//----------------------------------------------------------------------- + void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_Int32 nHeightPixel,const char* pChar, const String& rValue,const char* pHtmlTag) { @@ -1013,7 +1005,6 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_I else HTMLOutFuncs::Out_String( (*m_pStream), rValue ,m_eDestEnc); - if ( bStrikeout ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_strike ); if ( bUnderline ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_underline ); if ( bItalic ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_italic ); @@ -1023,7 +1014,7 @@ void OHTMLImportExport::WriteCell( sal_Int32 nFormat,sal_Int32 nWidthPixel,sal_I TAG_OFF_LF( pHtmlTag ); } -//----------------------------------------------------------------------- + void OHTMLImportExport::FontOn() { SAL_INFO("dbaccess.ui", "OHTMLImportExport::FontOn" ); @@ -1054,7 +1045,7 @@ void OHTMLImportExport::FontOn() HTMLOutFuncs::Out_Color( (*m_pStream), aColor ); (*m_pStream) << ">"; } -//----------------------------------------------------------------------- + inline void OHTMLImportExport::FontOff() { SAL_INFO("dbaccess.ui", "OHTMLImportExport::FontOff" ); @@ -1064,7 +1055,7 @@ inline void OHTMLImportExport::FontOff() m_bCheckFont = sal_False; #endif } -//----------------------------------------------------------------------- + void OHTMLImportExport::IncIndent( sal_Int16 nVal ) { SAL_INFO("dbaccess.ui", "OHTMLImportExport::IncIndent" ); @@ -1076,6 +1067,5 @@ void OHTMLImportExport::IncIndent( sal_Int16 nVal ) m_nIndent = nIndentMax; sIndent[m_nIndent] = 0; } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/ToolBoxHelper.cxx b/dbaccess/source/ui/misc/ToolBoxHelper.cxx index 9662364b5f10..86bfb4034ecc 100644 --- a/dbaccess/source/ui/misc/ToolBoxHelper.cxx +++ b/dbaccess/source/ui/misc/ToolBoxHelper.cxx @@ -38,7 +38,6 @@ namespace dbaui SvtMiscOptions().AddListenerLink( LINK( this, OToolBoxHelper, ConfigOptionsChanged ) ); Application::AddEventListener( LINK( this, OToolBoxHelper, SettingsChanged ) ); } - // ----------------------------------------------------------------------------- OToolBoxHelper::~OToolBoxHelper() { SvtMiscOptions().RemoveListenerLink( LINK( this, OToolBoxHelper, ConfigOptionsChanged ) ); @@ -46,7 +45,6 @@ namespace dbaui DBG_DTOR(OToolBoxHelper,NULL); } - // ----------------------------------------------------------------------------- void OToolBoxHelper::checkImageList() { if ( m_pToolBox ) @@ -66,7 +64,6 @@ namespace dbaui } } } - // ----------------------------------------------------------------------------- IMPL_LINK(OToolBoxHelper, ConfigOptionsChanged, SvtMiscOptions*, /*_pOptions*/) { if ( m_pToolBox ) @@ -80,7 +77,6 @@ namespace dbaui return 0L; } - // ----------------------------------------------------------------------------- IMPL_LINK(OToolBoxHelper, SettingsChanged, VclWindowEvent*, _pEvt) { if ( m_pToolBox && _pEvt && _pEvt->GetId() == VCLEVENT_APPLICATION_DATACHANGED ) @@ -95,7 +91,6 @@ namespace dbaui return 0L; } - // ----------------------------------------------------------------------------- void OToolBoxHelper::setToolBox(ToolBox* _pTB) { sal_Bool bFirstTime = (m_pToolBox == NULL); @@ -107,8 +102,6 @@ namespace dbaui adjustToolBoxSize(m_pToolBox); } } -// ----------------------------------------------------------------------------- } // namespace -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index df277c333e59..911d0256ea42 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "UITools.hxx" #include <sfx2/docfilt.hxx> #include "callbacks.hxx" @@ -110,10 +109,8 @@ #include <editeng/justifyitem.hxx> -// ......................................................................... namespace dbaui { -// ......................................................................... using namespace ::dbtools; using namespace ::comphelper; using namespace ::com::sun::star; @@ -134,7 +131,6 @@ using ::com::sun::star::ucb::IOErrorCode_NO_FILE; using ::com::sun::star::ucb::IOErrorCode_NOT_EXISTING; using ::com::sun::star::frame::XModel; -// ----------------------------------------------------------------------------- SQLExceptionInfo createConnection( const OUString& _rsDataSourceName, const Reference< ::com::sun::star::container::XNameAccess >& _xDatabaseContext, const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext, @@ -153,7 +149,7 @@ SQLExceptionInfo createConnection( const OUString& _rsDataSourceName, return createConnection(xProp,_rxContext,_rEvtLst,_rOUTConnection); } -// ----------------------------------------------------------------------------- + SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XPropertySet>& _xDataSource, const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext, Reference< ::com::sun::star::lang::XEventListener>& _rEvtLst, @@ -179,7 +175,6 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP SAL_WARN("dbaccess.ui", "createConnection: error while retrieving data source properties!"); } - try { if(bPwdReq && sPwd.isEmpty()) @@ -212,7 +207,7 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP return aInfo; } -// ----------------------------------------------------------------------------- + Reference< XDataSource > getDataSourceByName( const OUString& _rDataSourceName, Window* _pErrorMessageParent, Reference< XComponentContext > _rxContext, ::dbtools::SQLExceptionInfo* _pErrorInfo ) { @@ -268,7 +263,7 @@ Reference< XDataSource > getDataSourceByName( const OUString& _rDataSourceName, return Reference<XDataSource>(); } -// ----------------------------------------------------------------------------- + Reference< XInterface > getDataSourceOrModel(const Reference< XInterface >& _xObject) { Reference< XInterface > xRet; @@ -285,15 +280,13 @@ Reference< XInterface > getDataSourceOrModel(const Reference< XInterface >& _xOb return xRet; } -// ----------------------------------------------------------------------------- + void showError(const SQLExceptionInfo& _rInfo,Window* _pParent,const Reference< XComponentContext >& _rxContext) { OSL_ENSURE(_pParent,"showError: Parent window must be NOT NULL!"); ::dbtools::showError(_rInfo,VCLUnoHelper::GetInterface(_pParent), _rxContext); } -// ----------------------------------------------------------------------------- - TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo, sal_Int32 _nType, const OUString& _sTypeName, @@ -432,7 +425,7 @@ TOTypeInfoSP getTypeInfoFromType(const OTypeInfoMap& _rTypeInfo, OSL_ENSURE(pTypeInfo, "getTypeInfoFromType: no type info found for this type!"); return pTypeInfo; } -// ----------------------------------------------------------------------------- + void fillTypeInfo( const Reference< ::com::sun::star::sdbc::XConnection>& _rxConnection, const String& _rsTypeNames, OTypeInfoMap& _rTypeInfoMap, @@ -645,7 +638,7 @@ void fillTypeInfo( const Reference< ::com::sun::star::sdbc::XConnection>& _rxCo ::comphelper::disposeComponent(xRs); } } -// ----------------------------------------------------------------------------- + void setColumnProperties(const Reference<XPropertySet>& _rxColumn,const OFieldDescription* _pFieldDesc) { _rxColumn->setPropertyValue(PROPERTY_NAME,makeAny(_pFieldDesc->GetName())); @@ -663,7 +656,7 @@ void setColumnProperties(const Reference<XPropertySet>& _rxColumn,const OFieldDe if ( _pFieldDesc->IsAutoIncrement() && !_pFieldDesc->GetAutoIncrementValue().isEmpty() && _rxColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_AUTOINCREMENTCREATION) ) _rxColumn->setPropertyValue(PROPERTY_AUTOINCREMENTCREATION,makeAny(_pFieldDesc->GetAutoIncrementValue())); } -// ----------------------------------------------------------------------------- + OUString createDefaultName(const Reference< XDatabaseMetaData>& _xMetaData,const Reference<XNameAccess>& _xTables,const OUString& _sName) { OSL_ENSURE(_xMetaData.is(),"No MetaData!"); @@ -706,7 +699,7 @@ OUString createDefaultName(const Reference< XDatabaseMetaData>& _xMetaData,const } return sDefaultName; } -// ----------------------------------------------------------------------------- + sal_Bool checkDataSourceAvailable(const OUString& _sDataSourceName,const Reference< ::com::sun::star::uno::XComponentContext >& _xContext) { Reference< XDatabaseContext > xDataBaseContext = DatabaseContext::create(_xContext); @@ -723,7 +716,7 @@ sal_Bool checkDataSourceAvailable(const OUString& _sDataSourceName,const Referen } return bRet; } -// ----------------------------------------------------------------------------- + sal_Int32 mapTextAllign(const SvxCellHorJustify& _eAlignment) { sal_Int32 nAlignment = com::sun::star::awt::TextAlign::LEFT; @@ -738,7 +731,7 @@ sal_Int32 mapTextAllign(const SvxCellHorJustify& _eAlignment) } return nAlignment; } -// ----------------------------------------------------------------------------- + SvxCellHorJustify mapTextJustify(const sal_Int32& _nAlignment) { SvxCellHorJustify eJustify = SVX_HOR_JUSTIFY_LEFT; @@ -752,7 +745,7 @@ SvxCellHorJustify mapTextJustify(const sal_Int32& _nAlignment) } return eJustify; } -// ----------------------------------------------------------------------------- + void callColumnFormatDialog(const Reference<XPropertySet>& xAffectedCol, const Reference<XPropertySet>& xField, SvNumberFormatter* _pFormatter, @@ -789,7 +782,7 @@ void callColumnFormatDialog(const Reference<XPropertySet>& xAffectedCol, } } } -// ----------------------------------------------------------------------------- + sal_Bool callColumnFormatDialog(Window* _pParent, SvNumberFormatter* _pFormatter, sal_Int32 _nDataType, @@ -805,7 +798,6 @@ sal_Bool callColumnFormatDialog(Window* _pParent, if (_bHasFormat) _nFlags |= TP_ATTR_NUMBER; - // ------------ // UNO->ItemSet static SfxItemInfo aItemInfos[] = { @@ -866,7 +858,6 @@ sal_Bool callColumnFormatDialog(Window* _pParent, SbaSbAttrDlg aDlg(_pParent, pFormatDescriptor, _pFormatter, _nFlags); if (RET_OK == aDlg.Execute()) { - // ------------ // ItemSet->UNO // UNO-properties const SfxItemSet* pSet = aDlg.GetExampleSet(); @@ -910,7 +901,6 @@ sal_Bool callColumnFormatDialog(Window* _pParent, return bRet; } -//------------------------------------------------------------------------------ const SfxFilter* getStandardDatabaseFilter() { const SfxFilter* pFilter = SfxFilter::GetFilterByName(OUString("StarOffice XML (Base)")); @@ -918,8 +908,6 @@ const SfxFilter* getStandardDatabaseFilter() return pFilter; } - -// ----------------------------------------------------------------------------- sal_Bool appendToFilter(const Reference<XConnection>& _xConnection, const OUString& _sName, const Reference< XComponentContext >& _rxContext, @@ -970,7 +958,7 @@ sal_Bool appendToFilter(const Reference<XConnection>& _xConnection, } return bRet; } -// ----------------------------------------------------------------------------- + void notifySystemWindow(Window* _pWindow,Window* _pToRegister, ::comphelper::mem_fun1_t<TaskPaneList,Window*> _rMemFunc) { OSL_ENSURE(_pWindow,"Window can not be null!"); @@ -980,7 +968,7 @@ void notifySystemWindow(Window* _pWindow,Window* _pToRegister, ::comphelper::mem _rMemFunc( pSystemWindow->GetTaskPaneList(), _pToRegister ); } } -// ----------------------------------------------------------------------------- + void adjustToolBoxSize(ToolBox* _pToolBox) { // adjust the toolbox size, otherwise large bitmaps don't fit into @@ -999,7 +987,7 @@ void adjustToolBoxSize(ToolBox* _pToolBox) _pToolBox->Invalidate(); } } -// ----------------------------------------------------------------------------- + void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId ) { sal_Int32 nColSize = -1; @@ -1028,25 +1016,23 @@ void adjustBrowseBoxColumnWidth( ::svt::EditBrowseBox* _pBox, sal_uInt16 _nColId _pBox->SetColumnWidth( _nColId, nValue ); } } -// ----------------------------------------------------------------------------- + // check if SQL92 name checking is enabled sal_Bool isSQL92CheckEnabled(const Reference<XConnection>& _xConnection) { return ::dbtools::getBooleanDataSourceSetting( _xConnection, PROPERTY_ENABLESQL92CHECK ); } -// ----------------------------------------------------------------------------- + sal_Bool isAppendTableAliasEnabled(const Reference<XConnection>& _xConnection) { return ::dbtools::getBooleanDataSourceSetting( _xConnection, INFO_APPEND_TABLE_ALIAS ); } -// ----------------------------------------------------------------------------- sal_Bool generateAsBeforeTableAlias(const Reference<XConnection>& _xConnection) { return ::dbtools::getBooleanDataSourceSetting( _xConnection, INFO_AS_BEFORE_CORRELATION_NAME ); } -// ----------------------------------------------------------------------------- void fillAutoIncrementValue(const Reference<XPropertySet>& _xDatasource, sal_Bool& _rAutoIncrementValueEnabled, OUString& _rsAutoIncrementValue) @@ -1070,7 +1056,7 @@ void fillAutoIncrementValue(const Reference<XPropertySet>& _xDatasource, pValue->Value >>= _rAutoIncrementValueEnabled; } } -// ----------------------------------------------------------------------------- + void fillAutoIncrementValue(const Reference<XConnection>& _xConnection, sal_Bool& _rAutoIncrementValueEnabled, OUString& _rsAutoIncrementValue) @@ -1082,7 +1068,7 @@ void fillAutoIncrementValue(const Reference<XConnection>& _xConnection, fillAutoIncrementValue(xProp,_rAutoIncrementValueEnabled,_rsAutoIncrementValue); } } -// ----------------------------------------------------------------------------- + OUString getStrippedDatabaseName(const Reference<XPropertySet>& _xDataSource,OUString& _rsDatabaseName) { if ( _rsDatabaseName.isEmpty() && _xDataSource.is() ) @@ -1102,7 +1088,7 @@ OUString getStrippedDatabaseName(const Reference<XPropertySet>& _xDataSource,OUS sName = aURL.getBase(INetURLObject::LAST_SEGMENT,true,INetURLObject::DECODE_UNAMBIGUOUS); return sName; } -// ----------------------------------------------------------------------------- + void AppendConfigToken( OUString& _rURL, sal_Bool _bQuestionMark ) { // query part exists? @@ -1122,7 +1108,6 @@ void AppendConfigToken( OUString& _rURL, sal_Bool _bQuestionMark ) namespace { - // ----------------------------------------------------------------------- sal_Bool GetHelpAnchor_Impl( const OUString& _rURL, OUString& _rAnchor ) { @@ -1154,10 +1139,8 @@ namespace return bRet; } -// ......................................................................... } // annonymous -// ......................................................................... -// ----------------------------------------------------------------------------- + ::com::sun::star::util::URL createHelpAgentURL(const OUString& _sModuleName, const OString& sHelpId) { ::com::sun::star::util::URL aURL; @@ -1178,7 +1161,7 @@ namespace } return aURL; } -// ----------------------------------------------------------------------------- + void setEvalDateFormatForFormatter(Reference< ::com::sun::star::util::XNumberFormatter >& _rxFormatter) { OSL_ENSURE( _rxFormatter.is(),"setEvalDateFormatForFormatter: Formatter is NULL!"); @@ -1197,7 +1180,7 @@ void setEvalDateFormatForFormatter(Reference< ::com::sun::star::util::XNumberFor } } } -// ----------------------------------------------------------------------------- + TOTypeInfoSP queryPrimaryKeyType(const OTypeInfoMap& _rTypeInfo) { TOTypeInfoSP pTypeInfo; @@ -1229,7 +1212,7 @@ TOTypeInfoSP queryPrimaryKeyType(const OTypeInfoMap& _rTypeInfo) OSL_ENSURE(pTypeInfo.get(),"checkColumns: cann't find a type which is useable as a key!"); return pTypeInfo; } -// ----------------------------------------------------------------------------- + TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rTypeInfo) { OTypeInfoMap::const_iterator aIter = _rTypeInfo.find(_nDataType); @@ -1302,7 +1285,7 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType OSL_ENSURE(pTypeInfo,"Wrong DataType supplied!"); return pTypeInfo; } -// ----------------------------------------------------------------------------- + sal_Int32 askForUserAction(Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _nText,sal_Bool _bAll,const OUString& _sName) { SolarMutexGuard aGuard; @@ -1317,7 +1300,6 @@ sal_Int32 askForUserAction(Window* _pParent,sal_uInt16 _nTitle,sal_uInt16 _nText return aAsk.Execute(); } -// ----------------------------------------------------------------------------- namespace { static OUString lcl_createSDBCLevelStatement( const OUString& _rStatement, const Reference< XConnection >& _rxConnection ) @@ -1338,7 +1320,6 @@ namespace } } -// ----------------------------------------------------------------------------- Reference< XPropertySet > createView( const OUString& _rName, const Reference< XConnection >& _rxConnection, const OUString& _rCommand ) { @@ -1388,7 +1369,6 @@ Reference< XPropertySet > createView( const OUString& _rName, const Reference< X return xView; } -// ----------------------------------------------------------------------------- Reference<XPropertySet> createView( const OUString& _rName, const Reference< XConnection >& _rxConnection ,const Reference<XPropertySet>& _rxSourceObject) { @@ -1411,7 +1391,6 @@ Reference<XPropertySet> createView( const OUString& _rName, const Reference< XCo return createView( _rName, _rxConnection, sCommand ); } -// ----------------------------------------------------------------------------- sal_Bool insertHierachyElement( Window* _pParent, const Reference< XComponentContext >& _rxContext, const Reference<XHierarchicalNameContainer>& _xNames, const String& _sParentFolder, @@ -1455,7 +1434,6 @@ sal_Bool insertHierachyElement( Window* _pParent, const Reference< XComponentCon sLabel = String(ModuleRes( _bCollection ? STR_FOLDER_LABEL : ((_bForm) ? STR_FRM_LABEL : STR_RPT_LABEL))); sTargetName = ::dbtools::createUniqueName(xNameAccess,sTargetName); - // here we have everything needed to create a new query object ... HierarchicalNameCheck aNameChecker( _xNames.get(), sName ); // ... ehm, except a new name @@ -1515,10 +1493,9 @@ sal_Bool insertHierachyElement( Window* _pParent, const Reference< XComponentCon return sal_True; } -// ----------------------------------------------------------------------------- + Reference< XNumberFormatter > getNumberFormatter(const Reference< XConnection >& _rxConnection, const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext ) { - // --------------------------------------------------------------- // create a formatter working with the connections format supplier Reference< XNumberFormatter > xFormatter; @@ -1541,9 +1518,6 @@ Reference< XNumberFormatter > getNumberFormatter(const Reference< XConnection >& return xFormatter; } - -// ......................................................................... } // dbaui -// ......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx index c0a5dc69228f..ffb0cf6894e1 100644 --- a/dbaccess/source/ui/misc/WCPage.cxx +++ b/dbaccess/source/ui/misc/WCPage.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "WCPage.hxx" #include "WCopyTable.hxx" @@ -51,11 +50,8 @@ using namespace ::com::sun::star::sdbcx; namespace CopyTableOperation = ::com::sun::star::sdb::application::CopyTableOperation; -//======================================================================== // Klasse OCopyTable -//======================================================================== DBG_NAME(OCopyTable) -//------------------------------------------------------------------------ OCopyTable::OCopyTable( Window * pParent ) :OWizardPage( pParent, ModuleRes(TAB_WIZ_COPYTABLE) ) ,m_ftTableName( this, ModuleRes( FT_TABLENAME ) ) @@ -110,12 +106,11 @@ OCopyTable::OCopyTable( Window * pParent ) SetText(String(ModuleRes(STR_COPYTABLE_TITLE_COPY))); } -//------------------------------------------------------------------------ OCopyTable::~OCopyTable() { DBG_DTOR(OCopyTable,NULL); } -//------------------------------------------------------------------------ + IMPL_LINK( OCopyTable, AppendDataClickHdl, Button*, /*pButton*/ ) { DBG_CHKTHIS(OCopyTable,NULL); @@ -133,7 +128,6 @@ void OCopyTable::SetAppendDataRadio() m_pParent->setOperation(CopyTableOperation::AppendData); } -//------------------------------------------------------------------------ IMPL_LINK( OCopyTable, RadioChangeHdl, Button*, pButton ) { DBG_CHKTHIS(OCopyTable,NULL); @@ -154,7 +148,7 @@ IMPL_LINK( OCopyTable, RadioChangeHdl, Button*, pButton ) return 0; } -//------------------------------------------------------------------------ + IMPL_LINK( OCopyTable, KeyClickHdl, Button*, /*pButton*/ ) { DBG_CHKTHIS(OCopyTable,NULL); @@ -162,7 +156,7 @@ IMPL_LINK( OCopyTable, KeyClickHdl, Button*, /*pButton*/ ) m_aFT_KeyName.Enable(m_aCB_PrimaryColumn.IsChecked()); return 0; } -//------------------------------------------------------------------------ + sal_Bool OCopyTable::LeavePage() { DBG_CHKTHIS(OCopyTable,NULL); @@ -248,7 +242,7 @@ sal_Bool OCopyTable::LeavePage() return sal_True; } -//------------------------------------------------------------------------ + void OCopyTable::ActivatePage() { DBG_CHKTHIS(OCopyTable,NULL); @@ -257,13 +251,13 @@ void OCopyTable::ActivatePage() m_edTableName.GrabFocus(); m_aCB_UseHeaderLine.Check(m_pParent->UseHeaderLine()); } -//------------------------------------------------------------------------ + String OCopyTable::GetTitle() const { DBG_CHKTHIS(OCopyTable,NULL); return String(ModuleRes(STR_WIZ_TABLE_COPY)); } -//------------------------------------------------------------------------ + void OCopyTable::Reset() { DBG_CHKTHIS(OCopyTable,NULL); @@ -272,7 +266,7 @@ void OCopyTable::Reset() m_edTableName.SetText( m_pParent->m_sName ); m_edTableName.SaveValue(); } -//------------------------------------------------------------------------ + sal_Bool OCopyTable::checkAppendData() { DBG_CHKTHIS(OCopyTable,NULL); @@ -326,7 +320,7 @@ sal_Bool OCopyTable::checkAppendData() } return sal_True; } -// ----------------------------------------------------------------------------- + void OCopyTable::setCreatePrimaryKey( bool _bDoCreate, const OUString& _rSuggestedName ) { bool bCreatePK = m_bPKeyAllowed && _bDoCreate; @@ -337,7 +331,6 @@ void OCopyTable::setCreatePrimaryKey( bool _bDoCreate, const OUString& _rSuggest m_edKeyName.Enable( bCreatePK ); } -// ----------------------------------------------------------------------------- void OCopyTable::setCreateStyleAction() { // reselect the last action before diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx index 196761826fca..bedf7c1c0b9f 100644 --- a/dbaccess/source/ui/misc/WColumnSelect.cxx +++ b/dbaccess/source/ui/misc/WColumnSelect.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "WColumnSelect.hxx" #include "dbu_misc.hrc" #include <osl/diagnose.h> @@ -43,19 +42,16 @@ using namespace dbaui; namespace CopyTableOperation = ::com::sun::star::sdb::application::CopyTableOperation; -// ----------------------------------------------------------------------- String OWizColumnSelect::GetTitle() const { return String(ModuleRes(STR_WIZ_COLUMN_SELECT_TITEL)); } -// ----------------------------------------------------------------------------- OWizardPage::OWizardPage( Window* pParent, const ResId& rResId ) : TabPage(pParent,rResId) ,m_pParent(static_cast<OCopyTableWizard*>(pParent)) ,m_bFirstTime(sal_True) { } -//======================================================================== + // OWizColumnSelect DBG_NAME(OWizColumnSelect); -//======================================================================== OWizColumnSelect::OWizColumnSelect( Window* pParent) :OWizardPage( pParent, ModuleRes( TAB_WIZ_COLUMN_SELECT )) ,m_flColumns( this, ModuleRes( FL_COLUMN_SELECT ) ) @@ -79,7 +75,7 @@ OWizColumnSelect::OWizColumnSelect( Window* pParent) m_lbNewColumnNames.SetDoubleClickHdl(LINK(this,OWizColumnSelect,ListDoubleClickHdl)); FreeResource(); } -// ----------------------------------------------------------------------- + OWizColumnSelect::~OWizColumnSelect() { DBG_DTOR(OWizColumnSelect,NULL); @@ -94,7 +90,6 @@ OWizColumnSelect::~OWizColumnSelect() m_lbNewColumnNames.Clear(); } -// ----------------------------------------------------------------------- void OWizColumnSelect::Reset() { // restore original state @@ -120,7 +115,7 @@ void OWizColumnSelect::Reset() m_bFirstTime = sal_False; } -// ----------------------------------------------------------------------- + void OWizColumnSelect::ActivatePage( ) { DBG_CHKTHIS(OWizColumnSelect,NULL); @@ -144,7 +139,7 @@ void OWizColumnSelect::ActivatePage( ) m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,m_lbNewColumnNames.GetEntryCount() && m_pParent->getOperation() != CopyTableOperation::AppendData); m_ibColumns_RH.GrabFocus(); } -// ----------------------------------------------------------------------- + sal_Bool OWizColumnSelect::LeavePage() { DBG_CHKTHIS(OWizColumnSelect,NULL); @@ -160,7 +155,6 @@ sal_Bool OWizColumnSelect::LeavePage() clearListBox(m_lbNewColumnNames); - if ( m_pParent->GetPressedButton() == OCopyTableWizard::WIZARD_NEXT || m_pParent->GetPressedButton() == OCopyTableWizard::WIZARD_FINISH ) @@ -168,7 +162,7 @@ sal_Bool OWizColumnSelect::LeavePage() else return sal_True; } -// ----------------------------------------------------------------------- + IMPL_LINK( OWizColumnSelect, ButtonClickHdl, Button *, pButton ) { MultiListBox *pLeft = NULL; @@ -231,7 +225,7 @@ IMPL_LINK( OWizColumnSelect, ButtonClickHdl, Button *, pButton ) return 0; } -// ----------------------------------------------------------------------- + IMPL_LINK( OWizColumnSelect, ListDoubleClickHdl, MultiListBox *, pListBox ) { MultiListBox *pLeft,*pRight; @@ -246,7 +240,6 @@ IMPL_LINK( OWizColumnSelect, ListDoubleClickHdl, MultiListBox *, pListBox ) pLeft = &m_lbNewColumnNames; } - ////////////////////////////////////////////////////////////////////// // If database is able to process PrimaryKeys, set PrimaryKey Reference< XDatabaseMetaData > xMetaData( m_pParent->m_xDestConnection->getMetaData() ); OUString sExtraChars = xMetaData->getExtraNameCharacters(); @@ -264,14 +257,14 @@ IMPL_LINK( OWizColumnSelect, ListDoubleClickHdl, MultiListBox *, pListBox ) enableButtons(); return 0; } -// ----------------------------------------------------------------------------- + void OWizColumnSelect::clearListBox(MultiListBox& _rListBox) { while(_rListBox.GetEntryCount()) _rListBox.RemoveEntry(0); _rListBox.Clear(); } -// ----------------------------------------------------------------------------- + void OWizColumnSelect::fillColumns(ListBox* pRight,::std::vector< OUString> &_rRightColumns) { sal_uInt16 nCount = pRight->GetEntryCount(); @@ -279,7 +272,7 @@ void OWizColumnSelect::fillColumns(ListBox* pRight,::std::vector< OUString> &_rR for(sal_uInt16 i=0; i < nCount;++i) _rRightColumns.push_back(pRight->GetEntry(i)); } -// ----------------------------------------------------------------------------- + void OWizColumnSelect::createNewColumn( ListBox* _pListbox, OFieldDescription* _pSrcField, ::std::vector< OUString>& _rRightColumns, @@ -305,7 +298,7 @@ void OWizColumnSelect::createNewColumn( ListBox* _pListbox, if ( !bNotConvert ) m_pParent->showColumnTypeNotSupported(sConvertedName); } -// ----------------------------------------------------------------------------- + void OWizColumnSelect::moveColumn( ListBox* _pRight, ListBox* _pLeft, ::std::vector< OUString>& _rRightColumns, @@ -348,7 +341,7 @@ void OWizColumnSelect::moveColumn( ListBox* _pRight, } } } -// ----------------------------------------------------------------------------- + // Simply returning fields back to their original position is // not enough. We need to take into acccount what fields have // been removed earlier and adjust accordingly. Based on the @@ -398,7 +391,7 @@ sal_uInt16 OWizColumnSelect::adjustColumnPosition( ListBox* _pLeft, return nAdjustedPos; } -// ----------------------------------------------------------------------------- + void OWizColumnSelect::enableButtons() { sal_Bool bEntries = m_lbNewColumnNames.GetEntryCount() != 0; @@ -408,6 +401,5 @@ void OWizColumnSelect::enableButtons() m_pParent->GetOKButton().Enable(bEntries); m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,bEntries && m_pParent->getOperation() != CopyTableOperation::AppendData); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index 81e3fb2a13ec..fc16d90cb619 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbu_misc.hrc" #include "dbustrings.hrc" #include "moduledbu.hxx" @@ -84,7 +83,6 @@ namespace CopyTableOperation = ::com::sun::star::sdb::application::CopyTableOper DBG_NAME(OCopyTableWizard) namespace { - //.................................................................... void clearColumns(ODatabaseExport::TColumns& _rColumns, ODatabaseExport::TColumnVector& _rColumnsVec) { ODatabaseExport::TColumns::iterator aIter = _rColumns.begin(); @@ -98,18 +96,12 @@ namespace } } -//======================================================================== -//= ICopyTableSourceObject -//======================================================================== -//------------------------------------------------------------------------ +// ICopyTableSourceObject ICopyTableSourceObject::~ICopyTableSourceObject() { } -//======================================================================== -//= ObjectCopySource -//======================================================================== -//------------------------------------------------------------------------ +// ObjectCopySource ObjectCopySource::ObjectCopySource( const Reference< XConnection >& _rxConnection, const Reference< XPropertySet >& _rxObject ) :m_xConnection( _rxConnection, UNO_SET_THROW ) ,m_xMetaData( _rxConnection->getMetaData(), UNO_SET_THROW ) @@ -119,7 +111,6 @@ ObjectCopySource::ObjectCopySource( const Reference< XConnection >& _rxConnectio { } -//------------------------------------------------------------------------ OUString ObjectCopySource::getQualifiedObjectName() const { OUString sName; @@ -131,7 +122,6 @@ OUString ObjectCopySource::getQualifiedObjectName() const return sName; } -//------------------------------------------------------------------------ bool ObjectCopySource::isView() const { bool bIsView = false; @@ -151,7 +141,6 @@ bool ObjectCopySource::isView() const return bIsView; } -//------------------------------------------------------------------------ void ObjectCopySource::copyUISettingsTo( const Reference< XPropertySet >& _rxObject ) const { const OUString aCopyProperties[] = { @@ -163,7 +152,7 @@ void ObjectCopySource::copyUISettingsTo( const Reference< XPropertySet >& _rxObj _rxObject->setPropertyValue( aCopyProperties[i], m_xObject->getPropertyValue( aCopyProperties[i] ) ); } } -//------------------------------------------------------------------------ + void ObjectCopySource::copyFilterAndSortingTo( const Reference< XConnection >& _xConnection,const Reference< XPropertySet >& _rxObject ) const { ::std::pair< OUString, OUString > aProperties[] = { @@ -181,7 +170,6 @@ void ObjectCopySource::copyFilterAndSortingTo( const Reference< XConnection >& _ sStatement += sTargetName; sStatement += OUString(" WHERE 0=1"); - for ( size_t i=0; i < SAL_N_ELEMENTS(aProperties); ++i ) { if ( m_xObjectPSI->hasPropertyByName( aProperties[i].first ) ) @@ -209,13 +197,12 @@ void ObjectCopySource::copyFilterAndSortingTo( const Reference< XConnection >& _ { } } -//------------------------------------------------------------------------ + Sequence< OUString > ObjectCopySource::getColumnNames() const { return m_xObjectColumns->getElementNames(); } -//------------------------------------------------------------------------ Sequence< OUString > ObjectCopySource::getPrimaryKeyColumnNames() const { const Reference<XNameAccess> xPrimaryKeyColumns = getPrimaryKeyColumns_throw(m_xObject); @@ -225,13 +212,12 @@ Sequence< OUString > ObjectCopySource::getPrimaryKeyColumnNames() const return aKeyColNames; } -//------------------------------------------------------------------------ OFieldDescription* ObjectCopySource::createFieldDescription( const OUString& _rColumnName ) const { Reference< XPropertySet > xColumn( m_xObjectColumns->getByName( _rColumnName ), UNO_QUERY_THROW ); return new OFieldDescription( xColumn ); } -//------------------------------------------------------------------------ + OUString ObjectCopySource::getSelectStatement() const { OUString sSelectStatement; @@ -269,7 +255,6 @@ OUString ObjectCopySource::getSelectStatement() const return sSelectStatement; } -//------------------------------------------------------------------------ ::utl::SharedUNOComponent< XPreparedStatement > ObjectCopySource::getPreparedSelectStatement() const { ::utl::SharedUNOComponent< XPreparedStatement > xStatement( @@ -279,10 +264,7 @@ OUString ObjectCopySource::getSelectStatement() const return xStatement; } -//======================================================================== -//= NamedTableCopySource -//======================================================================== -//------------------------------------------------------------------------ +// NamedTableCopySource NamedTableCopySource::NamedTableCopySource( const Reference< XConnection >& _rxConnection, const OUString& _rTableName ) :m_xConnection( _rxConnection, UNO_SET_THROW ) ,m_xMetaData( _rxConnection->getMetaData(), UNO_SET_THROW ) @@ -293,13 +275,11 @@ NamedTableCopySource::NamedTableCopySource( const Reference< XConnection >& _rxC impl_ensureColumnInfo_throw(); } -//------------------------------------------------------------------------ OUString NamedTableCopySource::getQualifiedObjectName() const { return m_sTableName; } -//------------------------------------------------------------------------ bool NamedTableCopySource::isView() const { OUString sTableType; @@ -319,16 +299,15 @@ bool NamedTableCopySource::isView() const return sTableType == "VIEW"; } -//------------------------------------------------------------------------ void NamedTableCopySource::copyUISettingsTo( const Reference< XPropertySet >& /*_rxObject*/ ) const { // not supported: we do not have UI settings to copy } -// ----------------------------------------------------------------------------- + void NamedTableCopySource::copyFilterAndSortingTo( const Reference< XConnection >& ,const Reference< XPropertySet >& /*_rxObject*/ ) const { } -//------------------------------------------------------------------------ + void NamedTableCopySource::impl_ensureColumnInfo_throw() { if ( !m_aColumnInfo.empty() ) @@ -356,7 +335,6 @@ void NamedTableCopySource::impl_ensureColumnInfo_throw() } } -//------------------------------------------------------------------------ ::utl::SharedUNOComponent< XPreparedStatement > NamedTableCopySource::impl_ensureStatement_throw() { if ( !m_xStatement.is() ) @@ -364,7 +342,6 @@ void NamedTableCopySource::impl_ensureColumnInfo_throw() return m_xStatement; } -//------------------------------------------------------------------------ Sequence< OUString > NamedTableCopySource::getColumnNames() const { Sequence< OUString > aNames( m_aColumnInfo.size() ); @@ -377,7 +354,6 @@ Sequence< OUString > NamedTableCopySource::getColumnNames() const return aNames; } -//------------------------------------------------------------------------ Sequence< OUString > NamedTableCopySource::getPrimaryKeyColumnNames() const { Sequence< OUString > aPKColNames; @@ -401,7 +377,6 @@ Sequence< OUString > NamedTableCopySource::getPrimaryKeyColumnNames() const return aPKColNames; } -//------------------------------------------------------------------------ OFieldDescription* NamedTableCopySource::createFieldDescription( const OUString& _rColumnName ) const { for ( ::std::vector< OFieldDescription >::const_iterator col = m_aColumnInfo.begin(); @@ -413,7 +388,7 @@ OFieldDescription* NamedTableCopySource::createFieldDescription( const OUString& return NULL; } -//------------------------------------------------------------------------ + OUString NamedTableCopySource::getSelectStatement() const { OUStringBuffer aSQL; @@ -424,15 +399,12 @@ OUString NamedTableCopySource::getSelectStatement() const return aSQL.makeStringAndClear(); } -//------------------------------------------------------------------------ ::utl::SharedUNOComponent< XPreparedStatement > NamedTableCopySource::getPreparedSelectStatement() const { return const_cast< NamedTableCopySource* >( this )->impl_ensureStatement_throw(); } -// ======================================================== // DummyCopySource -// ======================================================== class DummyCopySource : public ICopyTableSourceObject { public: @@ -455,70 +427,62 @@ public: getPreparedSelectStatement() const; }; -//------------------------------------------------------------------------ const DummyCopySource& DummyCopySource::Instance() { static DummyCopySource s_aTheInstance; return s_aTheInstance; } -//------------------------------------------------------------------------ OUString DummyCopySource::getQualifiedObjectName() const { SAL_WARN("dbaccess.ui", "DummyCopySource::getQualifiedObjectName: not to be called!" ); return OUString(); } -//------------------------------------------------------------------------ bool DummyCopySource::isView() const { SAL_WARN("dbaccess.ui", "DummyCopySource::isView: not to be called!" ); return false; } -//------------------------------------------------------------------------ void DummyCopySource::copyUISettingsTo( const Reference< XPropertySet >& /*_rxObject*/ ) const { // no support } -// ----------------------------------------------------------------------------- + void DummyCopySource::copyFilterAndSortingTo( const Reference< XConnection >& ,const Reference< XPropertySet >& /*_rxObject*/ ) const { } -//------------------------------------------------------------------------ + Sequence< OUString > DummyCopySource::getColumnNames() const { return Sequence< OUString >(); } -//------------------------------------------------------------------------ Sequence< OUString > DummyCopySource::getPrimaryKeyColumnNames() const { SAL_WARN("dbaccess.ui", "DummyCopySource::getPrimaryKeyColumnNames: not to be called!" ); return Sequence< OUString >(); } -//------------------------------------------------------------------------ OFieldDescription* DummyCopySource::createFieldDescription( const OUString& /*_rColumnName*/ ) const { SAL_WARN("dbaccess.ui", "DummyCopySource::createFieldDescription: not to be called!" ); return NULL; } -//------------------------------------------------------------------------ + OUString DummyCopySource::getSelectStatement() const { SAL_WARN("dbaccess.ui", "DummyCopySource::getSelectStatement: not to be called!" ); return OUString(); } -//------------------------------------------------------------------------ ::utl::SharedUNOComponent< XPreparedStatement > DummyCopySource::getPreparedSelectStatement() const { SAL_WARN("dbaccess.ui", "DummyCopySource::getPreparedSelectStatement: not to be called!" ); return ::utl::SharedUNOComponent< XPreparedStatement >(); } -//------------------------------------------------------------------------ namespace { bool lcl_canCreateViewFor_nothrow( const Reference< XConnection >& _rxConnection ) @@ -538,10 +502,7 @@ namespace } } -//======================================================================== -//= OCopyTableWizard -//======================================================================== -//------------------------------------------------------------------------ +// OCopyTableWizard OCopyTableWizard::OCopyTableWizard( Window * pParent, const OUString& _rDefaultName, sal_Int16 _nOperation, const ICopyTableSourceObject& _rSourceObject, const Reference< XConnection >& _xSourceConnection, const Reference< XConnection >& _xConnection, const Reference< XComponentContext >& _rxContext, @@ -641,7 +602,6 @@ OCopyTableWizard::OCopyTableWizard( Window * pParent, const OUString& _rDefaultN ActivatePage(); } -// ----------------------------------------------------------------------------- OCopyTableWizard::OCopyTableWizard( Window* pParent, const OUString& _rDefaultName, sal_Int16 _nOperation, const ODatabaseExport::TColumns& _rSourceColumns, const ODatabaseExport::TColumnVector& _rSourceColVec, const Reference< XConnection >& _xConnection, const Reference< XNumberFormatter >& _xFormatter, @@ -694,7 +654,6 @@ OCopyTableWizard::OCopyTableWizard( Window* pParent, const OUString& _rDefaultNa ActivatePage(); } -// ----------------------------------------------------------------------------- void OCopyTableWizard::construct() { SAL_INFO("dbaccess.ui", "OCopyTableWizard::construct" ); @@ -729,7 +688,7 @@ void OCopyTableWizard::construct() m_pTypeInfo->aUIName = m_sTypeNames.GetToken(TYPE_OTHER); m_bAddPKFirstTime = sal_True; } -//------------------------------------------------------------------------ + OCopyTableWizard::~OCopyTableWizard() { DBG_DTOR(OCopyTableWizard,NULL); @@ -752,7 +711,7 @@ OCopyTableWizard::~OCopyTableWizard() m_aTypeInfo.clear(); m_aDestTypeInfoIndex.clear(); } -// ----------------------------------------------------------------------- + IMPL_LINK_NOARG(OCopyTableWizard, ImplPrevHdl) { m_ePressed = WIZARD_PREV; @@ -771,8 +730,6 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplPrevHdl) return 0; } -// ----------------------------------------------------------------------- - IMPL_LINK_NOARG(OCopyTableWizard, ImplNextHdl) { m_ePressed = WIZARD_NEXT; @@ -790,7 +747,7 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplNextHdl) } return 0; } -// ----------------------------------------------------------------------- + sal_Bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::CheckColumns" ); @@ -799,7 +756,6 @@ sal_Bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos) m_vColumnTypes.clear(); OSL_ENSURE( m_xDestConnection.is(), "OCopyTableWizard::CheckColumns: No connection!" ); - ////////////////////////////////////////////////////////////////////// // If database is able to process PrimaryKeys, set PrimaryKey if ( m_xDestConnection.is() ) { @@ -875,7 +831,7 @@ sal_Bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos) } return bRet; } -// ----------------------------------------------------------------------- + IMPL_LINK_NOARG(OCopyTableWizard, ImplOKHdl) { m_ePressed = WIZARD_FINISH; @@ -966,14 +922,13 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplOKHdl) } return bFinish; } -//------------------------------------------------------------------------ + sal_Bool OCopyTableWizard::shouldCreatePrimaryKey() const { SAL_INFO("dbaccess.ui", "OCopyTableWizard::shouldCreatePrimaryKey" ); return m_bCreatePrimaryKeyColumn; } -// ----------------------------------------------------------------------- void OCopyTableWizard::setCreatePrimaryKey( bool _bDoCreate, const OUString& _rSuggestedName ) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::setCreatePrimaryKey" ); @@ -987,7 +942,6 @@ void OCopyTableWizard::setCreatePrimaryKey( bool _bDoCreate, const OUString& _rS pSettingsPage->setCreatePrimaryKey( _bDoCreate, _rSuggestedName ); } -// ----------------------------------------------------------------------- IMPL_LINK_NOARG(OCopyTableWizard, ImplActivateHdl) { OWizardPage* pCurrent = (OWizardPage*)GetPage(GetCurLevel()); @@ -1005,7 +959,7 @@ IMPL_LINK_NOARG(OCopyTableWizard, ImplActivateHdl) } return 0; } -// ----------------------------------------------------------------------- + void OCopyTableWizard::CheckButtons() { SAL_INFO("dbaccess.ui", "OCopyTableWizard::CheckButtons" ); @@ -1029,7 +983,7 @@ void OCopyTableWizard::CheckButtons() // next already has its state } } -// ----------------------------------------------------------------------- + void OCopyTableWizard::EnableButton(Wizard_Button_Style eStyle,sal_Bool bEnable) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::EnableButton" ); @@ -1043,21 +997,21 @@ void OCopyTableWizard::EnableButton(Wizard_Button_Style eStyle,sal_Bool bEnable) pButton->Enable(bEnable); } -// ----------------------------------------------------------------------- + long OCopyTableWizard::DeactivatePage() { SAL_INFO("dbaccess.ui", "OCopyTableWizard::DeactivatePage" ); OWizardPage* pPage = (OWizardPage*)GetPage(GetCurLevel()); return pPage ? pPage->LeavePage() : sal_False; } -// ----------------------------------------------------------------------- + void OCopyTableWizard::AddWizardPage(OWizardPage* pPage) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::AddWizardPage" ); AddPage(pPage); ++m_nPageCount; } -// ----------------------------------------------------------------------------- + void OCopyTableWizard::insertColumn(sal_Int32 _nPos,OFieldDescription* _pField) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::insertColumn" ); @@ -1076,7 +1030,7 @@ void OCopyTableWizard::insertColumn(sal_Int32 _nPos,OFieldDescription* _pField) m_mNameMapping[_pField->GetName()] = _pField->GetName(); } } -// ----------------------------------------------------------------------------- + void OCopyTableWizard::replaceColumn(sal_Int32 _nPos,OFieldDescription* _pField,const OUString& _sOldName) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::replaceColumn" ); @@ -1090,14 +1044,13 @@ void OCopyTableWizard::replaceColumn(sal_Int32 _nPos,OFieldDescription* _pField, m_vDestColumns.insert(ODatabaseExport::TColumns::value_type(_pField->GetName(),_pField)).first; } } -// ----------------------------------------------------------------------------- + void OCopyTableWizard::impl_loadSourceData() { SAL_INFO("dbaccess.ui", "OCopyTableWizard::impl_loadSourceData" ); loadData( m_rSourceObject, m_vSourceColumns, m_vSourceVec ); } -// ----------------------------------------------------------------------------- void OCopyTableWizard::loadData( const ICopyTableSourceObject& _rSourceObject, ODatabaseExport::TColumns& _rColumns, ODatabaseExport::TColumnVector& _rColVector ) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::loadData" ); @@ -1110,7 +1063,6 @@ void OCopyTableWizard::loadData( const ICopyTableSourceObject& _rSourceObject, OFieldDescription* pActFieldDescr = NULL; OUString sCreateParam("x"); - ////////////////////////////////////////////////////////////////////// // ReadOnly-Flag // On drop no line must be editable. // On add only empty lines must be editable. @@ -1158,7 +1110,7 @@ void OCopyTableWizard::loadData( const ICopyTableSourceObject& _rSourceObject, } } } -// ----------------------------------------------------------------------------- + void OCopyTableWizard::clearDestColumns() { SAL_INFO("dbaccess.ui", "OCopyTableWizard::clearDestColumns" ); @@ -1167,7 +1119,6 @@ void OCopyTableWizard::clearDestColumns() m_mNameMapping.clear(); } -// ----------------------------------------------------------------------------- void OCopyTableWizard::appendColumns( Reference<XColumnsSupplier>& _rxColSup, const ODatabaseExport::TColumnVector* _pVec, sal_Bool _bKeyColumns) const { SAL_INFO("dbaccess.ui", "OCopyTableWizard::appendColumns" ); @@ -1218,7 +1169,7 @@ void OCopyTableWizard::appendColumns( Reference<XColumnsSupplier>& _rxColSup, co } } } -// ----------------------------------------------------------------------------- + void OCopyTableWizard::appendKey( Reference<XKeysSupplier>& _rxSup, const ODatabaseExport::TColumnVector* _pVec) const { SAL_INFO("dbaccess.ui", "OCopyTableWizard::appendKey" ); @@ -1246,7 +1197,7 @@ void OCopyTableWizard::appendKey( Reference<XKeysSupplier>& _rxSup, const ODatab } } -// ----------------------------------------------------------------------------- + Reference< XPropertySet > OCopyTableWizard::createView() const { SAL_INFO("dbaccess.ui", "OCopyTableWizard::createView" ); @@ -1256,7 +1207,7 @@ Reference< XPropertySet > OCopyTableWizard::createView() const // but in all those cases, this method here should never be called. return ::dbaui::createView( m_sName, m_xDestConnection, sCommand ); } -// ----------------------------------------------------------------------------- + Reference< XPropertySet > OCopyTableWizard::createTable() { SAL_INFO("dbaccess.ui", "OCopyTableWizard::createTable" ); @@ -1379,7 +1330,6 @@ Reference< XPropertySet > OCopyTableWizard::createTable() return xTable; } -// ----------------------------------------------------------------------------- bool OCopyTableWizard::supportsPrimaryKey( const Reference< XConnection >& _rxConnection ) { OSL_PRECOND( _rxConnection.is(), "OCopyTableWizard::supportsPrimaryKey: invalid connection!" ); @@ -1390,7 +1340,6 @@ bool OCopyTableWizard::supportsPrimaryKey( const Reference< XConnection >& _rxCo return aMetaData.supportsPrimaryKeys(); } -// ----------------------------------------------------------------------------- bool OCopyTableWizard::supportsViews( const Reference< XConnection >& _rxConnection ) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::supportsViews" ); @@ -1433,7 +1382,6 @@ bool OCopyTableWizard::supportsViews( const Reference< XConnection >& _rxConnect return bSupportsViews; } -// ----------------------------------------------------------------------------- sal_Int32 OCopyTableWizard::getMaxColumnNameLength() const { SAL_INFO("dbaccess.ui", "OCopyTableWizard::getMaxColumnNameLength" ); @@ -1452,19 +1400,19 @@ sal_Int32 OCopyTableWizard::getMaxColumnNameLength() const } return nLen; } -// ----------------------------------------------------------------------------- + void OCopyTableWizard::setOperation( const sal_Int16 _nOperation ) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::setOperation" ); m_nOperation = _nOperation; } -// ----------------------------------------------------------------------------- + sal_Int16 OCopyTableWizard::getOperation() const { SAL_INFO("dbaccess.ui", "OCopyTableWizard::getOperation" ); return m_nOperation; } -// ----------------------------------------------------------------------------- + OUString OCopyTableWizard::convertColumnName(const TColumnFindFunctor& _rCmpFunctor, const OUString& _sColumnName, const OUString& _sExtraChars, @@ -1502,14 +1450,12 @@ OUString OCopyTableWizard::convertColumnName(const TColumnFindFunctor& _rCmpFu return sAlias; } -// ----------------------------------------------------------------------------- void OCopyTableWizard::removeColumnNameFromNameMap(const OUString& _sName) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::removeColumnNameFromNameMap" ); m_mNameMapping.erase(_sName); } -// ----------------------------------------------------------------------------- sal_Bool OCopyTableWizard::supportsType(sal_Int32 _nDataType,sal_Int32& _rNewDataType) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::supportsType" ); @@ -1519,7 +1465,6 @@ sal_Bool OCopyTableWizard::supportsType(sal_Int32 _nDataType,sal_Int32& _rNewDat return bRet; } -// ----------------------------------------------------------------------------- TOTypeInfoSP OCopyTableWizard::convertType(const TOTypeInfoSP& _pType,sal_Bool& _bNotConvert) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::convertType" ); @@ -1618,7 +1563,7 @@ TOTypeInfoSP OCopyTableWizard::convertType(const TOTypeInfoSP& _pType,sal_Bool& } return pType; } -// ----------------------------------------------------------------------------- + OUString OCopyTableWizard::createUniqueName(const OUString& _sName) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::createUniqueName" ); @@ -1640,7 +1585,7 @@ OUString OCopyTableWizard::createUniqueName(const OUString& _sName) } return sName; } -// ----------------------------------------------------------------------------- + void OCopyTableWizard::showColumnTypeNotSupported(const OUString& _rColumnName) { SAL_INFO("dbaccess.ui", "OCopyTableWizard::showColumnTypeNotSupported" ); @@ -1648,13 +1593,13 @@ void OCopyTableWizard::showColumnTypeNotSupported(const OUString& _rColumnName) sMessage.SearchAndReplaceAscii("#1",_rColumnName); showError(sMessage); } -//------------------------------------------------------------------------------- + void OCopyTableWizard::showError(const OUString& _sErrorMesage) { SQLExceptionInfo aInfo(_sErrorMesage); showError(aInfo.get()); } -//------------------------------------------------------------------------------- + void OCopyTableWizard::showError(const Any& _aError) { if ( _aError.hasValue() && m_xInteractionHandler.is() ) diff --git a/dbaccess/source/ui/misc/WExtendPages.cxx b/dbaccess/source/ui/misc/WExtendPages.cxx index 463c8f0c2263..e2951567a2a6 100644 --- a/dbaccess/source/ui/misc/WExtendPages.cxx +++ b/dbaccess/source/ui/misc/WExtendPages.cxx @@ -24,7 +24,6 @@ using namespace dbaui; using namespace com::sun::star; -//======================================================================== SvParser* OWizHTMLExtend::createReader(sal_Int32 _nRows) { return new OHTMLReader(*m_pParserStream, @@ -36,7 +35,7 @@ SvParser* OWizHTMLExtend::createReader(sal_Int32 _nRows) m_pParent->getTypeInfo(), m_pParent->shouldCreatePrimaryKey()); } -//======================================================================== + SvParser* OWizRTFExtend::createReader(sal_Int32 _nRows) { return new ORTFReader(*m_pParserStream, @@ -48,7 +47,7 @@ SvParser* OWizRTFExtend::createReader(sal_Int32 _nRows) m_pParent->getTypeInfo(), m_pParent->shouldCreatePrimaryKey()); } -//======================================================================== + OWizNormalExtend::OWizNormalExtend(Window* pParent) : OWizTypeSelect( pParent ) { EnableAuto(sal_False); @@ -64,13 +63,10 @@ OWizNormalExtend::OWizNormalExtend(Window* pParent) : OWizTypeSelect( pParent ) aflSize = m_aTypeControl.GetSizePixel(); m_aTypeControl.SetPosSizePixel(aPos,aNewSize); } -// ----------------------------------------------------------------------------- + SvParser* OWizNormalExtend::createReader(sal_Int32 /*_nRows*/) { return NULL; } -// ----------------------------------------------------------------------------- - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx index 725cba07bf8b..3464db87c6bc 100644 --- a/dbaccess/source/ui/misc/WNameMatch.cxx +++ b/dbaccess/source/ui/misc/WNameMatch.cxx @@ -29,10 +29,8 @@ #include <com/sun/star/sdbc/DataType.hpp> using namespace ::dbaui; -//======================================================================== // OWizColumnSelect DBG_NAME(OWizNameMatching) -//======================================================================== OWizNameMatching::OWizNameMatching( Window* pParent) :OWizardPage( pParent, ModuleRes( TAB_WIZ_NAME_MATCHING ) ) ,m_FT_TABLE_LEFT( this, ModuleRes( FT_TABLE_LEFT ) ) @@ -72,13 +70,12 @@ OWizNameMatching::OWizNameMatching( Window* pParent) FreeResource(); } -// ----------------------------------------------------------------------- + OWizNameMatching::~OWizNameMatching() { DBG_DTOR(OWizNameMatching,NULL); } -// ----------------------------------------------------------------------- void OWizNameMatching::Reset() { // urspr"unglichen zustand wiederherstellen @@ -95,7 +92,7 @@ void OWizNameMatching::Reset() } } -// ----------------------------------------------------------------------- + void OWizNameMatching::ActivatePage( ) { DBG_CHKTHIS(OWizNameMatching,NULL); @@ -111,7 +108,6 @@ void OWizNameMatching::ActivatePage( ) aName += m_pParent->m_sName; m_FT_TABLE_RIGHT.SetText(aName); - m_CTRL_LEFT.FillListBox(*m_pParent->getSrcVector()); m_CTRL_RIGHT.FillListBox(*m_pParent->getDestVector()); @@ -121,11 +117,10 @@ void OWizNameMatching::ActivatePage( ) m_ibColumn_up_right.Enable( m_CTRL_RIGHT.GetEntryCount() > 1 ); m_ibColumn_down_right.Enable( m_CTRL_RIGHT.GetEntryCount() > 1 ); - m_pParent->EnableButton(OCopyTableWizard::WIZARD_NEXT,sal_False); m_CTRL_LEFT.GrabFocus(); } -// ----------------------------------------------------------------------- + sal_Bool OWizNameMatching::LeavePage() { DBG_CHKTHIS(OWizNameMatching,NULL); @@ -137,7 +132,6 @@ sal_Bool OWizNameMatching::LeavePage() m_pParent->m_vColumnPos.resize( pSrcColumns->size(), ODatabaseExport::TPositions::value_type( COLUMN_POSITION_NOT_FOUND, COLUMN_POSITION_NOT_FOUND ) ); m_pParent->m_vColumnTypes.resize( pSrcColumns->size(), COLUMN_POSITION_NOT_FOUND ); - sal_Int32 nParamPos = 0; SvTreeListEntry* pLeftEntry = m_CTRL_LEFT.GetModel()->First(); SvTreeListEntry* pRightEntry = m_CTRL_RIGHT.GetModel()->First(); @@ -185,9 +179,8 @@ sal_Bool OWizNameMatching::LeavePage() return sal_True; } -// ----------------------------------------------------------------------- + String OWizNameMatching::GetTitle() const { return String(ModuleRes(STR_WIZ_NAME_MATCHING_TITEL)); } -// ----------------------------------------------------------------------- IMPL_LINK( OWizNameMatching, ButtonClickHdl, Button *, pButton ) { SvTreeListEntry* pEntry = m_CTRL_LEFT.FirstSelected(); @@ -214,10 +207,9 @@ IMPL_LINK( OWizNameMatching, ButtonClickHdl, Button *, pButton ) TableListClickHdl(&m_CTRL_LEFT); } - return 0; } -//------------------------------------------------------------------------------ + IMPL_LINK( OWizNameMatching, RightButtonClickHdl, Button *, pButton ) { SvTreeListEntry* pEntry = m_CTRL_RIGHT.FirstSelected(); @@ -241,7 +233,7 @@ IMPL_LINK( OWizNameMatching, RightButtonClickHdl, Button *, pButton ) } return 0; } -//------------------------------------------------------------------------------ + IMPL_LINK( OWizNameMatching, TableListClickHdl, void*, /*NOTINTERESTEDIN*/ ) { SvTreeListEntry* pEntry = m_CTRL_LEFT.FirstSelected(); @@ -275,7 +267,7 @@ IMPL_LINK( OWizNameMatching, TableListClickHdl, void*, /*NOTINTERESTEDIN*/ ) return 0; } -//------------------------------------------------------------------------------ + IMPL_LINK( OWizNameMatching, TableListRightSelectHdl, void*, /*NOTINTERESTEDIN*/ ) { SvTreeListEntry* pEntry = m_CTRL_RIGHT.FirstSelected(); @@ -309,7 +301,7 @@ IMPL_LINK( OWizNameMatching, TableListRightSelectHdl, void*, /*NOTINTERESTEDIN*/ return 0; } -// ----------------------------------------------------------------------- + IMPL_LINK( OWizNameMatching, AllNoneClickHdl, Button *, pButton ) { sal_Bool bAll = pButton == &m_pbAll; @@ -322,10 +314,8 @@ IMPL_LINK( OWizNameMatching, AllNoneClickHdl, Button *, pButton ) return 0; } -// ----------------------------------------------------------------------- -//======================================================================== + // class OColumnString -//======================================================================== class OColumnString : public SvLBoxString { sal_Bool m_bReadOnly; @@ -338,7 +328,7 @@ public: virtual void Paint(const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry); }; -//------------------------------------------------------------------------ + void OColumnString::Paint(const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* /*pView*/, const SvTreeListEntry* /*pEntry*/) { if(m_bReadOnly) @@ -349,7 +339,7 @@ void OColumnString::Paint(const Point& rPos, SvTreeListBox& rDev, const SvViewDa } rDev.DrawText( rPos, GetText() ); } -//======================================================================== + OColumnTreeBox::OColumnTreeBox( Window* pParent, const ResId& rResId ) : OMarkableTreeListBox(pParent, rResId) { @@ -358,7 +348,7 @@ OColumnTreeBox::OColumnTreeBox( Window* pParent, const ResId& rResId ) SetStyle(GetStyle() | WB_BORDER | WB_HASBUTTONS | WB_HSCROLL); SetSelectionMode( SINGLE_SELECTION ); } -//------------------------------------------------------------------------ + void OColumnTreeBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr, const Image& rImg1, const Image& rImg2, SvLBoxButtonKind eButtonKind) { DBTreeListBox::InitEntry(pEntry, rStr, rImg1, rImg2, eButtonKind); @@ -366,7 +356,7 @@ void OColumnTreeBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr, co if (pString) pEntry->ReplaceItem( pString, pEntry->ItemCount() - 1 ); } -//------------------------------------------------------------------------ + sal_Bool OColumnTreeBox::Select( SvTreeListEntry* pEntry, sal_Bool bSelect ) { if(bSelect) @@ -379,7 +369,7 @@ sal_Bool OColumnTreeBox::Select( SvTreeListEntry* pEntry, sal_Bool bSelect ) bSelect = DBTreeListBox::Select( pEntry,bSelect ); return bSelect; } -//------------------------------------------------------------------------ + void OColumnTreeBox::FillListBox( const ODatabaseExport::TColumnVector& _rList) { Clear(); @@ -392,10 +382,5 @@ void OColumnTreeBox::FillListBox( const ODatabaseExport::TColumnVector& _rList) SetCheckButtonState( pEntry, eState ); } } -// ----------------------------------------------------------------------------- - - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx index 6d4dc5d036aa..7ca531b36a9e 100644 --- a/dbaccess/source/ui/misc/WTypeSelect.cxx +++ b/dbaccess/source/ui/misc/WTypeSelect.cxx @@ -41,23 +41,21 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::util; using namespace ::com::sun::star::sdbc; -//======================================================================== // OWizTypeSelectControl DBG_NAME(OWizTypeSelectControl) -//======================================================================== OWizTypeSelectControl::OWizTypeSelectControl(Window* pParent, const ResId& rResId,OTableDesignHelpBar* pHelpBar) : OFieldDescControl(pParent,rResId,pHelpBar) { DBG_CTOR(OWizTypeSelectControl,NULL); } -// ----------------------------------------------------------------------------- + OWizTypeSelectControl::~OWizTypeSelectControl() { DBG_DTOR(OWizTypeSelectControl,NULL); } -// ----------------------------------------------------------------------- + void OWizTypeSelectControl::ActivateAggregate( EControlType eType ) { switch(eType ) @@ -71,7 +69,7 @@ void OWizTypeSelectControl::ActivateAggregate( EControlType eType ) OFieldDescControl::ActivateAggregate( eType ); } } -// ----------------------------------------------------------------------- + void OWizTypeSelectControl::DeactivateAggregate( EControlType eType ) { switch(eType ) @@ -85,7 +83,7 @@ void OWizTypeSelectControl::DeactivateAggregate( EControlType eType ) OFieldDescControl::DeactivateAggregate( eType ); } } -// ----------------------------------------------------------------------- + void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId ) { OSL_ENSURE(nRow == -1,"nRow muss -1 sein!"); @@ -173,52 +171,49 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId ) } saveCurrentFieldDescData(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::lang::Locale OWizTypeSelectControl::GetLocale() const { return static_cast<OWizTypeSelect*>(GetParent())->m_pParent->GetLocale(); } -// ----------------------------------------------------------------------------- + Reference< XNumberFormatter > OWizTypeSelectControl::GetFormatter() const { return static_cast<OWizTypeSelect*>(GetParent())->m_pParent->GetFormatter(); } -// ----------------------------------------------------------------------------- + TOTypeInfoSP OWizTypeSelectControl::getTypeInfo(sal_Int32 _nPos) { return static_cast<OWizTypeSelect*>(GetParent())->m_pParent->getDestTypeInfo(_nPos); } -// ----------------------------------------------------------------------------- + const OTypeInfoMap* OWizTypeSelectControl::getTypeInfo() const { return static_cast<OWizTypeSelect*>(GetParent())->m_pParent->getDestTypeInfo(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> OWizTypeSelectControl::getMetaData() { return ((OWizTypeSelect*)GetParent())->m_pParent->m_xDestConnection->getMetaData(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> OWizTypeSelectControl::getConnection() { return ((OWizTypeSelect*)GetParent())->m_pParent->m_xDestConnection; } -// ----------------------------------------------------------------------------- + sal_Bool OWizTypeSelectControl::isAutoIncrementValueEnabled() const { return ((OWizTypeSelect*)GetParent())->m_bAutoIncrementEnabled; } -// ----------------------------------------------------------------------------- + OUString OWizTypeSelectControl::getAutoIncrementValue() const { return ((OWizTypeSelect*)GetParent())->m_sAutoIncrementValue; } -// ----------------------------------------------------------------------------- -//======================================================================== DBG_NAME(OWizTypeSelect); #define IMG_PRIMARY_KEY 1 -//======================================================================== OWizTypeSelect::OWizTypeSelect( Window* pParent, SvStream* _pStream ) :OWizardPage( pParent, ModuleRes( TAB_WIZ_TYPE_SELECT )) ,m_lbColumnNames( this, ModuleRes( LB_NEW_COLUMN_NAMES ) ) @@ -259,23 +254,23 @@ OWizTypeSelect::OWizTypeSelect( Window* pParent, SvStream* _pStream ) FreeResource(); } -// ----------------------------------------------------------------------- + OWizTypeSelect::~OWizTypeSelect() { DBG_DTOR(OWizTypeSelect,NULL); } -// ----------------------------------------------------------------------------- + String OWizTypeSelect::GetTitle() const { DBG_CHKTHIS(OWizTypeSelect,NULL); return String(ModuleRes(STR_WIZ_TYPE_SELECT_TITEL)); } -// ----------------------------------------------------------------------- + void OWizTypeSelect::Resize() { DBG_CHKTHIS(OWizTypeSelect,NULL); } -// ----------------------------------------------------------------------- + IMPL_LINK( OWizTypeSelect, ColumnSelectHdl, MultiListBox *, /*pListBox*/ ) { String aColumnName( m_lbColumnNames.GetSelectEntry() ); @@ -287,7 +282,7 @@ IMPL_LINK( OWizTypeSelect, ColumnSelectHdl, MultiListBox *, /*pListBox*/ ) m_aTypeControl.Enable(m_lbColumnNames.GetSelectEntryCount() == 1 ); return 0; } -// ----------------------------------------------------------------------- + void OWizTypeSelect::Reset() { // restore original state @@ -313,7 +308,7 @@ void OWizTypeSelect::Reset() } m_bFirstTime = sal_False; } -// ----------------------------------------------------------------------- + void OWizTypeSelect::ActivatePage( ) { DBG_CHKTHIS(OWizTypeSelect,NULL); @@ -325,7 +320,7 @@ void OWizTypeSelect::ActivatePage( ) m_nDisplayRow = 0; m_lbColumnNames.GetSelectHdl().Call(&m_lbColumnNames); } -// ----------------------------------------------------------------------- + sal_Bool OWizTypeSelect::LeavePage() { DBG_CHKTHIS(OWizTypeSelect,NULL); @@ -340,7 +335,7 @@ sal_Bool OWizTypeSelect::LeavePage() } return !bDuplicateName; } -//------------------------------------------------------------------------------ + void OWizTypeSelect::EnableAuto(sal_Bool bEnable) { DBG_CHKTHIS(OWizTypeSelect,NULL); @@ -349,7 +344,7 @@ void OWizTypeSelect::EnableAuto(sal_Bool bEnable) m_pbAuto.Show(bEnable); m_flAutoType.Show(bEnable); } -//------------------------------------------------------------------------------ + IMPL_LINK( OWizTypeSelect, ButtonClickHdl, Button *, /*pButton*/ ) { DBG_CHKTHIS(OWizTypeSelect,NULL); @@ -361,7 +356,7 @@ IMPL_LINK( OWizTypeSelect, ButtonClickHdl, Button *, /*pButton*/ ) return 0; } -//------------------------------------------------------------------------ + sal_Bool OWizTypeSelectList::IsPrimaryKeyAllowed() const { DBG_CHKTHIS(OWizTypeSelect,NULL); @@ -376,7 +371,7 @@ sal_Bool OWizTypeSelectList::IsPrimaryKeyAllowed() const } return j == nCount; } -// ----------------------------------------------------------------------------- + void OWizTypeSelectList::setPrimaryKey(OFieldDescription* _pFieldDescr,sal_uInt16 _nPos,sal_Bool _bSet) { String sColumnName = GetEntry(_nPos); @@ -391,7 +386,7 @@ void OWizTypeSelectList::setPrimaryKey(OFieldDescription* _pFieldDescr,sal_uInt1 } SetEntryData(_nPos,_pFieldDescr); } -//------------------------------------------------------------------------ + long OWizTypeSelectList::PreNotify( NotifyEvent& rEvt ) { long nDone = 0; @@ -447,7 +442,7 @@ long OWizTypeSelectList::PreNotify( NotifyEvent& rEvt ) } return nDone ? nDone : MultiListBox::PreNotify(rEvt); } -// ----------------------------------------------------------------------------- + void OWizTypeSelect::fillColumnList(sal_uInt32 nRows) { DBG_CHKTHIS(OWizTypeSelect,NULL); @@ -465,7 +460,5 @@ void OWizTypeSelect::fillColumnList(sal_uInt32 nRows) m_pParserStream->Seek(nTell); } } -// ----------------------------------------------------------------------------- - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/asyncmodaldialog.cxx b/dbaccess/source/ui/misc/asyncmodaldialog.cxx index 40337deda37b..2096c7a293c9 100644 --- a/dbaccess/source/ui/misc/asyncmodaldialog.cxx +++ b/dbaccess/source/ui/misc/asyncmodaldialog.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "asyncmodaldialog.hxx" #include <com/sun/star/lang/IllegalArgumentException.hpp> @@ -25,19 +24,15 @@ #include <vcl/svapp.hxx> #include <tools/diagnose_ex.h> -//........................................................................ namespace dbaui { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::ui::dialogs::XExecutableDialog; using ::com::sun::star::lang::IllegalArgumentException; using ::com::sun::star::uno::Exception; - //==================================================================== - //= AsyncDialogExecutor - //==================================================================== + // AsyncDialogExecutor class DialogExecutor_Impl { Reference< XExecutableDialog > m_xDialog; @@ -62,7 +57,6 @@ namespace dbaui DECL_LINK( onExecute, void* ); }; - //-------------------------------------------------------------------- IMPL_LINK( DialogExecutor_Impl, onExecute, void*, /* _notInterestedIn */ ) { try @@ -78,23 +72,17 @@ namespace dbaui return 0L; } - //==================================================================== - //= AsyncDialogExecutor - //==================================================================== - //-------------------------------------------------------------------- + // AsyncDialogExecutor void AsyncDialogExecutor::executeModalDialogAsync( const Reference< XExecutableDialog >& _rxDialog ) { if ( !_rxDialog.is() ) throw IllegalArgumentException(); - DialogExecutor_Impl* pExecutor = new DialogExecutor_Impl( _rxDialog ); pExecutor->execute(); // will delete itself } -//........................................................................ } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/charsets.cxx b/dbaccess/source/ui/misc/charsets.cxx index b20859fa6759..4df0a3562b11 100644 --- a/dbaccess/source/ui/misc/charsets.cxx +++ b/dbaccess/source/ui/misc/charsets.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "charsets.hxx" #include <osl/diagnose.h> #include "dbu_misc.hrc" @@ -25,16 +24,11 @@ #include <tools/rcid.h> #include "localresaccess.hxx" -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::dbtools; - //========================================================================= - //= OCharsetDisplay - //========================================================================= - //------------------------------------------------------------------------- + // OCharsetDisplay OCharsetDisplay::OCharsetDisplay() :OCharsetMap() ,SvxTextEncodingTable() @@ -45,7 +39,6 @@ namespace dbaui } } - //------------------------------------------------------------------------- sal_Bool OCharsetDisplay::approveEncoding( const rtl_TextEncoding _eEncoding, const rtl_TextEncodingInfo& _rInfo ) const { if ( !OCharsetMap::approveEncoding( _eEncoding, _rInfo ) ) @@ -57,33 +50,28 @@ namespace dbaui return !GetTextString(_eEncoding).isEmpty(); } - //------------------------------------------------------------------------- OCharsetDisplay::const_iterator OCharsetDisplay::begin() const { return const_iterator( this, OCharsetMap::begin() ); } - //------------------------------------------------------------------------- OCharsetDisplay::const_iterator OCharsetDisplay::end() const { return const_iterator( this, OCharsetMap::end() ); } - //------------------------------------------------------------------------- OCharsetDisplay::const_iterator OCharsetDisplay::findEncoding(const rtl_TextEncoding _eEncoding) const { OCharsetMap::const_iterator aBaseIter = OCharsetMap::find(_eEncoding); return const_iterator( this, aBaseIter ); } - //------------------------------------------------------------------------- OCharsetDisplay::const_iterator OCharsetDisplay::findIanaName(const OUString& _rIanaName) const { OCharsetMap::const_iterator aBaseIter = OCharsetMap::find(_rIanaName, OCharsetMap::IANA()); return const_iterator( this, aBaseIter ); } - //------------------------------------------------------------------------- OCharsetDisplay::const_iterator OCharsetDisplay::findDisplayName(const OUString& _rDisplayName) const { rtl_TextEncoding eEncoding = RTL_TEXTENCODING_DONTKNOW; @@ -96,17 +84,13 @@ namespace dbaui return const_iterator( this, OCharsetMap::find( eEncoding ) ); } - //========================================================================= - //= CharsetDisplayDerefHelper - //========================================================================= - //------------------------------------------------------------------------- + // CharsetDisplayDerefHelper CharsetDisplayDerefHelper::CharsetDisplayDerefHelper(const CharsetDisplayDerefHelper& _rSource) :CharsetDisplayDerefHelper_Base(_rSource) ,m_sDisplayName(_rSource.m_sDisplayName) { } - //------------------------------------------------------------------------- CharsetDisplayDerefHelper::CharsetDisplayDerefHelper(const CharsetDisplayDerefHelper_Base& _rBase, const OUString& _rDisplayName) :CharsetDisplayDerefHelper_Base(_rBase) ,m_sDisplayName(_rDisplayName) @@ -114,10 +98,7 @@ namespace dbaui OSL_ENSURE( !m_sDisplayName.isEmpty(), "CharsetDisplayDerefHelper::CharsetDisplayDerefHelper: invalid display name!" ); } - //========================================================================= - //= OCharsetDisplay::ExtendedCharsetIterator - //========================================================================= - //------------------------------------------------------------------------- + // OCharsetDisplay::ExtendedCharsetIterator OCharsetDisplay::ExtendedCharsetIterator::ExtendedCharsetIterator( const OCharsetDisplay* _pContainer, const base_iterator& _rPosition ) :m_pContainer(_pContainer) ,m_aPosition(_rPosition) @@ -125,14 +106,12 @@ namespace dbaui OSL_ENSURE(m_pContainer, "OCharsetDisplay::ExtendedCharsetIterator::ExtendedCharsetIterator : invalid container!"); } - //------------------------------------------------------------------------- OCharsetDisplay::ExtendedCharsetIterator::ExtendedCharsetIterator(const ExtendedCharsetIterator& _rSource) :m_pContainer( _rSource.m_pContainer ) ,m_aPosition( _rSource.m_aPosition ) { } - //------------------------------------------------------------------------- CharsetDisplayDerefHelper OCharsetDisplay::ExtendedCharsetIterator::operator*() const { OSL_ENSURE( m_aPosition != m_pContainer->OCharsetDisplay_Base::end(), "OCharsetDisplay::ExtendedCharsetIterator::operator* : invalid position!"); @@ -144,7 +123,6 @@ namespace dbaui ); } - //------------------------------------------------------------------------- const OCharsetDisplay::ExtendedCharsetIterator& OCharsetDisplay::ExtendedCharsetIterator::operator++() { OSL_ENSURE( m_aPosition != m_pContainer->OCharsetDisplay_Base::end(), "OCharsetDisplay::ExtendedCharsetIterator::operator++ : invalid position!"); @@ -153,7 +131,6 @@ namespace dbaui return *this; } - //------------------------------------------------------------------------- const OCharsetDisplay::ExtendedCharsetIterator& OCharsetDisplay::ExtendedCharsetIterator::operator--() { OSL_ENSURE( m_aPosition != m_pContainer->OCharsetDisplay_Base::begin(), "OCharsetDisplay::ExtendedCharsetIterator::operator-- : invalid position!"); @@ -162,14 +139,11 @@ namespace dbaui return *this; } - //------------------------------------------------------------------------- bool operator==(const OCharsetDisplay::ExtendedCharsetIterator& lhs, const OCharsetDisplay::ExtendedCharsetIterator& rhs) { return (lhs.m_pContainer == rhs.m_pContainer) && (lhs.m_aPosition == rhs.m_aPosition); } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/controllerframe.cxx b/dbaccess/source/ui/misc/controllerframe.cxx index 8ba38f3234d3..57823cdab027 100644 --- a/dbaccess/source/ui/misc/controllerframe.cxx +++ b/dbaccess/source/ui/misc/controllerframe.cxx @@ -34,10 +34,8 @@ #include <toolkit/helper/vclunohelper.hxx> #include <vcl/window.hxx> -//........................................................................ namespace dbaui { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -67,9 +65,7 @@ namespace dbaui using ::com::sun::star::document::XDocumentEventBroadcaster; using ::com::sun::star::awt::XWindow; - //==================================================================== - //= FrameWindowActivationListener - //==================================================================== + // FrameWindowActivationListener typedef ::cppu::WeakImplHelper1 < XTopWindowListener > FrameWindowActivationListener_Base; class FrameWindowActivationListener : public FrameWindowActivationListener_Base @@ -102,9 +98,7 @@ namespace dbaui ControllerFrame_Data* m_pData; }; - //==================================================================== - //= ControllerFrame_Data - //==================================================================== + // ControllerFrame_Data struct ControllerFrame_Data { ControllerFrame_Data( IController& _rController ) @@ -125,10 +119,7 @@ namespace dbaui bool m_bIsTopLevelDocumentWindow; }; - //==================================================================== - //= helper - //==================================================================== - //-------------------------------------------------------------------- + // helper static void lcl_setFrame_nothrow( ControllerFrame_Data& _rData, const Reference< XFrame >& _rxFrame ) { // release old listener @@ -159,7 +150,6 @@ namespace dbaui } } - //-------------------------------------------------------------------- static bool lcl_isActive_nothrow( const Reference< XFrame >& _rxFrame ) { bool bIsActive = false; @@ -179,7 +169,6 @@ namespace dbaui return bIsActive; } - //-------------------------------------------------------------------- /** updates various global and local states with a new active component In particular, the following are updated @@ -214,7 +203,6 @@ namespace dbaui } } - //-------------------------------------------------------------------- /** broadcasts the OnFocus resp. OnUnfocus event */ static void lcl_notifyFocusChange_nothrow( ControllerFrame_Data& _rData, bool _bActive ) @@ -234,7 +222,6 @@ namespace dbaui } } - //-------------------------------------------------------------------- static void lcl_updateActive_nothrow( ControllerFrame_Data& _rData, bool _bActive ) { if ( _rData.m_bActive == _bActive ) @@ -245,26 +232,22 @@ namespace dbaui lcl_notifyFocusChange_nothrow( _rData, _bActive ); } - //-------------------------------------------------------------------- FrameWindowActivationListener::FrameWindowActivationListener( ControllerFrame_Data& _rData ) :m_pData( &_rData ) { impl_registerOnFrameContainerWindow_nothrow( true ); } - //-------------------------------------------------------------------- FrameWindowActivationListener::~FrameWindowActivationListener() { } - //-------------------------------------------------------------------- void FrameWindowActivationListener::dispose() { impl_registerOnFrameContainerWindow_nothrow( false ); m_pData = NULL; } - //-------------------------------------------------------------------- void FrameWindowActivationListener::impl_registerOnFrameContainerWindow_nothrow( bool _bRegister ) { OSL_ENSURE( m_pData && m_pData->m_xFrame.is(), "FrameWindowActivationListener::impl_registerOnFrameContainerWindow_nothrow: no frame!" ); @@ -295,78 +278,64 @@ namespace dbaui } } - //-------------------------------------------------------------------- void FrameWindowActivationListener::impl_checkDisposed_throw() const { if ( !m_pData ) throw DisposedException( OUString(), *const_cast< FrameWindowActivationListener* >( this ) ); } - //-------------------------------------------------------------------- void SAL_CALL FrameWindowActivationListener::windowOpened( const EventObject& /*_rEvent*/ ) throw (RuntimeException) { // not interested in } - //-------------------------------------------------------------------- void SAL_CALL FrameWindowActivationListener::windowClosing( const EventObject& /*_rEvent*/ ) throw (RuntimeException) { // not interested in } - //-------------------------------------------------------------------- void SAL_CALL FrameWindowActivationListener::windowClosed( const EventObject& /*_rEvent*/ ) throw (RuntimeException) { // not interested in } - //-------------------------------------------------------------------- void SAL_CALL FrameWindowActivationListener::windowMinimized( const EventObject& /*_rEvent*/ ) throw (RuntimeException) { // not interested in } - //-------------------------------------------------------------------- void SAL_CALL FrameWindowActivationListener::windowNormalized( const EventObject& /*_rEvent*/ ) throw (RuntimeException) { // not interested in } - //-------------------------------------------------------------------- void SAL_CALL FrameWindowActivationListener::windowActivated( const EventObject& /*_rEvent*/ ) throw (RuntimeException) { impl_checkDisposed_throw(); lcl_updateActive_nothrow( *m_pData, true ); } - //-------------------------------------------------------------------- void SAL_CALL FrameWindowActivationListener::windowDeactivated( const EventObject& /*_rEvent*/ ) throw (RuntimeException) { impl_checkDisposed_throw(); lcl_updateActive_nothrow( *m_pData, false ); } - //-------------------------------------------------------------------- void SAL_CALL FrameWindowActivationListener::disposing( const EventObject& /*_rEvent*/ ) throw (RuntimeException) { dispose(); } - //==================================================================== - //= ControllerFrame - //==================================================================== - //-------------------------------------------------------------------- + // ControllerFrame ControllerFrame::ControllerFrame( IController& _rController ) :m_pData( new ControllerFrame_Data( _rController ) ) { } - //-------------------------------------------------------------------- ControllerFrame::~ControllerFrame() { } - //-------------------------------------------------------------------- const Reference< XFrame >& ControllerFrame::attachFrame( const Reference< XFrame >& _rxFrame ) { // set new frame, including listener handling @@ -385,19 +354,16 @@ namespace dbaui return m_pData->m_xFrame; } - //-------------------------------------------------------------------- const Reference< XFrame >& ControllerFrame::getFrame() const { return m_pData->m_xFrame; } - //-------------------------------------------------------------------- bool ControllerFrame::isActive() const { return m_pData->m_bActive; } - //-------------------------------------------------------------------- void ControllerFrame::frameAction( FrameAction _eAction ) { bool bActive = m_pData->m_bActive; @@ -421,8 +387,6 @@ namespace dbaui lcl_updateActive_nothrow( *m_pData, bActive ); } -//........................................................................ } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/databaseobjectview.cxx b/dbaccess/source/ui/misc/databaseobjectview.cxx index d0ac14e38569..33384c030f0e 100644 --- a/dbaccess/source/ui/misc/databaseobjectview.cxx +++ b/dbaccess/source/ui/misc/databaseobjectview.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "databaseobjectview.hxx" #include "dbustrings.hrc" #include "asyncmodaldialog.hxx" @@ -41,10 +40,8 @@ #include <tools/diagnose_ex.h> #include <vcl/window.hxx> -// ......................................................................... namespace dbaui { -// ......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdbc; @@ -56,9 +53,7 @@ namespace dbaui using namespace ::com::sun::star::beans; using namespace ::com::sun::star::awt; - //====================================================================== - //= DatabaseObjectView - //====================================================================== + // DatabaseObjectView DatabaseObjectView::DatabaseObjectView( const Reference< XComponentContext >& _rxORB, const Reference< XDatabaseDocumentUI >& _rxApplication, const Reference< XFrame >& _rxParentFrame, @@ -73,7 +68,6 @@ namespace dbaui OSL_ENSURE( m_xApplication.is(), "DatabaseObjectView::DatabaseObjectView: invalid connection!" ); } - //---------------------------------------------------------------------- Reference< XConnection > DatabaseObjectView::getConnection() const { Reference< XConnection > xConnection; @@ -82,20 +76,17 @@ namespace dbaui return xConnection; } - //---------------------------------------------------------------------- Reference< XComponent > DatabaseObjectView::createNew( const Reference< XDataSource >& _xDataSource, const ::comphelper::NamedValueCollection& i_rDispatchArgs ) { return doCreateView( makeAny( _xDataSource ), OUString(), i_rDispatchArgs ); } - //---------------------------------------------------------------------- Reference< XComponent > DatabaseObjectView::openExisting( const Any& _rDataSource, const OUString& _rName, const ::comphelper::NamedValueCollection& i_rDispatchArgs ) { return doCreateView( _rDataSource, _rName, i_rDispatchArgs ); } - //---------------------------------------------------------------------- Reference< XComponent > DatabaseObjectView::doCreateView( const Any& _rDataSource, const OUString& _rObjectName, const ::comphelper::NamedValueCollection& i_rCreationArgs ) { @@ -108,7 +99,6 @@ namespace dbaui return doDispatch( aDispatchArgs ); } - //---------------------------------------------------------------------- Reference< XComponent > DatabaseObjectView::doDispatch( const ::comphelper::NamedValueCollection& i_rDispatchArgs ) { Reference< XComponent > xReturn; @@ -164,7 +154,6 @@ namespace dbaui return xReturn; } - //---------------------------------------------------------------------- void DatabaseObjectView::fillDispatchArgs( ::comphelper::NamedValueCollection& i_rDispatchArgs, const Any& _aDataSource, @@ -185,10 +174,7 @@ namespace dbaui i_rDispatchArgs.put( (OUString)PROPERTY_ACTIVE_CONNECTION, getConnection() ); } - //====================================================================== - //= QueryDesigner - //====================================================================== - //---------------------------------------------------------------------- + // QueryDesigner QueryDesigner::QueryDesigner( const Reference< XComponentContext >& _rxORB, const Reference< XDatabaseDocumentUI >& _rxApplication, const Reference< XFrame >& _rxParentFrame, bool _bCreateView ) :DatabaseObjectView( _rxORB, _rxApplication, _rxParentFrame, _bCreateView ? OUString(URL_COMPONENT_VIEWDESIGN) : OUString(URL_COMPONENT_QUERYDESIGN) ) @@ -196,7 +182,6 @@ namespace dbaui { } - //---------------------------------------------------------------------- void QueryDesigner::fillDispatchArgs( ::comphelper::NamedValueCollection& i_rDispatchArgs, const Any& _aDataSource, const OUString& _rObjectName ) { @@ -219,16 +204,12 @@ namespace dbaui } } - //====================================================================== - //= TableDesigner - //====================================================================== - //---------------------------------------------------------------------- + // TableDesigner TableDesigner::TableDesigner( const Reference< XComponentContext >& _rxORB, const Reference< XDatabaseDocumentUI >& _rxApplication, const Reference< XFrame >& _rxParentFrame ) :DatabaseObjectView( _rxORB, _rxApplication, _rxParentFrame, static_cast< OUString >( URL_COMPONENT_TABLEDESIGN ) ) { } - //---------------------------------------------------------------------- void TableDesigner::fillDispatchArgs( ::comphelper::NamedValueCollection& i_rDispatchArgs, const Any& _aDataSource, const OUString& _rObjectName ) { @@ -240,7 +221,6 @@ namespace dbaui } } - //---------------------------------------------------------------------- Reference< XComponent > TableDesigner::doCreateView( const Any& _rDataSource, const OUString& _rObjectName, const ::comphelper::NamedValueCollection& i_rCreationArgs ) { @@ -268,7 +248,6 @@ namespace dbaui return xDesignerComponent; } - //---------------------------------------------------------------------- Reference< XInterface > TableDesigner::impl_getConnectionProvidedDesigner_nothrow( const OUString& _rTableName ) { Reference< XInterface > xDesigner; @@ -285,10 +264,7 @@ namespace dbaui return xDesigner; } - //====================================================================== - //= ResultSetBrowser - //====================================================================== - //---------------------------------------------------------------------- + // ResultSetBrowser ResultSetBrowser::ResultSetBrowser( const Reference< XComponentContext >& _rxORB, const Reference< XDatabaseDocumentUI >& _rxApplication, const Reference< XFrame >& _rxParentFrame, sal_Bool _bTable ) :DatabaseObjectView( _rxORB, _rxApplication, _rxParentFrame, static_cast < OUString >( URL_COMPONENT_DATASOURCEBROWSER ) ) @@ -296,7 +272,6 @@ namespace dbaui { } - //---------------------------------------------------------------------- void ResultSetBrowser::fillDispatchArgs( ::comphelper::NamedValueCollection& i_rDispatchArgs, const Any& _aDataSource, const OUString& _rQualifiedName) { @@ -320,16 +295,11 @@ namespace dbaui } } - //====================================================================== - //= RelationDesigner - //====================================================================== - //---------------------------------------------------------------------- + // RelationDesigner RelationDesigner::RelationDesigner( const Reference< XComponentContext >& _rxORB, const Reference< XDatabaseDocumentUI >& _rxApplication, const Reference< XFrame >& _rxParentFrame ) :DatabaseObjectView( _rxORB, _rxApplication, _rxParentFrame, static_cast< OUString >( URL_COMPONENT_RELATIONDESIGN ) ) { } -// ......................................................................... } // namespace dbaui -// ......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/datasourceconnector.cxx b/dbaccess/source/ui/misc/datasourceconnector.cxx index 1f4ec63bcbdc..150fbecafb26 100644 --- a/dbaccess/source/ui/misc/datasourceconnector.cxx +++ b/dbaccess/source/ui/misc/datasourceconnector.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "datasourceconnector.hxx" #include <osl/diagnose.h> #include "dbustrings.hrc" @@ -43,10 +42,8 @@ #include "dbu_misc.hrc" #include "moduledbu.hxx" -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -59,17 +56,13 @@ namespace dbaui using namespace ::dbtools; using ::svt::OFileNotation; - //===================================================================== - //= ODatasourceConnector - //===================================================================== - //--------------------------------------------------------------------- + // ODatasourceConnector ODatasourceConnector::ODatasourceConnector(const Reference< XComponentContext >& _rxContext, Window* _pMessageParent) :m_pErrorMessageParent(_pMessageParent) ,m_xContext(_rxContext) { } - //--------------------------------------------------------------------- ODatasourceConnector::ODatasourceConnector( const Reference< XComponentContext >& _rxContext, Window* _pMessageParent, const OUString& _rContextInformation ) :m_pErrorMessageParent(_pMessageParent) @@ -78,7 +71,6 @@ namespace dbaui { } - //--------------------------------------------------------------------- Reference< XConnection > ODatasourceConnector::connect( const OUString& _rDataSourceName, ::dbtools::SQLExceptionInfo* _pErrorInfo ) const { @@ -99,7 +91,6 @@ namespace dbaui return xConnection; } - //--------------------------------------------------------------------- Reference< XConnection > ODatasourceConnector::connect(const Reference< XDataSource>& _xDataSource, ::dbtools::SQLExceptionInfo* _pErrorInfo ) const { @@ -213,8 +204,6 @@ namespace dbaui return xConnection; } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/dbaundomanager.cxx b/dbaccess/source/ui/misc/dbaundomanager.cxx index 1dd1e1b74eaa..60e063b8da57 100644 --- a/dbaccess/source/ui/misc/dbaundomanager.cxx +++ b/dbaccess/source/ui/misc/dbaundomanager.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <dbaccess/dbaundomanager.hxx> #include <com/sun/star/lang/DisposedException.hpp> @@ -26,10 +25,8 @@ #include <vcl/svapp.hxx> #include <framework/undomanagerhelper.hxx> -//...................................................................................................................... namespace dbaui { -//...................................................................................................................... using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -54,9 +51,7 @@ namespace dbaui using ::com::sun::star::util::NotLockedException; using ::com::sun::star::lang::NoSupportException; - //================================================================================================================== - //= UndoManager_Impl - //================================================================================================================== + // UndoManager_Impl struct UndoManager_Impl : public ::framework::IUndoManagerImplementation { UndoManager_Impl( UndoManager& i_antiImpl, ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex ) @@ -85,21 +80,17 @@ namespace dbaui virtual Reference< XUndoManager > getThis(); }; - //------------------------------------------------------------------------------------------------------------------ ::svl::IUndoManager& UndoManager_Impl::getImplUndoManager() { return aUndoManager; } - //------------------------------------------------------------------------------------------------------------------ Reference< XUndoManager > UndoManager_Impl::getThis() { return static_cast< XUndoManager* >( &rAntiImpl ); } - //============================================================================================================== - //= OslMutexFacade - //============================================================================================================== + // OslMutexFacade class OslMutexFacade : public ::framework::IMutex { public: @@ -117,21 +108,17 @@ namespace dbaui ::osl::Mutex& m_rMutex; }; - //-------------------------------------------------------------------------------------------------------------- void OslMutexFacade::acquire() { m_rMutex.acquire(); } - //-------------------------------------------------------------------------------------------------------------- void OslMutexFacade::release() { m_rMutex.release(); } - //============================================================================================================== - //= UndoManagerMethodGuard - //============================================================================================================== + // UndoManagerMethodGuard /** guard for public UNO methods of the UndoManager */ class UndoManagerMethodGuard : public ::framework::IMutexGuard @@ -161,57 +148,46 @@ namespace dbaui OslMutexFacade m_aMutexFacade; }; - //-------------------------------------------------------------------------------------------------------------- ::framework::IMutex& UndoManagerMethodGuard::getGuardedMutex() { return m_aMutexFacade; } - //-------------------------------------------------------------------------------------------------------------- void UndoManagerMethodGuard::clear() { m_aGuard.clear(); } - //-------------------------------------------------------------------------------------------------------------- void UndoManagerMethodGuard::reset() { m_aGuard.reset(); } - //================================================================================================================== - //= UndoManager - //================================================================================================================== - //------------------------------------------------------------------------------------------------------------------ + // UndoManager UndoManager::UndoManager( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex ) :m_pImpl( new UndoManager_Impl( *this, i_parent, i_mutex ) ) { } - //------------------------------------------------------------------------------------------------------------------ UndoManager::~UndoManager() { } - //------------------------------------------------------------------------------------------------------------------ SfxUndoManager& UndoManager::GetSfxUndoManager() const { return m_pImpl->aUndoManager; } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL UndoManager::acquire( ) throw () { m_pImpl->rParent.acquire(); } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL UndoManager::release( ) throw () { m_pImpl->rParent.release(); } - //------------------------------------------------------------------------------------------------------------------ void UndoManager::disposing() { { @@ -221,35 +197,30 @@ namespace dbaui m_pImpl->aUndoHelper.disposing(); } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL UndoManager::enterUndoContext( const OUString& i_title ) throw (RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); m_pImpl->aUndoHelper.enterUndoContext( i_title, aGuard ); } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL UndoManager::enterHiddenUndoContext( ) throw (EmptyUndoStackException, RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); m_pImpl->aUndoHelper.enterHiddenUndoContext( aGuard ); } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL UndoManager::leaveUndoContext( ) throw (InvalidStateException, RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); m_pImpl->aUndoHelper.leaveUndoContext( aGuard ); } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL UndoManager::addUndoAction( const Reference< XUndoAction >& i_action ) throw (IllegalArgumentException, RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); m_pImpl->aUndoHelper.addUndoAction( i_action, aGuard ); } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL UndoManager::undo( ) throw (EmptyUndoStackException, UndoContextNotClosedException, UndoFailedException, RuntimeException) { SolarMutexGuard aSolarGuard; @@ -258,7 +229,6 @@ namespace dbaui m_pImpl->aUndoHelper.undo( aGuard ); } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL UndoManager::redo( ) throw (EmptyUndoStackException, UndoContextNotClosedException, UndoFailedException, RuntimeException) { SolarMutexGuard aSolarGuard; @@ -267,120 +237,102 @@ namespace dbaui m_pImpl->aUndoHelper.redo( aGuard ); } - //------------------------------------------------------------------------------------------------------------------ ::sal_Bool SAL_CALL UndoManager::isUndoPossible( ) throw (RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); return m_pImpl->aUndoHelper.isUndoPossible(); } - //------------------------------------------------------------------------------------------------------------------ ::sal_Bool SAL_CALL UndoManager::isRedoPossible( ) throw (RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); return m_pImpl->aUndoHelper.isRedoPossible(); } - //------------------------------------------------------------------------------------------------------------------ OUString SAL_CALL UndoManager::getCurrentUndoActionTitle( ) throw (EmptyUndoStackException, RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); return m_pImpl->aUndoHelper.getCurrentUndoActionTitle(); } - //------------------------------------------------------------------------------------------------------------------ OUString SAL_CALL UndoManager::getCurrentRedoActionTitle( ) throw (EmptyUndoStackException, RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); return m_pImpl->aUndoHelper.getCurrentRedoActionTitle(); } - //------------------------------------------------------------------------------------------------------------------ Sequence< OUString > SAL_CALL UndoManager::getAllUndoActionTitles( ) throw (RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); return m_pImpl->aUndoHelper.getAllUndoActionTitles(); } - //------------------------------------------------------------------------------------------------------------------ Sequence< OUString > SAL_CALL UndoManager::getAllRedoActionTitles( ) throw (RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); return m_pImpl->aUndoHelper.getAllRedoActionTitles(); } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL UndoManager::clear( ) throw (UndoContextNotClosedException, RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); m_pImpl->aUndoHelper.clear( aGuard ); } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL UndoManager::clearRedo( ) throw (UndoContextNotClosedException, RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); m_pImpl->aUndoHelper.clearRedo( aGuard ); } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL UndoManager::reset( ) throw (RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); m_pImpl->aUndoHelper.reset( aGuard ); } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL UndoManager::addUndoManagerListener( const Reference< XUndoManagerListener >& i_listener ) throw (RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); m_pImpl->aUndoHelper.addUndoManagerListener( i_listener ); } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL UndoManager::removeUndoManagerListener( const Reference< XUndoManagerListener >& i_listener ) throw (RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); m_pImpl->aUndoHelper.removeUndoManagerListener( i_listener ); } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL UndoManager::lock( ) throw (RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); m_pImpl->aUndoHelper.lock(); } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL UndoManager::unlock( ) throw (NotLockedException, RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); m_pImpl->aUndoHelper.unlock(); } - //------------------------------------------------------------------------------------------------------------------ ::sal_Bool SAL_CALL UndoManager::isLocked( ) throw (RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); return m_pImpl->aUndoHelper.isLocked(); } - //------------------------------------------------------------------------------------------------------------------ Reference< XInterface > SAL_CALL UndoManager::getParent( ) throw (RuntimeException) { UndoManagerMethodGuard aGuard( *m_pImpl ); return *&m_pImpl->rParent; } - //------------------------------------------------------------------------------------------------------------------ void SAL_CALL UndoManager::setParent( const Reference< XInterface >& i_parent ) throw (NoSupportException, RuntimeException) { (void)i_parent; throw NoSupportException( OUString(), m_pImpl->getThis() ); } -//...................................................................................................................... } // namespace dbaui -//...................................................................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx index d05cda78fb91..02b27a00ee2a 100644 --- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx +++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "browserids.hxx" #include "commontypes.hxx" #include <dbaccess/dataview.hxx> @@ -48,10 +47,8 @@ #include <tools/diagnose_ex.h> #include <vcl/msgbox.hxx> -//........................................................................ namespace dbaui { -//........................................................................ using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Reference; @@ -172,22 +169,17 @@ namespace dbaui } }; - //==================================================================== - //= DBSubComponentController - //==================================================================== - //-------------------------------------------------------------------- + // DBSubComponentController DBSubComponentController::DBSubComponentController(const Reference< XComponentContext >& _rxORB) :DBSubComponentController_Base( _rxORB ) ,m_pImpl( new DBSubComponentController_Impl( getMutex() ) ) { } - //-------------------------------------------------------------------- DBSubComponentController::~DBSubComponentController() { } - //-------------------------------------------------------------------- void DBSubComponentController::impl_initialize() { OGenericUnoController::impl_initialize(); @@ -217,7 +209,6 @@ namespace dbaui } } - //-------------------------------------------------------------------- Any SAL_CALL DBSubComponentController::queryInterface(const Type& _rType) throw (RuntimeException) { if ( _rType.equals( XScriptInvocationContext::static_type() ) ) @@ -230,7 +221,6 @@ namespace dbaui return DBSubComponentController_Base::queryInterface( _rType ); } - //-------------------------------------------------------------------- Sequence< Type > SAL_CALL DBSubComponentController::getTypes( ) throw (RuntimeException) { Sequence< Type > aTypes( DBSubComponentController_Base::getTypes() ); @@ -248,7 +238,6 @@ namespace dbaui return aTypes; } - //-------------------------------------------------------------------- void DBSubComponentController::initializeConnection( const Reference< XConnection >& _rxForeignConn ) { DBG_ASSERT( !isConnected(), "DBSubComponentController::initializeConnection: not to be called when already connected!" ); @@ -307,7 +296,6 @@ namespace dbaui } } - //-------------------------------------------------------------------- void DBSubComponentController::reconnect( sal_Bool _bUI ) { OSL_ENSURE(!m_pImpl->m_bSuspended, "Cannot reconnect while suspended!"); @@ -335,7 +323,6 @@ namespace dbaui InvalidateAll(); } - //-------------------------------------------------------------------- void DBSubComponentController::disconnect() { stopConnectionListening(m_pImpl->m_xConnection); @@ -345,7 +332,6 @@ namespace dbaui InvalidateAll(); } - //-------------------------------------------------------------------- void DBSubComponentController::losingConnection() { // our connection was disposed so we need a new one @@ -353,7 +339,6 @@ namespace dbaui InvalidateAll(); } - //-------------------------------------------------------------------- void SAL_CALL DBSubComponentController::disposing() { DBSubComponentController_Base::disposing(); @@ -365,7 +350,6 @@ namespace dbaui m_pImpl->m_aDataSource.clear(); } - //-------------------------------------------------------------------- void SAL_CALL DBSubComponentController::disposing(const EventObject& _rSource) throw( RuntimeException ) { if ( _rSource.Source == getConnection() ) @@ -389,49 +373,41 @@ namespace dbaui DBSubComponentController_Base::disposing( _rSource ); } - //-------------------------------------------------------------------- void DBSubComponentController::appendError( const OUString& _rErrorMessage, const ::dbtools::StandardSQLState _eSQLState, const sal_Int32 _nErrorCode ) { m_pImpl->m_aCurrentError.append( ::dbtools::SQLExceptionInfo::SQL_EXCEPTION, _rErrorMessage, getStandardSQLStateAscii( _eSQLState ), _nErrorCode ); } - //-------------------------------------------------------------------- void DBSubComponentController::clearError() { m_pImpl->m_aCurrentError = ::dbtools::SQLExceptionInfo(); } - //-------------------------------------------------------------------- sal_Bool DBSubComponentController::hasError() const { return m_pImpl->m_aCurrentError.isValid(); } - //-------------------------------------------------------------------- const ::dbtools::SQLExceptionInfo& DBSubComponentController::getError() const { return m_pImpl->m_aCurrentError; } - //-------------------------------------------------------------------- void DBSubComponentController::displayError() { showError( m_pImpl->m_aCurrentError ); } - //-------------------------------------------------------------------- sal_Bool SAL_CALL DBSubComponentController::suspend(sal_Bool bSuspend) throw( RuntimeException ) { m_pImpl->m_bSuspended = bSuspend; if ( !bSuspend && !isConnected() ) reconnect(sal_True); - return sal_True; } - // ----------------------------------------------------------------------------- sal_Bool SAL_CALL DBSubComponentController::attachModel( const Reference< XModel > & _rxModel) throw( RuntimeException ) { if ( !_rxModel.is() ) @@ -451,7 +427,6 @@ namespace dbaui return sal_True; } - // ----------------------------------------------------------------------------- void DBSubComponentController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& _rArgs) { if ( _nId == ID_BROWSER_CLOSE ) @@ -464,7 +439,6 @@ namespace dbaui InvalidateFeature( _nId ); } - // ----------------------------------------------------------------------------- OUString DBSubComponentController::getDataSourceName() const { OUString sName; @@ -473,7 +447,6 @@ namespace dbaui xDataSourceProps->getPropertyValue(PROPERTY_NAME) >>= sName; return sName; } - // ----------------------------------------------------------------------------- void DBSubComponentController::connectionLostMessage() const { String aMessage(ModuleRes(RID_STR_CONNECTION_LOST)); @@ -486,43 +459,36 @@ namespace dbaui InfoBox(pWin, aMessage).Execute(); } - // ----------------------------------------------------------------------------- const Reference< XConnection >& DBSubComponentController::getConnection() const { return m_pImpl->m_xConnection; } - // ----------------------------------------------------------------------------- sal_Bool DBSubComponentController::isReadOnly() const { return !m_pImpl->m_bEditable; } - // ----------------------------------------------------------------------------- sal_Bool DBSubComponentController::isEditable() const { return m_pImpl->m_bEditable; } - // ----------------------------------------------------------------------------- void DBSubComponentController::setEditable(sal_Bool _bEditable) { m_pImpl->m_bEditable = _bEditable; } - // ----------------------------------------------------------------------------- const ::dbtools::DatabaseMetaData& DBSubComponentController::getSdbMetaData() const { return m_pImpl->m_aSdbMetaData; } - // ----------------------------------------------------------------------------- sal_Bool DBSubComponentController::isConnected() const { return m_pImpl->m_xConnection.is(); } - // ----------------------------------------------------------------------------- Reference< XDatabaseMetaData > DBSubComponentController::getMetaData( ) const { Reference< XDatabaseMetaData > xMeta; @@ -538,36 +504,30 @@ namespace dbaui return xMeta; } - // ----------------------------------------------------------------------------- const Reference< XPropertySet >& DBSubComponentController::getDataSource() const { return m_pImpl->m_aDataSource.getDataSourceProps(); } - // ----------------------------------------------------------------------------- sal_Bool DBSubComponentController::haveDataSource() const { return m_pImpl->m_aDataSource.is(); } - // ----------------------------------------------------------------------------- Reference< XModel > DBSubComponentController::getDatabaseDocument() const { return Reference< XModel >( m_pImpl->m_aDataSource.getDatabaseDocument(), UNO_QUERY ); } - // ----------------------------------------------------------------------------- Reference< XNumberFormatter > DBSubComponentController::getNumberFormatter() const { return m_pImpl->m_xFormatter; } - // ----------------------------------------------------------------------------- Reference< XModel > DBSubComponentController::getPrivateModel() const { return getDatabaseDocument(); } - // ----------------------------------------------------------------------------- // XTitle OUString SAL_CALL DBSubComponentController::getTitle() throw (RuntimeException) @@ -587,13 +547,11 @@ namespace dbaui return sTitle.makeStringAndClear(); } - // ----------------------------------------------------------------------------- sal_Int32 DBSubComponentController::getCurrentStartNumber() const { return m_pImpl->m_nDocStartNumber; } - // ----------------------------------------------------------------------------- Reference< XEmbeddedScripts > SAL_CALL DBSubComponentController::getScriptContainer() throw (RuntimeException) { ::osl::MutexGuard aGuard( getMutex() ); @@ -603,28 +561,24 @@ namespace dbaui return Reference< XEmbeddedScripts >( getDatabaseDocument(), UNO_QUERY_THROW ); } - // ----------------------------------------------------------------------------- void SAL_CALL DBSubComponentController::addModifyListener( const Reference< XModifyListener >& i_Listener ) throw (RuntimeException) { ::osl::MutexGuard aGuard( getMutex() ); m_pImpl->m_aModifyListeners.addInterface( i_Listener ); } - // ----------------------------------------------------------------------------- void SAL_CALL DBSubComponentController::removeModifyListener( const Reference< XModifyListener >& i_Listener ) throw (RuntimeException) { ::osl::MutexGuard aGuard( getMutex() ); m_pImpl->m_aModifyListeners.removeInterface( i_Listener ); } - // ----------------------------------------------------------------------------- ::sal_Bool SAL_CALL DBSubComponentController::isModified( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( getMutex() ); return impl_isModified(); } - // ----------------------------------------------------------------------------- void SAL_CALL DBSubComponentController::setModified( ::sal_Bool i_bModified ) throw (PropertyVetoException, RuntimeException) { ::osl::ClearableMutexGuard aGuard( getMutex() ); @@ -640,13 +594,11 @@ namespace dbaui m_pImpl->m_aModifyListeners.notifyEach( &XModifyListener::modified, aEvent ); } - // ----------------------------------------------------------------------------- sal_Bool DBSubComponentController::impl_isModified() const { return m_pImpl->m_bModified; } - // ----------------------------------------------------------------------------- void DBSubComponentController::impl_onModifyChanged() { InvalidateFeature( ID_BROWSER_SAVEDOC ); @@ -654,8 +606,6 @@ namespace dbaui InvalidateFeature( ID_BROWSER_SAVEASDOC ); } -//........................................................................ } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx index 59fff79eb534..4250b6953ceb 100644 --- a/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx +++ b/dbaccess/source/ui/misc/defaultobjectnamecheck.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "defaultobjectnamecheck.hxx" #include "dbu_misc.hrc" @@ -42,10 +41,8 @@ #include <vector> #include <boost/shared_ptr.hpp> -//........................................................................ namespace dbaui { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::container::XNameAccess; @@ -67,9 +64,7 @@ namespace dbaui namespace CommandType = ::com::sun::star::sdb::CommandType; - //==================================================================== - //= helper - //==================================================================== + // helper namespace { void lcl_fillNameExistsError( const OUString& _rObjectName, SQLExceptionInfo& _out_rErrorToDisplay ) @@ -82,19 +77,14 @@ namespace dbaui } - //==================================================================== - //= HierarchicalNameCheck_Impl - //==================================================================== + // HierarchicalNameCheck_Impl struct HierarchicalNameCheck_Impl { Reference< XHierarchicalNameAccess > xHierarchicalNames; OUString sRelativeRoot; }; - //==================================================================== - //= HierarchicalNameCheck - //==================================================================== - //-------------------------------------------------------------------- + // HierarchicalNameCheck HierarchicalNameCheck::HierarchicalNameCheck( const Reference< XHierarchicalNameAccess >& _rxNames, const OUString& _rRelativeRoot ) :m_pImpl( new HierarchicalNameCheck_Impl ) { @@ -105,12 +95,10 @@ namespace dbaui throw IllegalArgumentException(); } - //-------------------------------------------------------------------- HierarchicalNameCheck::~HierarchicalNameCheck() { } - //-------------------------------------------------------------------- bool HierarchicalNameCheck::isNameValid( const OUString& _rObjectName, SQLExceptionInfo& _out_rErrorToDisplay ) const { try @@ -136,19 +124,14 @@ namespace dbaui return false; } - //==================================================================== - //= DynamicTableOrQueryNameCheck_Impl - //==================================================================== + // DynamicTableOrQueryNameCheck_Impl struct DynamicTableOrQueryNameCheck_Impl { sal_Int32 nCommandType; Reference< XObjectNames > xObjectNames; }; - //==================================================================== - //= DynamicTableOrQueryNameCheck - //==================================================================== - //-------------------------------------------------------------------- + // DynamicTableOrQueryNameCheck DynamicTableOrQueryNameCheck::DynamicTableOrQueryNameCheck( const Reference< XConnection >& _rxSdbLevelConnection, sal_Int32 _nCommandType ) :m_pImpl( new DynamicTableOrQueryNameCheck_Impl ) { @@ -163,12 +146,10 @@ namespace dbaui m_pImpl->nCommandType = _nCommandType; } - //-------------------------------------------------------------------- DynamicTableOrQueryNameCheck::~DynamicTableOrQueryNameCheck() { } - //-------------------------------------------------------------------- bool DynamicTableOrQueryNameCheck::isNameValid( const OUString& _rObjectName, ::dbtools::SQLExceptionInfo& _out_rErrorToDisplay ) const { try @@ -183,8 +164,6 @@ namespace dbaui return false; } -//........................................................................ } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx index aae855ab0d41..39a731595acd 100644 --- a/dbaccess/source/ui/misc/dsmeta.cxx +++ b/dbaccess/source/ui/misc/dsmeta.cxx @@ -25,10 +25,8 @@ #include <map> #include <utility> -//........................................................................ namespace dbaui { -//........................................................................ using namespace dbaccess; using namespace ::com::sun::star; @@ -56,10 +54,7 @@ namespace dbaui const sal_Char* pAsciiFeatureName; }; - //==================================================================== - //= global tables - //==================================================================== - //-------------------------------------------------------------------- + // global tables static const FeatureMapping* lcl_getFeatureMappings() { static const FeatureMapping s_aMappings[] = { @@ -89,7 +84,6 @@ namespace dbaui return s_aMappings; } - //-------------------------------------------------------------------- static const FeatureSet& lcl_getFeatureSet( const OUString _rURL ) { typedef ::std::map< OUString, FeatureSet, ::comphelper::UStringLess > FeatureSets; @@ -122,7 +116,6 @@ namespace dbaui return s_aFeatureSets[ _rURL ]; } - //-------------------------------------------------------------------- static AuthenticationMode getAuthenticationMode( const OUString& _sURL ) { static std::map< OUString, FeatureSupport > s_aSupport; @@ -152,9 +145,7 @@ namespace dbaui return s_aSupport[ _sURL ].eAuthentication; } - //==================================================================== - //= DataSourceMetaData_Impl - //==================================================================== + // DataSourceMetaData_Impl class DataSourceMetaData_Impl { public: @@ -166,40 +157,31 @@ namespace dbaui const OUString m_sURL; }; - //-------------------------------------------------------------------- DataSourceMetaData_Impl::DataSourceMetaData_Impl( const OUString& _sURL ) :m_sURL( _sURL ) { } - //==================================================================== - //= DataSourceMetaData - //==================================================================== - //-------------------------------------------------------------------- + // DataSourceMetaData DataSourceMetaData::DataSourceMetaData( const OUString& _sURL ) :m_pImpl( new DataSourceMetaData_Impl( _sURL ) ) { } - //-------------------------------------------------------------------- DataSourceMetaData::~DataSourceMetaData() { } - //-------------------------------------------------------------------- const FeatureSet& DataSourceMetaData::getFeatureSet() const { return lcl_getFeatureSet( m_pImpl->getType() ); } - //-------------------------------------------------------------------- AuthenticationMode DataSourceMetaData::getAuthentication( const OUString& _sURL ) { return getAuthenticationMode( _sURL ); } -//........................................................................ } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/imageprovider.cxx b/dbaccess/source/ui/misc/imageprovider.cxx index f23f9c32680b..88a6e43346de 100644 --- a/dbaccess/source/ui/misc/imageprovider.cxx +++ b/dbaccess/source/ui/misc/imageprovider.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "imageprovider.hxx" #include "dbu_resource.hrc" #include "moduledbu.hxx" @@ -31,10 +30,8 @@ #include <tools/diagnose_ex.h> -//........................................................................ namespace dbaui { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::sdbc::XConnection; @@ -50,9 +47,7 @@ namespace dbaui namespace GraphicColorMode = ::com::sun::star::graphic::GraphicColorMode; - //==================================================================== - //= ImageProvider_Data - //==================================================================== + // ImageProvider_Data struct ImageProvider_Data { /// the connection we work with @@ -63,10 +58,8 @@ namespace dbaui Reference< XTableUIProvider > xTableUI; }; - //-------------------------------------------------------------------- namespace { - //................................................................ static void lcl_getConnectionProvidedTableIcon_nothrow( const ImageProvider_Data& _rData, const OUString& _rName, Reference< XGraphic >& _out_rxGraphic ) { @@ -81,7 +74,6 @@ namespace dbaui } } - //................................................................ static void lcl_getTableImageResourceID_nothrow( const ImageProvider_Data& _rData, const OUString& _rName, sal_uInt16& _out_rResourceID) { @@ -104,16 +96,12 @@ namespace dbaui } } } - //==================================================================== - //= ImageProvider - //==================================================================== - //-------------------------------------------------------------------- + // ImageProvider ImageProvider::ImageProvider() :m_pData( new ImageProvider_Data ) { } - //-------------------------------------------------------------------- ImageProvider::ImageProvider( const Reference< XConnection >& _rxConnection ) :m_pData( new ImageProvider_Data ) { @@ -132,7 +120,6 @@ namespace dbaui } } - //-------------------------------------------------------------------- void ImageProvider::getImages( const String& _rName, const sal_Int32 _nDatabaseObjectType, Image& _out_rImage ) { if ( _nDatabaseObjectType != DatabaseObject::TABLE ) @@ -160,7 +147,6 @@ namespace dbaui } } - //-------------------------------------------------------------------- Image ImageProvider::getDefaultImage( sal_Int32 _nDatabaseObjectType ) { Image aObjectImage; @@ -170,7 +156,6 @@ namespace dbaui return aObjectImage; } - //-------------------------------------------------------------------- sal_uInt16 ImageProvider::getDefaultImageResourceID( sal_Int32 _nDatabaseObjectType) { sal_uInt16 nImageResourceID( 0 ); @@ -195,7 +180,6 @@ namespace dbaui return nImageResourceID; } - //-------------------------------------------------------------------- Image ImageProvider::getFolderImage( sal_Int32 _nDatabaseObjectType ) { sal_uInt16 nImageResourceID( 0 ); @@ -224,14 +208,11 @@ namespace dbaui return aFolderImage; } - //-------------------------------------------------------------------- Image ImageProvider::getDatabaseImage() { return Image( ModuleRes( DATABASE_TREE_ICON ) ); } -//........................................................................ } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx index ca461bc5deeb..e9b5ffd7570c 100644 --- a/dbaccess/source/ui/misc/indexcollection.cxx +++ b/dbaccess/source/ui/misc/indexcollection.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "indexcollection.hxx" #include <tools/diagnose_ex.h> #include <com/sun/star/sdbcx/XAppend.hpp> @@ -28,10 +27,8 @@ #include <com/sun/star/sdbcx/XDrop.hpp> #include <com/sun/star/container/XNameContainer.hpp> -//...................................................................... namespace dbaui { -//...................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::container; @@ -39,21 +36,16 @@ namespace dbaui using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; - //================================================================== - //= OIndexCollection - //================================================================== - //------------------------------------------------------------------ + // OIndexCollection OIndexCollection::OIndexCollection() { } - //------------------------------------------------------------------ OIndexCollection::OIndexCollection(const OIndexCollection& _rSource) { *this = _rSource; } - //------------------------------------------------------------------ const OIndexCollection& OIndexCollection::operator=(const OIndexCollection& _rSource) { detach(); @@ -62,20 +54,17 @@ namespace dbaui return *this; } - //------------------------------------------------------------------ void OIndexCollection::attach(const Reference< XNameAccess >& _rxIndexes) { implConstructFrom(_rxIndexes); } - //------------------------------------------------------------------ void OIndexCollection::detach() { m_xIndexes.clear(); m_aIndexes.clear(); } - //------------------------------------------------------------------ Indexes::const_iterator OIndexCollection::find(const String& _rName) const { OUString sNameCompare(_rName); @@ -90,7 +79,6 @@ namespace dbaui return aSearch; } - //------------------------------------------------------------------ Indexes::iterator OIndexCollection::find(const String& _rName) { OUString sNameCompare(_rName); @@ -105,7 +93,6 @@ namespace dbaui return aSearch; } - //------------------------------------------------------------------ Indexes::const_iterator OIndexCollection::findOriginal(const String& _rName) const { OUString sNameCompare(_rName); @@ -120,7 +107,6 @@ namespace dbaui return aSearch; } - //------------------------------------------------------------------ Indexes::iterator OIndexCollection::findOriginal(const String& _rName) { OUString sNameCompare(_rName); @@ -135,7 +121,6 @@ namespace dbaui return aSearch; } - //------------------------------------------------------------------ void OIndexCollection::commitNewIndex(const Indexes::iterator& _rPos) SAL_THROW((SQLException)) { OSL_ENSURE(_rPos->isNew(), "OIndexCollection::commitNewIndex: index must be new!"); @@ -205,7 +190,6 @@ namespace dbaui } } - //------------------------------------------------------------------ sal_Bool OIndexCollection::dropNoRemove(const Indexes::iterator& _rPos) SAL_THROW((SQLException)) { try @@ -239,7 +223,6 @@ namespace dbaui return sal_True; } - //------------------------------------------------------------------ sal_Bool OIndexCollection::drop(const Indexes::iterator& _rPos) SAL_THROW((SQLException)) { OSL_ENSURE((_rPos >= m_aIndexes.begin()) && (_rPos < m_aIndexes.end()), @@ -254,7 +237,6 @@ namespace dbaui return sal_True; } - //------------------------------------------------------------------ void OIndexCollection::implFillIndexInfo(OIndex& _rIndex) SAL_THROW((Exception)) { // get the UNO descriptor for the index @@ -268,7 +250,6 @@ namespace dbaui implFillIndexInfo(_rIndex, xIndex); } - //------------------------------------------------------------------ void OIndexCollection::implFillIndexInfo(OIndex& _rIndex, Reference< XPropertySet > _rxDescriptor) SAL_THROW((Exception)) { static const OUString s_sPrimaryIndexPropertyName = OUString("IsPrimaryKeyIndex"); @@ -318,7 +299,6 @@ namespace dbaui } } - //------------------------------------------------------------------ void OIndexCollection::resetIndex(const Indexes::iterator& _rPos) SAL_THROW((SQLException)) { OSL_ENSURE(_rPos >= m_aIndexes.begin() && _rPos < m_aIndexes.end(), @@ -342,7 +322,6 @@ namespace dbaui } } - //------------------------------------------------------------------ Indexes::iterator OIndexCollection::insert(const String& _rName) { OSL_ENSURE(end() == find(_rName), "OIndexCollection::insert: invalid new name!"); @@ -353,7 +332,6 @@ namespace dbaui return m_aIndexes.end() - 1; // the last element is the new one ... } - //------------------------------------------------------------------ void OIndexCollection::implConstructFrom(const Reference< XNameAccess >& _rxIndexes) { detach(); @@ -384,8 +362,6 @@ namespace dbaui } } -//...................................................................... } // namespace dbaui -//...................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx index 476633299004..e4e02ce16ab6 100644 --- a/dbaccess/source/ui/misc/linkeddocuments.cxx +++ b/dbaccess/source/ui/misc/linkeddocuments.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "linkeddocuments.hxx" #include <osl/diagnose.h> #include <tools/diagnose_ex.h> @@ -44,7 +43,6 @@ #include "browserids.hxx" #include <sfx2/new.hxx> #include "moduledbu.hxx" -// ----------------- // for calling basic #include <sfx2/app.hxx> #include <basic/sbx.hxx> @@ -61,10 +59,8 @@ #include <com/sun/star/io/WrongFormatException.hpp> #include "com/sun/star/sdb/RowSetVetoException.hpp" -//...................................................................... namespace dbaui { -//...................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::container; @@ -106,12 +102,8 @@ namespace dbaui } } - - //================================================================== - //= OLinkedDocumentsAccess - //================================================================== + // OLinkedDocumentsAccess DBG_NAME(OLinkedDocumentsAccess) - //------------------------------------------------------------------ OLinkedDocumentsAccess::OLinkedDocumentsAccess( Window* _pDialogParent, const Reference< XDatabaseDocumentUI >& i_rDocumentUI, const Reference< XComponentContext >& _rxContext, const Reference< XNameAccess >& _rxContainer, const Reference< XConnection>& _xConnection, const OUString& _sDataSourceName ) @@ -126,12 +118,10 @@ namespace dbaui OSL_ENSURE(m_xContext.is(), "OLinkedDocumentsAccess::OLinkedDocumentsAccess: invalid service factory!"); OSL_ENSURE(m_pDialogParent, "OLinkedDocumentsAccess::OLinkedDocumentsAccess: really need a dialog parent!"); } - //------------------------------------------------------------------ OLinkedDocumentsAccess::~OLinkedDocumentsAccess() { DBG_DTOR(OLinkedDocumentsAccess,NULL); } - //------------------------------------------------------------------ Reference< XComponent> OLinkedDocumentsAccess::impl_open( const OUString& _rLinkName, Reference< XComponent >& _xDefinition, ElementOpenMode _eOpenMode, const ::comphelper::NamedValueCollection& _rAdditionalArgs ) { @@ -185,7 +175,6 @@ namespace dbaui return xRet; } - //------------------------------------------------------------------ void OLinkedDocumentsAccess::impl_newWithPilot( const char* _pWizardService, const sal_Int32 _nCommandType, const OUString& _rObjectName ) { @@ -223,28 +212,23 @@ namespace dbaui DBG_UNHANDLED_EXCEPTION(); } } - //------------------------------------------------------------------ void OLinkedDocumentsAccess::newFormWithPilot( const sal_Int32 _nCommandType,const OUString& _rObjectName ) { impl_newWithPilot( "com.sun.star.wizards.form.CallFormWizard", _nCommandType, _rObjectName ); } - //------------------------------------------------------------------ void OLinkedDocumentsAccess::newReportWithPilot( const sal_Int32 _nCommandType, const OUString& _rObjectName ) { impl_newWithPilot( "com.sun.star.wizards.report.CallReportWizard", _nCommandType, _rObjectName ); } - //------------------------------------------------------------------ void OLinkedDocumentsAccess::newTableWithPilot() { impl_newWithPilot( "com.sun.star.wizards.table.CallTableWizard", -1, OUString() ); } - //------------------------------------------------------------------ void OLinkedDocumentsAccess::newQueryWithPilot() { impl_newWithPilot( "com.sun.star.wizards.query.CallQueryWizard", -1, OUString() ); } - //------------------------------------------------------------------ Reference< XComponent > OLinkedDocumentsAccess::newDocument( sal_Int32 i_nActionID, const ::comphelper::NamedValueCollection& i_rCreationArgs, Reference< XComponent >& o_rDefinition ) { @@ -331,7 +315,6 @@ namespace dbaui return xNewDocument; } - //------------------------------------------------------------------ Reference< XComponent > OLinkedDocumentsAccess::open( const OUString& _rLinkName, Reference< XComponent >& _xDefinition, ElementOpenMode _eOpenMode, const ::comphelper::NamedValueCollection& _rAdditionalArgs ) { @@ -393,9 +376,6 @@ namespace dbaui return xRet; } - -//...................................................................... } // namespace dbaui -//...................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/moduledbu.cxx b/dbaccess/source/ui/misc/moduledbu.cxx index 768ad83e417d..d8dae7f4e652 100644 --- a/dbaccess/source/ui/misc/moduledbu.cxx +++ b/dbaccess/source/ui/misc/moduledbu.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "moduledbu.hxx" #include <tools/resmgr.hxx> @@ -28,14 +27,10 @@ ::osl::MutexGuard aGuard(s_aMutex); \ ensureImpl() -//......................................................................... namespace dbaui { -//......................................................................... -//========================================================================= -//= OModuleImpl -//========================================================================= +// OModuleImpl /** implementation for <type>OModule</type>. not threadsafe, has to be guarded by it's owner */ class OModuleImpl @@ -52,7 +47,6 @@ public: }; DBG_NAME(OModuleImpl) -//------------------------------------------------------------------------- OModuleImpl::OModuleImpl() :m_pResources(NULL) { @@ -60,7 +54,6 @@ OModuleImpl::OModuleImpl() } -//------------------------------------------------------------------------- OModuleImpl::~OModuleImpl() { if (m_pResources) @@ -69,7 +62,6 @@ OModuleImpl::~OModuleImpl() DBG_DTOR(OModuleImpl,NULL); } -//------------------------------------------------------------------------- ResMgr* OModuleImpl::getResManager() { // note that this method is not threadsafe, which counts for the whole class ! @@ -82,27 +74,22 @@ ResMgr* OModuleImpl::getResManager() return m_pResources; } -//========================================================================= -//= OModule -//========================================================================= +// OModule ::osl::Mutex OModule::s_aMutex; sal_Int32 OModule::s_nClients = 0; OModuleImpl* OModule::s_pImpl = NULL; -//------------------------------------------------------------------------- ResMgr* OModule::getResManager() { ENTER_MOD_METHOD(); return s_pImpl->getResManager(); } -//------------------------------------------------------------------------- void OModule::registerClient() { ::osl::MutexGuard aGuard(s_aMutex); ++s_nClients; } -//------------------------------------------------------------------------- void OModule::revokeClient() { ::osl::MutexGuard aGuard(s_aMutex); @@ -113,7 +100,6 @@ void OModule::revokeClient() } } -//------------------------------------------------------------------------- void OModule::ensureImpl() { if (s_pImpl) @@ -121,8 +107,6 @@ void OModule::ensureImpl() s_pImpl = new OModuleImpl(); } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/propertysetitem.cxx b/dbaccess/source/ui/misc/propertysetitem.cxx index 8b466b699ab2..81b33cd31611 100644 --- a/dbaccess/source/ui/misc/propertysetitem.cxx +++ b/dbaccess/source/ui/misc/propertysetitem.cxx @@ -17,42 +17,33 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "propertysetitem.hxx" -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; - //========================================================================= - //= OPropertySetItem - //========================================================================= + // OPropertySetItem TYPEINIT1(OPropertySetItem, SfxPoolItem); - //------------------------------------------------------------------------- OPropertySetItem::OPropertySetItem(sal_Int16 _nWhich) :SfxPoolItem(_nWhich) { } - //------------------------------------------------------------------------- OPropertySetItem::OPropertySetItem(sal_Int16 _nWhich, const Reference< XPropertySet >& _rxSet) :SfxPoolItem(_nWhich) ,m_xSet(_rxSet) { } - //------------------------------------------------------------------------- OPropertySetItem::OPropertySetItem(const OPropertySetItem& _rSource) :SfxPoolItem(_rSource) ,m_xSet(_rSource.m_xSet) { } - //------------------------------------------------------------------------- int OPropertySetItem::operator==(const SfxPoolItem& _rItem) const { const OPropertySetItem* pCompare = PTR_CAST(OPropertySetItem, &_rItem); @@ -62,14 +53,11 @@ namespace dbaui return 1; } - //------------------------------------------------------------------------- SfxPoolItem* OPropertySetItem::Clone(SfxItemPool* /* _pPool */) const { return new OPropertySetItem(*this); } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/propertystorage.cxx b/dbaccess/source/ui/misc/propertystorage.cxx index de79c6cc95d6..fd56ba1354c6 100644 --- a/dbaccess/source/ui/misc/propertystorage.cxx +++ b/dbaccess/source/ui/misc/propertystorage.cxx @@ -25,10 +25,8 @@ #include <memory> -//........................................................................ namespace dbaui { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -38,20 +36,14 @@ namespace dbaui using ::com::sun::star::uno::Any; using ::com::sun::star::uno::makeAny; - //==================================================================== - //= PropertyStorage - //==================================================================== - //-------------------------------------------------------------------- + // PropertyStorage PropertyStorage::~PropertyStorage() { } - //==================================================================== - //= helper - //==================================================================== + // helper namespace { - //---------------------------------------------------------------- #undef UNOTYPE template < class ITEMTYPE, class UNOTYPE > class ItemAdapter @@ -87,10 +79,7 @@ namespace dbaui }; } - //==================================================================== - //= SetItemPropertyStorage - //==================================================================== - //-------------------------------------------------------------------- + // SetItemPropertyStorage void SetItemPropertyStorage::getPropertyValue( Any& _out_rValue ) const { const SfxPoolItem& rItem( m_rItemSet.Get( m_nItemID ) ); @@ -104,7 +93,6 @@ namespace dbaui OSL_FAIL( "SetItemPropertyStorage::getPropertyValue: unsupported item type!" ); } - //-------------------------------------------------------------------- void SetItemPropertyStorage::setPropertyValue( const Any& _rValue ) { // try some known item types @@ -116,8 +104,6 @@ namespace dbaui OSL_FAIL( "SetItemPropertyStorage::setPropertyValue: unsupported item type!" ); } -//........................................................................ } // namespace dbaui -//........................................................................ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/singledoccontroller.cxx b/dbaccess/source/ui/misc/singledoccontroller.cxx index 4b451ff450f0..303efe032af1 100644 --- a/dbaccess/source/ui/misc/singledoccontroller.cxx +++ b/dbaccess/source/ui/misc/singledoccontroller.cxx @@ -29,10 +29,8 @@ #include <boost/scoped_ptr.hpp> -//...................................................................................................................... namespace dbaui { -//...................................................................................................................... using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -51,9 +49,7 @@ namespace dbaui using ::com::sun::star::beans::PropertyValue; using ::com::sun::star::lang::EventObject; - //================================================================================================================== - //= OSingleDocumentController_Data - //================================================================================================================== + // OSingleDocumentController_Data struct OSingleDocumentController_Data { ::boost::scoped_ptr< UndoManager > m_pUndoManager; @@ -64,22 +60,17 @@ namespace dbaui } }; - //================================================================================================================== - //= OSingleDocumentController - //================================================================================================================== - //------------------------------------------------------------------------------------------------------------------ + // OSingleDocumentController OSingleDocumentController::OSingleDocumentController( const Reference< XComponentContext >& _rxORB ) :OSingleDocumentController_Base( _rxORB ) ,m_pData( new OSingleDocumentController_Data( *this, getMutex() ) ) { } - //------------------------------------------------------------------------------------------------------------------ OSingleDocumentController::~OSingleDocumentController() { } - // ----------------------------------------------------------------------------- void SAL_CALL OSingleDocumentController::disposing() { OSingleDocumentController_Base::disposing(); @@ -87,26 +78,22 @@ namespace dbaui m_pData->m_pUndoManager->disposing(); } - // ----------------------------------------------------------------------------- void SAL_CALL OSingleDocumentController::disposing( const EventObject& i_event ) throw( RuntimeException ) { // simply disambiguate OSingleDocumentController_Base::disposing( i_event ); } - // ----------------------------------------------------------------------------- void OSingleDocumentController::ClearUndoManager() { GetUndoManager().Clear(); } - // ----------------------------------------------------------------------------- SfxUndoManager& OSingleDocumentController::GetUndoManager() const { return m_pData->m_pUndoManager->GetSfxUndoManager(); } - // ----------------------------------------------------------------------------- void OSingleDocumentController::addUndoActionAndInvalidate(SfxUndoAction *_pAction) { // add undo action @@ -120,13 +107,11 @@ namespace dbaui InvalidateFeature( ID_BROWSER_REDO ); } - // ----------------------------------------------------------------------------- Reference< XUndoManager > SAL_CALL OSingleDocumentController::getUndoManager( ) throw (RuntimeException) { return m_pData->m_pUndoManager.get(); } - // ----------------------------------------------------------------------------- FeatureState OSingleDocumentController::GetState(sal_uInt16 _nId) const { FeatureState aReturn; @@ -159,7 +144,6 @@ namespace dbaui } return aReturn; } - // ----------------------------------------------------------------------------- void OSingleDocumentController::Execute( sal_uInt16 _nId, const Sequence< PropertyValue >& _rArgs ) { switch ( _nId ) @@ -183,8 +167,6 @@ namespace dbaui InvalidateFeature(_nId); } -//...................................................................................................................... } // namespace dbaui -//...................................................................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/stringlistitem.cxx b/dbaccess/source/ui/misc/stringlistitem.cxx index ce334f466ca1..0fc33526ed49 100644 --- a/dbaccess/source/ui/misc/stringlistitem.cxx +++ b/dbaccess/source/ui/misc/stringlistitem.cxx @@ -17,35 +17,27 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "stringlistitem.hxx" -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; -//========================================================================= -//= OStringListItem -//========================================================================= +// OStringListItem TYPEINIT1(OStringListItem, SfxPoolItem); -//------------------------------------------------------------------------- OStringListItem::OStringListItem(sal_Int16 _nWhich, const Sequence< OUString >& _rList) :SfxPoolItem(_nWhich) ,m_aList(_rList) { } -//------------------------------------------------------------------------- OStringListItem::OStringListItem(const OStringListItem& _rSource) :SfxPoolItem(_rSource) ,m_aList(_rSource.m_aList) { } -//------------------------------------------------------------------------- int OStringListItem::operator==(const SfxPoolItem& _rItem) const { const OStringListItem* pCompare = PTR_CAST(OStringListItem, &_rItem); @@ -63,14 +55,11 @@ int OStringListItem::operator==(const SfxPoolItem& _rItem) const return 1; } -//------------------------------------------------------------------------- SfxPoolItem* OStringListItem::Clone(SfxItemPool* /* _pPool */) const { return new OStringListItem(*this); } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/misc/uiservices.cxx b/dbaccess/source/ui/misc/uiservices.cxx index 766e38ad43c9..33efa885a0aa 100644 --- a/dbaccess/source/ui/misc/uiservices.cxx +++ b/dbaccess/source/ui/misc/uiservices.cxx @@ -17,12 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <cppuhelper/factory.hxx> #include <osl/diagnose.h> #include "dbu_reghelper.hxx" - using namespace ::dbaui; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -93,7 +91,6 @@ extern "C" void SAL_CALL createRegistryInfo_DBU() } } -//--------------------------------------------------------------------------------------- extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbu_component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx index 05ca77a0b64d..f134f5bb46fe 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx @@ -27,7 +27,6 @@ #include <osl/diagnose.h> #include <vcl/lineinfo.hxx> - using namespace dbaui; const long DESCRIPT_LINE_WIDTH = 15; const long HIT_SENSITIVE_RADIUS = 5; @@ -42,7 +41,6 @@ namespace { return Rectangle( _rBase - _aVector, _rBase + _aVector ); } - // ----------------------------------------------------------------------------- /** GetTextPos calculate the rectangle for the connection to be drawn @param _pWin the table window where to draw it @param _aConnPos the connection point @@ -73,7 +71,6 @@ namespace return aReturn; } - // ----------------------------------------------------------------------------- /** calcPointsYValue calculate the points Y value in relation to the listbox entry @param _pWin the corresponding window @param _pEntry the source or dest entry @@ -109,14 +106,10 @@ namespace _rNewDescrPos.Y() = _rNewConPos.Y(); } - // ----------------------------------------------------------------------------- } -//======================================================================== // class OConnectionLine -//======================================================================== DBG_NAME(OConnectionLine) -//------------------------------------------------------------------------ OConnectionLine::OConnectionLine( OTableConnection* _pConn, OConnectionLineDataRef _pLineData ) : m_pTabConn( _pConn ) ,m_pData( _pLineData ) @@ -124,7 +117,6 @@ OConnectionLine::OConnectionLine( OTableConnection* _pConn, OConnectionLineDataR DBG_CTOR(OConnectionLine,NULL); } -//------------------------------------------------------------------------ OConnectionLine::OConnectionLine( const OConnectionLine& _rLine ) { DBG_CTOR(OConnectionLine,NULL); @@ -132,13 +124,11 @@ OConnectionLine::OConnectionLine( const OConnectionLine& _rLine ) *this = _rLine; } -//------------------------------------------------------------------------ OConnectionLine::~OConnectionLine() { DBG_DTOR(OConnectionLine,NULL); } -//------------------------------------------------------------------------ OConnectionLine& OConnectionLine::operator=( const OConnectionLine& rLine ) { if( &rLine != this ) @@ -157,10 +147,8 @@ OConnectionLine& OConnectionLine::operator=( const OConnectionLine& rLine ) return *this; } -//------------------------------------------------------------------------ Rectangle OConnectionLine::GetBoundingRect() { - ////////////////////////////////////////////////////////////////////// // determine surrounding rectangle Rectangle aBoundingRect( Point(0,0), Point(0,0) ); if( !IsValid() ) @@ -193,7 +181,6 @@ Rectangle OConnectionLine::GetBoundingRect() const OTableWindow* pSourceWin = m_pTabConn->GetSourceWin(); const OTableWindow* pDestWin = m_pTabConn->GetDestWin(); - ////////////////////////////////////////////////////////////////////// // line proceeds in in z-Form if( pSourceWin == pDestWin || std::abs(m_aSourceConnPos.X() - m_aDestConnPos.X()) > std::abs(m_aSourceDescrLinePos.X() - m_aDestDescrLinePos.X()) ) { @@ -205,24 +192,23 @@ Rectangle OConnectionLine::GetBoundingRect() return aBoundingRect; } -// ----------------------------------------------------------------------------- + void calcPointX1(const OTableWindow* _pWin,Point& _rNewConPos,Point& _rNewDescrPos) { _rNewConPos.X() = _pWin->GetPosPixel().X() + _pWin->GetSizePixel().Width(); _rNewDescrPos.X() = _rNewConPos.X(); _rNewConPos.X() += DESCRIPT_LINE_WIDTH; } -// ----------------------------------------------------------------------------- + void calcPointX2(const OTableWindow* _pWin,Point& _rNewConPos,Point& _rNewDescrPos) { _rNewConPos.X() = _pWin->GetPosPixel().X(); _rNewDescrPos.X() = _rNewConPos.X(); _rNewConPos.X() -= DESCRIPT_LINE_WIDTH; } -//------------------------------------------------------------------------ + sal_Bool OConnectionLine::RecalcLine() { - ////////////////////////////////////////////////////////////////////// // Windows and entries must be set const OTableWindow* pSourceWin = m_pTabConn->GetSourceWin(); const OTableWindow* pDestWin = m_pTabConn->GetDestWin(); @@ -233,7 +219,6 @@ sal_Bool OConnectionLine::RecalcLine() SvTreeListEntry* pSourceEntry = pSourceWin->GetListBox()->GetEntryFromText( GetData()->GetSourceFieldName() ); SvTreeListEntry* pDestEntry = pDestWin->GetListBox()->GetEntryFromText( GetData()->GetDestFieldName() ); - ////////////////////////////////////////////////////////////////////// // determine X-coordinates Point aSourceCenter( 0, 0 ); Point aDestCenter( 0, 0 ); @@ -263,29 +248,23 @@ sal_Bool OConnectionLine::RecalcLine() calcPointX1(pFirstWin,*pFirstConPos,*pFirstDescrPos); calcPointX2(pSecondWin,*pSecondConPos,*pSecondDescrPos); - ////////////////////////////////////////////////////////////////////// // determine aSourceConnPosY calcPointsYValue(pSourceWin,pSourceEntry,m_aSourceConnPos,m_aSourceDescrLinePos); - ////////////////////////////////////////////////////////////////////// // determine aDestConnPosY calcPointsYValue(pDestWin,pDestEntry,m_aDestConnPos,m_aDestDescrLinePos); return sal_True; } -// ----------------------------------------------------------------------------- -//------------------------------------------------------------------------ void OConnectionLine::Draw( OutputDevice* pOutDev ) { const sal_uInt16 nRectSize = 3; - ////////////////////////////////////////////////////////////////////// // calculate new dimension if( !RecalcLine() ) return; - ////////////////////////////////////////////////////////////////////// // draw lines if (m_pTabConn->IsSelected()) pOutDev->SetLineColor(Application::GetSettings().GetStyleSettings().GetHighlightColor()); @@ -302,7 +281,6 @@ void OConnectionLine::Draw( OutputDevice* pOutDev ) aPoly.Insert(3,m_aDestDescrLinePos); pOutDev->DrawPolyLine(aPoly,aLineInfo); - ////////////////////////////////////////////////////////////////////// // draw the connection rectangles pOutDev->SetFillColor(Application::GetSettings().GetStyleSettings().GetWindowColor()); @@ -310,12 +288,12 @@ void OConnectionLine::Draw( OutputDevice* pOutDev ) pOutDev->DrawRect( calcRect(m_aSourceDescrLinePos,aVector) ); pOutDev->DrawRect( calcRect( m_aDestDescrLinePos,aVector) ); } -// ----------------------------------------------------------------------------- + sal_Bool OConnectionLine::IsValid() const { return m_pData.is(); } -//------------------------------------------------------------------------ + double dist_Euklid(const Point &p1, const Point& p2,const Point& pM, Point& q) { Point v(p2 - p1); @@ -328,10 +306,9 @@ double dist_Euklid(const Point &p1, const Point& p2,const Point& pM, Point& q) q.Y() = long(p1.Y() + a * v.Y()); return l; } -//------------------------------------------------------------------------ + bool OConnectionLine::CheckHit( const Point& rMousePos ) const { - ////////////////////////////////////////////////////////////////////// /* course of action with HitTest: the distance is calculated according to Euklid. @@ -347,17 +324,17 @@ bool OConnectionLine::CheckHit( const Point& rMousePos ) const return false; } -// ----------------------------------------------------------------------------- + Rectangle OConnectionLine::GetSourceTextPos() const { return GetTextPos(m_pTabConn->GetSourceWin(),m_aSourceConnPos,m_aSourceDescrLinePos); } -// ----------------------------------------------------------------------------- + Rectangle OConnectionLine::GetDestTextPos() const { return GetTextPos(m_pTabConn->GetDestWin(),m_aDestConnPos,m_aDestDescrLinePos); } -// ----------------------------------------------------------------------------- + Point OConnectionLine::getMidPoint() const { Point aDest = m_aDestConnPos - m_aSourceConnPos; @@ -366,7 +343,5 @@ Point OConnectionLine::getMidPoint() const return m_aSourceConnPos + aDest; } -// ----------------------------------------------------------------------------- - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx index 9394263a19c2..95165a31f3e0 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx @@ -42,47 +42,38 @@ namespace dbaui ,m_pLine(_pLine) { } - // ----------------------------------------------------------------------------- void SAL_CALL OConnectionLineAccess::disposing() { m_pLine = NULL; VCLXAccessibleComponent::disposing(); } - // ----------------------------------------------------------------------------- Any SAL_CALL OConnectionLineAccess::queryInterface( const Type& aType ) throw (RuntimeException) { Any aRet(VCLXAccessibleComponent::queryInterface( aType )); return aRet.hasValue() ? aRet : OConnectionLineAccess_BASE::queryInterface( aType ); } - // ----------------------------------------------------------------------------- Sequence< Type > SAL_CALL OConnectionLineAccess::getTypes( ) throw (RuntimeException) { return ::comphelper::concatSequences(VCLXAccessibleComponent::getTypes(),OConnectionLineAccess_BASE::getTypes()); } - // ----------------------------------------------------------------------------- OUString SAL_CALL OConnectionLineAccess::getImplementationName() throw(RuntimeException) { return getImplementationName_Static(); } - // ----------------------------------------------------------------------------- // XServiceInfo - static methods - // ----------------------------------------------------------------------------- OUString OConnectionLineAccess::getImplementationName_Static(void) throw( RuntimeException ) { return OUString("org.openoffice.comp.dbu.ConnectionLineAccessibility"); } - // ----------------------------------------------------------------------------- // XAccessibleContext sal_Int32 SAL_CALL OConnectionLineAccess::getAccessibleChildCount( ) throw (RuntimeException) { return 0; } - // ----------------------------------------------------------------------------- Reference< XAccessible > SAL_CALL OConnectionLineAccess::getAccessibleChild( sal_Int32 /*i*/ ) throw (RuntimeException) { return Reference< XAccessible >(); } - // ----------------------------------------------------------------------------- sal_Int32 SAL_CALL OConnectionLineAccess::getAccessibleIndexInParent( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -100,24 +91,20 @@ namespace dbaui } return nIndex; } - // ----------------------------------------------------------------------------- sal_Int16 SAL_CALL OConnectionLineAccess::getAccessibleRole( ) throw (RuntimeException) { return AccessibleRole::UNKNOWN; // ? or may be an AccessibleRole::WINDOW } - // ----------------------------------------------------------------------------- OUString SAL_CALL OConnectionLineAccess::getAccessibleDescription( ) throw (RuntimeException) { static OUString sDescription("Relation"); return sDescription; } - // ----------------------------------------------------------------------------- Reference< XAccessibleRelationSet > SAL_CALL OConnectionLineAccess::getAccessibleRelationSet( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return this; } - // ----------------------------------------------------------------------------- // XAccessibleComponent sal_Bool SAL_CALL OConnectionLineAccess::contains( const awt::Point& _aPoint ) throw (RuntimeException) { @@ -125,63 +112,52 @@ namespace dbaui Point aPoint(_aPoint.X,_aPoint.Y); return m_pLine ? m_pLine->CheckHit(aPoint) : sal_False; } - // ----------------------------------------------------------------------------- Reference< XAccessible > SAL_CALL OConnectionLineAccess::getAccessibleAtPoint( const awt::Point& /*_aPoint*/ ) throw (RuntimeException) { return Reference< XAccessible >(); } - // ----------------------------------------------------------------------------- awt::Rectangle SAL_CALL OConnectionLineAccess::getBounds( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); Rectangle aRect(m_pLine ? m_pLine->GetBoundingRect() : Rectangle()); return awt::Rectangle(aRect.getX(),aRect.getY(),aRect.getWidth(),aRect.getHeight()); } - // ----------------------------------------------------------------------------- awt::Point SAL_CALL OConnectionLineAccess::getLocation( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); Point aPoint(m_pLine ? m_pLine->GetBoundingRect().TopLeft() : Point()); return awt::Point(aPoint.X(),aPoint.Y()); } - // ----------------------------------------------------------------------------- awt::Point SAL_CALL OConnectionLineAccess::getLocationOnScreen( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); Point aPoint(m_pLine ? m_pLine->GetParent()->ScreenToOutputPixel(m_pLine->GetBoundingRect().TopLeft()) : Point()); return awt::Point(aPoint.X(),aPoint.Y()); } - // ----------------------------------------------------------------------------- awt::Size SAL_CALL OConnectionLineAccess::getSize( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); Size aSize(m_pLine ? m_pLine->GetBoundingRect().GetSize() : Size()); return awt::Size(aSize.Width(),aSize.Height()); } - // ----------------------------------------------------------------------------- sal_Bool SAL_CALL OConnectionLineAccess::isShowing( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return m_pLine ? m_pLine->GetParent()->GetWindowRegionPixel().IsInside(m_pLine->GetBoundingRect()) : sal_False; } - // ----------------------------------------------------------------------------- sal_Bool SAL_CALL OConnectionLineAccess::isVisible( ) throw (RuntimeException) { return sal_True; } - // ----------------------------------------------------------------------------- sal_Bool SAL_CALL OConnectionLineAccess::isFocusTraversable( ) throw (RuntimeException) { return sal_True; } - // ----------------------------------------------------------------------------- // XAccessibleRelationSet - // ----------------------------------------------------------------------------- sal_Int32 SAL_CALL OConnectionLineAccess::getRelationCount( ) throw (RuntimeException) { return 1; } - // ----------------------------------------------------------------------------- AccessibleRelation SAL_CALL OConnectionLineAccess::getRelation( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -197,44 +173,35 @@ namespace dbaui return AccessibleRelation(AccessibleRelationType::CONTROLLED_BY,aSeq); } - // ----------------------------------------------------------------------------- sal_Bool SAL_CALL OConnectionLineAccess::containsRelation( sal_Int16 aRelationType ) throw (RuntimeException) { return AccessibleRelationType::CONTROLLED_BY == aRelationType; } - // ----------------------------------------------------------------------------- AccessibleRelation SAL_CALL OConnectionLineAccess::getRelationByType( sal_Int16 aRelationType ) throw (RuntimeException) { if( AccessibleRelationType::CONTROLLED_BY == aRelationType ) return getRelation(0); return AccessibleRelation(); } - // ----------------------------------------------------------------------------- Reference< XAccessible > OTableConnection::CreateAccessible() { return new OConnectionLineAccess(this); } - // ----------------------------------------------------------------------------- OTableConnection::~OTableConnection() { DBG_DTOR(OTableConnection,NULL); - ////////////////////////////////////////////////////////////////////// // clear vector clearLineData(); } - // ----------------------------------------------------------------------------- sal_Bool OConnectionLineAccess::isEditable() const { return m_pLine ? !m_pLine->GetParent()->getDesignView()->getController().isReadOnly() : sal_False; } - // ----------------------------------------------------------------------------- Reference< XAccessibleContext > SAL_CALL OConnectionLineAccess::getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException) { return this; } - // ----------------------------------------------------------------------------- } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/ConnectionLineData.cxx b/dbaccess/source/ui/querydesign/ConnectionLineData.cxx index cf093e6c5f8d..a81a965d21c7 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLineData.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLineData.cxx @@ -20,19 +20,14 @@ #include "ConnectionLineData.hxx" #include <tools/debug.hxx> - using namespace dbaui; DBG_NAME(OConnectionLineData) -//================================================================== //class OConnectionLineData -//================================================================== -//------------------------------------------------------------------------ OConnectionLineData::OConnectionLineData() { DBG_CTOR(OConnectionLineData,NULL); } -//------------------------------------------------------------------------ OConnectionLineData::OConnectionLineData( const OUString& rSourceFieldName, const OUString& rDestFieldName ) :m_aSourceFieldName( rSourceFieldName ) ,m_aDestFieldName( rDestFieldName ) @@ -40,7 +35,6 @@ OConnectionLineData::OConnectionLineData( const OUString& rSourceFieldName, cons DBG_CTOR(OConnectionLineData,NULL); } -//------------------------------------------------------------------------ OConnectionLineData::OConnectionLineData( const OConnectionLineData& rConnLineData ) : ::salhelper::SimpleReferenceObject() { @@ -48,20 +42,17 @@ OConnectionLineData::OConnectionLineData( const OConnectionLineData& rConnLineDa *this = rConnLineData; } -//------------------------------------------------------------------------ OConnectionLineData::~OConnectionLineData() { DBG_DTOR(OConnectionLineData,NULL); } -//------------------------------------------------------------------------ void OConnectionLineData::CopyFrom(const OConnectionLineData& rSource) { *this = rSource; // Here I rely on the (non-virtual) operator=, which only copies my members } -//------------------------------------------------------------------------ OConnectionLineData& OConnectionLineData::operator=( const OConnectionLineData& rConnLineData ) { if (&rConnLineData == this) @@ -73,21 +64,20 @@ OConnectionLineData& OConnectionLineData::operator=( const OConnectionLineData& return *this; } -//------------------------------------------------------------------------ bool OConnectionLineData::Reset() { m_aDestFieldName = m_aSourceFieldName = OUString(); return true; } -// ----------------------------------------------------------------------------- + namespace dbaui { -//------------------------------------------------------------------------- bool operator==(const OConnectionLineData& lhs, const OConnectionLineData& rhs) { return (lhs.m_aSourceFieldName == rhs.m_aSourceFieldName) && (lhs.m_aDestFieldName == rhs.m_aDestFieldName); } + } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/JAccess.cxx b/dbaccess/source/ui/querydesign/JAccess.cxx index 24352c73db97..52a7dcbf2781 100644 --- a/dbaccess/source/ui/querydesign/JAccess.cxx +++ b/dbaccess/source/ui/querydesign/JAccess.cxx @@ -37,23 +37,19 @@ namespace dbaui ,m_pTableView(_pTableView) { } - // ----------------------------------------------------------------------------- OUString SAL_CALL OJoinDesignViewAccess::getImplementationName() throw(RuntimeException) { return getImplementationName_Static(); } - // ----------------------------------------------------------------------------- OUString OJoinDesignViewAccess::getImplementationName_Static(void) throw( RuntimeException ) { return OUString("org.openoffice.comp.dbu.JoinViewAccessibility"); } - // ----------------------------------------------------------------------------- void OJoinDesignViewAccess::clearTableView() { ::osl::MutexGuard aGuard( m_aMutex ); m_pTableView = NULL; } - // ----------------------------------------------------------------------------- // XAccessibleContext sal_Int32 SAL_CALL OJoinDesignViewAccess::getAccessibleChildCount( ) throw (RuntimeException) { @@ -65,7 +61,6 @@ namespace dbaui nChildCount = m_pTableView->GetTabWinCount() + m_pTableView->getTableConnections()->size(); return nChildCount; } - // ----------------------------------------------------------------------------- Reference< XAccessible > SAL_CALL OJoinDesignViewAccess::getAccessibleChild( sal_Int32 i ) throw (IndexOutOfBoundsException,RuntimeException) { Reference< XAccessible > aRet; @@ -88,32 +83,22 @@ namespace dbaui throw IndexOutOfBoundsException(); return aRet; } - // ----------------------------------------------------------------------------- sal_Bool OJoinDesignViewAccess::isEditable() const { return m_pTableView && !m_pTableView->getDesignView()->getController().isReadOnly(); } - // ----------------------------------------------------------------------------- sal_Int16 SAL_CALL OJoinDesignViewAccess::getAccessibleRole( ) throw (RuntimeException) { return AccessibleRole::VIEW_PORT; } - // ----------------------------------------------------------------------------- Reference< XAccessibleContext > SAL_CALL OJoinDesignViewAccess::getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException) { return this; } - // ----------------------------------------------------------------------------- - // ----------------------------------------------------------------------------- // XInterface - // ----------------------------------------------------------------------------- IMPLEMENT_FORWARD_XINTERFACE2( OJoinDesignViewAccess, VCLXAccessibleComponent, OJoinDesignViewAccess_BASE ) - // ----------------------------------------------------------------------------- // XTypeProvider - // ----------------------------------------------------------------------------- IMPLEMENT_FORWARD_XTYPEPROVIDER2( OJoinDesignViewAccess, VCLXAccessibleComponent, OJoinDesignViewAccess_BASE ) } -// ----------------------------------------------------------------------------- - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx index 20e976d70197..9c376095276b 100644 --- a/dbaccess/source/ui/querydesign/JoinController.cxx +++ b/dbaccess/source/ui/querydesign/JoinController.cxx @@ -73,14 +73,10 @@ using namespace ::com::sun::star::ui::dialogs; using namespace ::dbtools; using namespace ::comphelper; -// ............................................................................. namespace dbaui { -// ............................................................................. -// ============================================================================= -// = AddTableDialogContext -// ============================================================================= +// AddTableDialogContext class AddTableDialogContext : public IAddTableDialogContext { OJoinController& m_rController; @@ -106,37 +102,31 @@ private: OJoinTableView* getTableView() const; }; -// ----------------------------------------------------------------------------- Reference< XConnection > AddTableDialogContext::getConnection() const { return m_rController.getConnection(); } -// ----------------------------------------------------------------------------- bool AddTableDialogContext::allowViews() const { return m_rController.allowViews(); } -// ----------------------------------------------------------------------------- bool AddTableDialogContext::allowQueries() const { return m_rController.allowQueries(); } -// ----------------------------------------------------------------------------- bool AddTableDialogContext::allowAddition() const { return const_cast< OJoinController& >( m_rController ).getJoinView()->getTableView()->IsAddAllowed(); } -// ----------------------------------------------------------------------------- void AddTableDialogContext::addTableWindow( const String& _rQualifiedTableName, const String& _rAliasName ) { getTableView()->AddTabWin( _rQualifiedTableName, _rAliasName, sal_True ); } -// ----------------------------------------------------------------------------- void AddTableDialogContext::onWindowClosing( const Window* _pWindow ) { if ( !m_rController.getView() ) @@ -149,7 +139,6 @@ void AddTableDialogContext::onWindowClosing( const Window* _pWindow ) m_rController.getView()->GrabFocus(); } -// ----------------------------------------------------------------------------- OJoinTableView* AddTableDialogContext::getTableView() const { if ( m_rController.getJoinView() ) @@ -157,37 +146,31 @@ OJoinTableView* AddTableDialogContext::getTableView() const return NULL; } -// ============================================================================= -// = OJoinController -// ============================================================================= +// OJoinController DBG_NAME(OJoinController) -// ----------------------------------------------------------------------------- OJoinController::OJoinController(const Reference< XComponentContext >& _rM) :OJoinController_BASE(_rM) ,m_pAddTableDialog(NULL) { DBG_CTOR(OJoinController,NULL); } -// ----------------------------------------------------------------------------- + OJoinController::~OJoinController() { DBG_DTOR(OJoinController,NULL); } -// ----------------------------------------------------------------------------- void SAL_CALL OJoinController::disposing( const EventObject& _rSource ) throw(RuntimeException) { OJoinController_BASE::disposing( _rSource ); } -// ----------------------------------------------------------------------------- OJoinDesignView* OJoinController::getJoinView() { return static_cast< OJoinDesignView* >( getView() ); } -// ----------------------------------------------------------------------------- void OJoinController::disposing() { { @@ -202,7 +185,7 @@ void OJoinController::disposing() m_vTableConnectionData.clear(); m_vTableData.clear(); } -// ----------------------------------------------------------------------------- + void OJoinController::reconnect( sal_Bool _bUI ) { OJoinController_BASE::reconnect( _bUI ); @@ -210,13 +193,12 @@ void OJoinController::reconnect( sal_Bool _bUI ) m_pAddTableDialog->Update(); } -// ----------------------------------------------------------------------------- void OJoinController::impl_onModifyChanged() { OJoinController_BASE::impl_onModifyChanged(); InvalidateFeature( SID_RELATION_ADD_RELATION ); } -// ----------------------------------------------------------------------------- + void OJoinController::SaveTabWinPosSize(OTableWindow* pTabWin, long nOffsetX, long nOffsetY) { // the data for the window @@ -231,7 +213,7 @@ void OJoinController::SaveTabWinPosSize(OTableWindow* pTabWin, long nOffsetX, lo pData->SetSize(pTabWin->GetSizePixel()); } -// ----------------------------------------------------------------------------- + FeatureState OJoinController::GetState(sal_uInt16 _nId) const { FeatureState aReturn; @@ -257,7 +239,6 @@ FeatureState OJoinController::GetState(sal_uInt16 _nId) const return aReturn; } -// ----------------------------------------------------------------------------- AddTableDialogContext& OJoinController::impl_getDialogContext() const { if ( !m_pDialogContext.get() ) @@ -268,7 +249,6 @@ AddTableDialogContext& OJoinController::impl_getDialogContext() const return *m_pDialogContext; } -// ----------------------------------------------------------------------------- void OJoinController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& aArgs) { switch(_nId) @@ -317,7 +297,7 @@ void OJoinController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& } InvalidateFeature(_nId); } -// ----------------------------------------------------------------------------- + void OJoinController::SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* pTabWinList, long nOffsetX, long nOffsetY ) { // Deletion and recreation of the old implementation with the current model is not correct anymore: @@ -332,12 +312,12 @@ void OJoinController::SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* pTabW for(;aIter != aEnd;++aIter) SaveTabWinPosSize(aIter->second, nOffsetX, nOffsetY); } -// ----------------------------------------------------------------------------- + void OJoinController::removeConnectionData(const TTableConnectionData::value_type& _pData) { m_vTableConnectionData.erase( ::std::remove(m_vTableConnectionData.begin(),m_vTableConnectionData.end(),_pData),m_vTableConnectionData.end()); } -// ----------------------------------------------------------------------------- + void OJoinController::describeSupportedFeatures() { OJoinController_BASE::describeSupportedFeatures(); @@ -347,7 +327,7 @@ void OJoinController::describeSupportedFeatures() implDescribeSupportedFeature( ".uno:AddTable", ID_BROWSER_ADDTABLE,CommandGroup::EDIT ); implDescribeSupportedFeature( ".uno:EditDoc", ID_BROWSER_EDITDOC, CommandGroup::EDIT ); } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL OJoinController::suspend(sal_Bool _bSuspend) throw( RuntimeException ) { if ( getBroadcastHelper().bInDispose || getBroadcastHelper().bDisposed ) @@ -366,7 +346,7 @@ sal_Bool SAL_CALL OJoinController::suspend(sal_Bool _bSuspend) throw( RuntimeExc } return bCheck; } -// ----------------------------------------------------------------------------- + void OJoinController::loadTableWindows( const ::comphelper::NamedValueCollection& i_rViewSettings ) { m_vTableData.clear(); @@ -389,7 +369,6 @@ void OJoinController::loadTableWindows( const ::comphelper::NamedValueCollection } } -// ----------------------------------------------------------------------------- void OJoinController::loadTableWindow( const ::comphelper::NamedValueCollection& i_rTableWindowSettings ) { sal_Int32 nX = -1, nY = -1, nHeight = -1, nWidth = -1; @@ -419,7 +398,7 @@ void OJoinController::loadTableWindow( const ::comphelper::NamedValueCollection& m_aMinimumTableViewSize.Y() = (nY+nHeight); } } -// ----------------------------------------------------------------------------- + void OJoinController::saveTableWindows( ::comphelper::NamedValueCollection& o_rViewSettings ) const { if ( !m_vTableData.empty() ) @@ -447,7 +426,7 @@ void OJoinController::saveTableWindows( ::comphelper::NamedValueCollection& o_rV o_rViewSettings.put( "Tables", aAllTablesData.getPropertyValues() ); } } -// ----------------------------------------------------------------------------- + TTableWindowData::value_type OJoinController::createTableWindowData(const OUString& _sComposedName,const OUString& _sTableName,const OUString& _sWindowName) { OJoinDesignView* pView = getJoinView(); @@ -457,8 +436,7 @@ TTableWindowData::value_type OJoinController::createTableWindowData(const OUStri return TTableWindowData::value_type(); } -// ............................................................................. + } // namespace dbaui -// ............................................................................. /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/JoinDesignView.cxx b/dbaccess/source/ui/querydesign/JoinDesignView.cxx index b5d0c440cd30..31dd26d43b54 100644 --- a/dbaccess/source/ui/querydesign/JoinDesignView.cxx +++ b/dbaccess/source/ui/querydesign/JoinDesignView.cxx @@ -49,10 +49,7 @@ using namespace ::com::sun::star::util; namespace dbaui { -// ============================================================================= -// = OJoinDesignView -// ============================================================================= -// ----------------------------------------------------------------------------- +// OJoinDesignView OJoinDesignView::OJoinDesignView(Window* _pParent, OJoinController& _rController,const Reference< XComponentContext >& _rxContext) :ODataView( _pParent, _rController, _rxContext ) ,m_pTableView(NULL) @@ -60,7 +57,7 @@ OJoinDesignView::OJoinDesignView(Window* _pParent, OJoinController& _rController { m_pScrollWindow = new OScrollWindowHelper(this); } -// ----------------------------------------------------------------------------- + OJoinDesignView::~OJoinDesignView() { SAL_WNODEPRECATED_DECLARATIONS_PUSH @@ -72,7 +69,7 @@ OJoinDesignView::~OJoinDesignView() SAL_WNODEPRECATED_DECLARATIONS_POP m_pTableView = NULL; } -// ------------------------------------------------------------------------- + void OJoinDesignView::Construct() { m_pScrollWindow->setTableView(m_pTableView); @@ -83,11 +80,11 @@ void OJoinDesignView::Construct() ODataView::Construct(); } -// ----------------------------------------------------------------------------- + void OJoinDesignView::initialize() { } -// ------------------------------------------------------------------------- + void OJoinDesignView::resizeDocumentView(Rectangle& _rPlayground) { m_pScrollWindow->SetPosSizePixel( _rPlayground.TopLeft(), _rPlayground.GetSize() ); @@ -96,16 +93,16 @@ void OJoinDesignView::resizeDocumentView(Rectangle& _rPlayground) _rPlayground.SetPos( _rPlayground.BottomRight() ); _rPlayground.SetSize( Size( 0, 0 ) ); } -// ----------------------------------------------------------------------------- + void OJoinDesignView::setReadOnly(sal_Bool /*_bReadOnly*/) { } -// ----------------------------------------------------------------------------- + void OJoinDesignView::SaveTabWinUIConfig(OTableWindow* pWin) { getController().SaveTabWinPosSize(pWin, m_pScrollWindow->GetHScrollBar()->GetThumbPos(), m_pScrollWindow->GetVScrollBar()->GetThumbPos()); } -// ----------------------------------------------------------------------------- + void OJoinDesignView::KeyInput( const KeyEvent& rEvt ) { if ( m_pTableView && m_pTableView->IsVisible() ) @@ -113,7 +110,6 @@ void OJoinDesignView::KeyInput( const KeyEvent& rEvt ) else ODataView::KeyInput(rEvt); } -// ----------------------------------------------------------------------------- } // namespace dbaui diff --git a/dbaccess/source/ui/querydesign/JoinExchange.cxx b/dbaccess/source/ui/querydesign/JoinExchange.cxx index eec14375a6b0..6cc155618771 100644 --- a/dbaccess/source/ui/querydesign/JoinExchange.cxx +++ b/dbaccess/source/ui/querydesign/JoinExchange.cxx @@ -29,11 +29,8 @@ namespace dbaui using namespace ::com::sun::star::datatransfer; String OJoinExchObj::m_sJoinFormat; - //================================================================== // class OJoinExchObj - //================================================================== DBG_NAME(OJoinExchObj) - //------------------------------------------------------------------------ OJoinExchObj::OJoinExchObj(const OJoinExchangeData& jxdSource,sal_Bool _bFirstEntry) :m_bFirstEntry(_bFirstEntry) ,m_jxdSourceDescription(jxdSource) @@ -43,20 +40,17 @@ namespace dbaui // add available types to list } - //------------------------------------------------------------------------ OJoinExchObj::~OJoinExchObj() { DBG_DTOR(OJoinExchObj,NULL); } - //------------------------------------------------------------------------ void OJoinExchObj::StartDrag( Window* _pWindow, sal_Int8 _nDragSourceActions, IDragTransferableListener* _pListener ) { m_pDragListener = _pListener; TransferableHelper::StartDrag(_pWindow, _nDragSourceActions); } - //------------------------------------------------------------------------ void OJoinExchObj::DragFinished( sal_Int8 /*nDropAction*/ ) { if (m_pDragListener) @@ -64,7 +58,6 @@ namespace dbaui m_pDragListener = NULL; } - //------------------------------------------------------------------------ sal_Bool OJoinExchObj::isFormatAvailable( const DataFlavorExVector& _rFormats ,SotFormatStringId _nSlotID) { DataFlavorExVector::const_iterator aCheckEnd = _rFormats.end(); @@ -79,7 +72,6 @@ namespace dbaui return sal_False; } - //------------------------------------------------------------------------ OJoinExchangeData OJoinExchObj::GetSourceDescription(const Reference< XTransferable >& _rxObject) { OJoinExchangeData aReturn; @@ -93,7 +85,6 @@ namespace dbaui return aReturn; } - //------------------------------------------------------------------------ Sequence< sal_Int8 > OJoinExchObj::getUnoTunnelImplementationId() { static ::cppu::OImplementationId * pId = 0; @@ -109,7 +100,6 @@ namespace dbaui return pId->getImplementationId(); } - //------------------------------------------------------------------------ sal_Int64 SAL_CALL OJoinExchObj::getSomething( const Sequence< sal_Int8 >& _rIdentifier ) throw(RuntimeException) { if (_rIdentifier.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 ) ) @@ -118,7 +108,6 @@ namespace dbaui return 0; } - //------------------------------------------------------------------------ void OJoinExchObj::AddSupportedFormats() { AddFormat( SOT_FORMATSTR_ID_SBA_JOIN ); @@ -126,7 +115,6 @@ namespace dbaui AddFormat( SOT_FORMATSTR_ID_SBA_TABID ); } - //------------------------------------------------------------------------ sal_Bool OJoinExchObj::GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) { sal_uInt32 nFormat = SotExchange::GetFormat(rFlavor); @@ -139,7 +127,6 @@ namespace dbaui return sal_False; } - //------------------------------------------------------------------------ Any SAL_CALL OJoinExchObj::queryInterface( const Type& _rType ) throw(RuntimeException) { Any aReturn = TransferableHelper::queryInterface(_rType); @@ -148,19 +135,16 @@ namespace dbaui return aReturn; } - //------------------------------------------------------------------------ void SAL_CALL OJoinExchObj::acquire( ) throw() { TransferableHelper::acquire( ); } - //------------------------------------------------------------------------ void SAL_CALL OJoinExchObj::release( ) throw() { TransferableHelper::release( ); } - } // namespace dbaui /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index ebe877782c34..c20d09153f58 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -55,7 +55,6 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; #define LINE_SIZE 50 -//////////////////////////////////////////////////////////////// // Constants for the window layout #define TABWIN_SPACING_X 17 #define TABWIN_SPACING_Y 17 @@ -72,7 +71,6 @@ OScrollWindowHelper::OScrollWindowHelper( Window* pParent) : Window( pParent) { DBG_CTOR(OScrollWindowHelper,NULL); - ////////////////////////////////////////////////////////////////////// // ScrollBars GetHScrollBar()->SetRange( Range(0, 1000) ); @@ -89,7 +87,6 @@ OScrollWindowHelper::OScrollWindowHelper( Window* pParent) : Window( pParent) SetAccessibleRole(AccessibleRole::SCROLL_PANE); } -// ----------------------------------------------------------------------------- OScrollWindowHelper::~OScrollWindowHelper() { DBG_DTOR(OScrollWindowHelper,NULL); @@ -100,23 +97,21 @@ OScrollWindowHelper::~OScrollWindowHelper() m_pTableView = NULL; } -// ----------------------------------------------------------------------------- void OScrollWindowHelper::setTableView(OJoinTableView* _pTableView) { m_pTableView = _pTableView; - ////////////////////////////////////////////////////////////////////// // ScrollBars GetHScrollBar()->SetScrollHdl( LINK(m_pTableView, OJoinTableView, ScrollHdl) ); GetVScrollBar()->SetScrollHdl( LINK(m_pTableView, OJoinTableView, ScrollHdl) ); } -// ----------------------------------------------------------------------------- + void OScrollWindowHelper::resetRange(const Point& _aSize) { Point aPos = PixelToLogic(_aSize); GetHScrollBar()->SetRange( Range(0, aPos.X() + TABWIN_SPACING_X) ); GetVScrollBar()->SetRange( Range(0, aPos.Y() + TABWIN_SPACING_Y) ); } -//------------------------------------------------------------------------------ + void OScrollWindowHelper::Resize() { Window::Resize(); @@ -157,14 +152,10 @@ void OScrollWindowHelper::Resize() m_pTableView->SetPosSizePixel(Point( 0, 0 ),Size( aTotalOutputSize.Width()-nVScrollWidth, aTotalOutputSize.Height()-nHScrollHeight )); } -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- -//================================================================== + // class OJoinTableView -//================================================================== DBG_NAME(OJoinTableView); -//------------------------------------------------------------------------------ OJoinTableView::OJoinTableView( Window* pParent, OJoinDesignView* pView ) :Window( pParent,WB_BORDER ) ,DropTargetHelper(this) @@ -186,7 +177,6 @@ OJoinTableView::OJoinTableView( Window* pParent, OJoinDesignView* pView ) m_aDragScrollTimer.SetTimeoutHdl(LINK(this, OJoinTableView, OnDragScrollTimer)); } -//------------------------------------------------------------------------------ OJoinTableView::~OJoinTableView() { DBG_DTOR(OJoinTableView,NULL); @@ -195,20 +185,18 @@ OJoinTableView::~OJoinTableView() m_pAccessible->clearTableView(); m_pAccessible = NULL; } - ////////////////////////////////////////////////////////////////////// // delete lists clearLayoutInformation(); } -//------------------------------------------------------------------------------ + IMPL_LINK( OJoinTableView, ScrollHdl, ScrollBar*, pScrollBar ) { - ////////////////////////////////////////////////////////////////////// // move all windows ScrollPane( pScrollBar->GetDelta(), (pScrollBar == GetHScrollBar()), sal_False ); return 0; } -//------------------------------------------------------------------------------ + void OJoinTableView::Resize() { DBG_CHKTHIS(OJoinTableView,NULL); @@ -241,14 +229,13 @@ void OJoinTableView::Resize() pCurrent->SetPosPixel(aPos); } } -//------------------------------------------------------------------------------ + sal_uLong OJoinTableView::GetTabWinCount() { DBG_CHKTHIS(OJoinTableView,NULL); return m_aTableMap.size(); } -//------------------------------------------------------------------------------ bool OJoinTableView::RemoveConnection( OTableConnection* _pConn,sal_Bool _bDelete ) { DBG_CHKTHIS(OJoinTableView,NULL); @@ -275,7 +262,6 @@ bool OJoinTableView::RemoveConnection( OTableConnection* _pConn,sal_Bool _bDelet return true; } -//------------------------------------------------------------------------ OTableWindow* OJoinTableView::GetTabWindow( const String& rName ) { DBG_CHKTHIS(OJoinTableView,NULL); @@ -283,7 +269,7 @@ OTableWindow* OJoinTableView::GetTabWindow( const String& rName ) return aIter == m_aTableMap.end() ? NULL : aIter->second; } -// ----------------------------------------------------------------------------- + TTableWindowData::value_type OJoinTableView::createTableWindowData(const OUString& _rComposedName ,const OUString& _sTableName ,const OUString& _rWinName) @@ -317,14 +303,14 @@ TTableWindowData::value_type OJoinTableView::createTableWindowData(const OUStrin } return pData; } -// ----------------------------------------------------------------------------- + OTableWindowData* OJoinTableView::CreateImpl(const OUString& _rComposedName ,const OUString& _sTableName ,const OUString& _rWinName) { return new OTableWindowData( NULL,_rComposedName,_sTableName, _rWinName ); } -//------------------------------------------------------------------------------ + void OJoinTableView::AddTabWin(const OUString& _rComposedName, const OUString& rWinName, sal_Bool /*bNewTable*/) { DBG_CHKTHIS(OJoinTableView,NULL); @@ -332,7 +318,6 @@ void OJoinTableView::AddTabWin(const OUString& _rComposedName, const OUString& r TTableWindowData::value_type pNewTabWinData(createTableWindowData( _rComposedName, rWinName,rWinName )); - ////////////////////////////////////////////////////////////////// // insert new window in window list OTableWindow* pNewTabWin = createWindow( pNewTabWinData ); if ( pNewTabWin->Init() ) @@ -360,11 +345,9 @@ void OJoinTableView::AddTabWin(const OUString& _rComposedName, const OUString& r } } -//------------------------------------------------------------------------------ void OJoinTableView::RemoveTabWin( OTableWindow* pTabWin ) { DBG_CHKTHIS(OJoinTableView,NULL); - ////////////////////////////////////////////////////////////////////// // first delete all connections of this window to others bool bRemove = true; TTableWindowData::value_type pData = pTabWin->GetData(); @@ -385,7 +368,6 @@ void OJoinTableView::RemoveTabWin( OTableWindow* pTabWin ) ++aIter; } - ////////////////////////////////////////////////////////////////////// // then delete the window itself if ( bRemove ) { @@ -419,12 +401,11 @@ void OJoinTableView::RemoveTabWin( OTableWindow* pTabWin ) if ( (sal_Int32)m_vTableConnection.size() < (nCount-1) ) // if some connections could be removed modified(); } + namespace { - // ----------------------------------------------------------------------------- sal_Bool isScrollAllowed( OJoinTableView* _pView,long nDelta, sal_Bool bHoriz) { - ////////////////////////////////////////////////////////////////////// // adjust ScrollBar-Positions ScrollBar* pBar = _pView->GetVScrollBar(); if( bHoriz ) @@ -447,7 +428,6 @@ namespace return sal_True; } - // ----------------------------------------------------------------------------- sal_Bool getMovementImpl(OJoinTableView* _pView,const Point& _rPoint,const Size& _rSize,long& _nScrollX,long& _nScrollY) { _nScrollY = _nScrollX = 0; @@ -504,17 +484,16 @@ namespace } } - return bVisbile; } } // end of ano namespace -// ----------------------------------------------------------------------------- + sal_Bool OJoinTableView::isMovementAllowed(const Point& _rPoint,const Size& _rSize) { long nX,nY; return getMovementImpl(this,_rPoint,_rSize,nX,nY); } -//------------------------------------------------------------------------------ + void OJoinTableView::EnsureVisible(const OTableWindow* _pWin) { // data about the tab win @@ -522,7 +501,7 @@ void OJoinTableView::EnsureVisible(const OTableWindow* _pWin) EnsureVisible( pData->GetPosition() , pData->GetSize()); Invalidate(INVALIDATE_NOCHILDREN); } -//------------------------------------------------------------------------------ + void OJoinTableView::EnsureVisible(const Point& _rPoint,const Size& _rSize) { long nScrollX,nScrollY; @@ -538,11 +517,9 @@ void OJoinTableView::EnsureVisible(const Point& _rPoint,const Size& _rSize) } } -//------------------------------------------------------------------------------ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin ) { DBG_CHKTHIS(OJoinTableView,NULL); - ////////////////////////////////////////////////////////////////// // determine position: // the window is divided into lines with height TABWIN_SPACING_Y+TABWIN_HEIGTH_STD. // Then for each line is checked, if there is space for another window. @@ -553,18 +530,15 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin ) sal_Bool bEnd = sal_False; while( !bEnd ) { - ////////////////////////////////////////////////////////////////// // Set new position to start of line aNewPos.X() = TABWIN_SPACING_X; aNewPos.Y() = (nRow+1) * TABWIN_SPACING_Y; - ////////////////////////////////////////////////////////////////// // determine rectangle for the corresponding line Rectangle aRowRect( Point(0,0), aOutSize ); aRowRect.Top() = nRow * ( TABWIN_SPACING_Y + TABWIN_HEIGHT_STD ); aRowRect.Bottom() = (nRow+1) * ( TABWIN_SPACING_Y + TABWIN_HEIGHT_STD ); - ////////////////////////////////////////////////////////////////// // check occupied areas of this line OTableWindow* pOtherTabWin; OTableWindowMapIterator aIter = m_aTableMap.begin(); @@ -579,14 +553,12 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin ) ( (aOtherTabWinRect.Bottom()>aRowRect.Top()) && (aOtherTabWinRect.Bottom()<aRowRect.Bottom()) ) ) { - ////////////////////////////////////////////////////////////////// // TabWin is in the line if( aOtherTabWinRect.Right()>aNewPos.X() ) aNewPos.X() = aOtherTabWinRect.Right() + TABWIN_SPACING_X; } } - ////////////////////////////////////////////////////////////////// // Is there space left in this line? if( (aNewPos.X()+TABWIN_WIDTH_STD)<aRowRect.Right() ) { @@ -609,7 +581,6 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin ) } } - ////////////////////////////////////////////////////////////////// // determine size Size aNewSize( CalcZoom(TABWIN_WIDTH_STD), CalcZoom(TABWIN_HEIGHT_STD) ); @@ -626,7 +597,6 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin ) pTabWin->SetPosSizePixel( aNewPos, aNewSize ); } -//------------------------------------------------------------------------------ void OJoinTableView::DataChanged(const DataChangedEvent& rDCEvt) { DBG_CHKTHIS(OJoinTableView,NULL); @@ -639,7 +609,6 @@ void OJoinTableView::DataChanged(const DataChangedEvent& rDCEvt) } } -//------------------------------------------------------------------------------ void OJoinTableView::InitColors() { DBG_CHKTHIS(OJoinTableView,NULL); @@ -648,7 +617,6 @@ void OJoinTableView::InitColors() SetBackground(Wallpaper(Color(aSystemStyle.GetDialogColor()))); } -//------------------------------------------------------------------------------ void OJoinTableView::BeginChildMove( OTableWindow* pTabWin, const Point& rMousePos ) { DBG_CHKTHIS(OJoinTableView,NULL); @@ -672,7 +640,6 @@ void OJoinTableView::NotifyTitleClicked( OTableWindow* pTabWin, const Point rMou BeginChildMove(pTabWin, rMousePos); } -//------------------------------------------------------------------------------ void OJoinTableView::BeginChildSizing( OTableWindow* pTabWin, const Pointer& rPointer ) { DBG_CHKTHIS(OJoinTableView,NULL); @@ -685,13 +652,11 @@ void OJoinTableView::BeginChildSizing( OTableWindow* pTabWin, const Pointer& rPo StartTracking(); } -//------------------------------------------------------------------------------ sal_Bool OJoinTableView::ScrollPane( long nDelta, sal_Bool bHoriz, sal_Bool bPaintScrollBars ) { DBG_CHKTHIS(OJoinTableView,NULL); sal_Bool bRet = sal_True; - ////////////////////////////////////////////////////////////////////// // adjust ScrollBar-Positions if( bPaintScrollBars ) { @@ -731,20 +696,17 @@ sal_Bool OJoinTableView::ScrollPane( long nDelta, sal_Bool bHoriz, sal_Bool bPai } } - ////////////////////////////////////////////////////////////////////// // If ScrollOffset hitting borders, no redrawing. if( (GetHScrollBar()->GetThumbPos()==m_aScrollOffset.X()) && (GetVScrollBar()->GetThumbPos()==m_aScrollOffset.Y()) ) return sal_False; - ////////////////////////////////////////////////////////////////////// // set ScrollOffset anew if (bHoriz) m_aScrollOffset.X() = GetHScrollBar()->GetThumbPos(); else m_aScrollOffset.Y() = GetVScrollBar()->GetThumbPos(); - ////////////////////////////////////////////////////////////////////// // move all windows OTableWindow* pTabWin; Point aPos; @@ -768,7 +730,6 @@ sal_Bool OJoinTableView::ScrollPane( long nDelta, sal_Bool bHoriz, sal_Bool bPai return bRet; } -//------------------------------------------------------------------------------ void OJoinTableView::Tracking( const TrackingEvent& rTEvt ) { DBG_CHKTHIS(OJoinTableView,NULL); @@ -781,9 +742,7 @@ void OJoinTableView::Tracking( const TrackingEvent& rTEvt ) if (m_aDragScrollTimer.IsActive()) m_aDragScrollTimer.Stop(); - ////////////////////////////////////////////////////////////////////// // adjust position of child after moving - ////////////////////////////////////////////////////////////////////// // windows are not allowed to leave display range Point aDragWinPos = rTEvt.GetMouseEvent().GetPosPixel() - m_aDragOffset; Size aDragWinSize = m_pDragWin->GetSizePixel(); @@ -801,8 +760,6 @@ void OJoinTableView::Tracking( const TrackingEvent& rTEvt ) aDragWinPos.Y() = 0; // TODO : don't position window anew, if it is leaving range, but just expand the range - - ////////////////////////////////////////////////////////////////////// // position window EndTracking(); m_pDragWin->SetZOrder(NULL, WINDOW_ZORDER_FIRST); @@ -865,13 +822,11 @@ void OJoinTableView::Tracking( const TrackingEvent& rTEvt ) } } -//------------------------------------------------------------------------------ void OJoinTableView::ConnDoubleClicked( OTableConnection* /*pConnection*/ ) { DBG_CHKTHIS(OJoinTableView,NULL); } -//------------------------------------------------------------------------------ void OJoinTableView::MouseButtonDown( const MouseEvent& rEvt ) { DBG_CHKTHIS(OJoinTableView,NULL); @@ -879,12 +834,10 @@ void OJoinTableView::MouseButtonDown( const MouseEvent& rEvt ) Window::MouseButtonDown(rEvt); } -//------------------------------------------------------------------------------ void OJoinTableView::MouseButtonUp( const MouseEvent& rEvt ) { DBG_CHKTHIS(OJoinTableView,NULL); Window::MouseButtonUp(rEvt); - ////////////////////////////////////////////////////////////////////// // Has a connection been selected? if( !m_vTableConnection.empty() ) { @@ -908,7 +861,6 @@ void OJoinTableView::MouseButtonUp( const MouseEvent& rEvt ) } } -//------------------------------------------------------------------------------ void OJoinTableView::KeyInput( const KeyEvent& rEvt ) { DBG_CHKTHIS(OJoinTableView,NULL); @@ -925,7 +877,6 @@ void OJoinTableView::KeyInput( const KeyEvent& rEvt ) Window::KeyInput( rEvt ); } -//------------------------------------------------------------------------------ void OJoinTableView::DeselectConn(OTableConnection* pConn) { DBG_CHKTHIS(OJoinTableView,NULL); @@ -945,7 +896,6 @@ void OJoinTableView::DeselectConn(OTableConnection* pConn) m_pSelectedConn = NULL; } -//------------------------------------------------------------------------------ void OJoinTableView::SelectConn(OTableConnection* pConn) { DBG_CHKTHIS(OJoinTableView,NULL); @@ -1000,28 +950,24 @@ void OJoinTableView::SelectConn(OTableConnection* pConn) } } } -//------------------------------------------------------------------------------ + void OJoinTableView::Paint( const Rectangle& rRect ) { DBG_CHKTHIS(OJoinTableView,NULL); DrawConnections( rRect ); } -//------------------------------------------------------------------------------ void OJoinTableView::InvalidateConnections() { DBG_CHKTHIS(OJoinTableView,NULL); - ////////////////////////////////////////////////////////////////////// // draw Joins ::std::for_each(m_vTableConnection.begin(),m_vTableConnection.end(), ::std::mem_fun(& OTableConnection::InvalidateConnection)); } -//------------------------------------------------------------------------------ void OJoinTableView::DrawConnections( const Rectangle& rRect ) { DBG_CHKTHIS(OJoinTableView,NULL); - ////////////////////////////////////////////////////////////////////// // draw Joins ::std::for_each(m_vTableConnection.begin(),m_vTableConnection.end(),boost::bind( &OTableConnection::Draw, _1, boost::cref( rRect ))); // finally redraw the selected one above all others @@ -1029,28 +975,26 @@ void OJoinTableView::DrawConnections( const Rectangle& rRect ) GetSelectedConn()->Draw( rRect ); } - -//------------------------------------------------------------------------------ ::std::vector<OTableConnection*>::const_iterator OJoinTableView::getTableConnections(const OTableWindow* _pFromWin) const { return ::std::find_if( m_vTableConnection.begin(), m_vTableConnection.end(), ::std::bind2nd(::std::mem_fun(&OTableConnection::isTableConnection),_pFromWin)); } -// ----------------------------------------------------------------------------- + sal_Int32 OJoinTableView::getConnectionCount(const OTableWindow* _pFromWin) const { return ::std::count_if( m_vTableConnection.begin(), m_vTableConnection.end(), ::std::bind2nd(::std::mem_fun(&OTableConnection::isTableConnection),_pFromWin)); } -//------------------------------------------------------------------------------ + sal_Bool OJoinTableView::ExistsAConn(const OTableWindow* pFrom) const { DBG_CHKTHIS(OJoinTableView,NULL); return getTableConnections(pFrom) != m_vTableConnection.end(); } -//------------------------------------------------------------------------ + void OJoinTableView::ClearAll() { DBG_CHKTHIS(OJoinTableView,NULL); @@ -1074,7 +1018,6 @@ void OJoinTableView::ClearAll() Invalidate(); } -//------------------------------------------------------------------------ sal_Bool OJoinTableView::ScrollWhileDragging() { DBG_CHKTHIS(OJoinTableView,NULL); @@ -1152,19 +1095,18 @@ sal_Bool OJoinTableView::ScrollWhileDragging() return bScrolling; } -//------------------------------------------------------------------------ IMPL_LINK_NOARG(OJoinTableView, OnDragScrollTimer) { ScrollWhileDragging(); return 0L; } -// ----------------------------------------------------------------------------- + void OJoinTableView::invalidateAndModify(SfxUndoAction *_pAction) { Invalidate(INVALIDATE_NOCHILDREN); m_pView->getController().addUndoActionAndInvalidate(_pAction); } -//------------------------------------------------------------------------ + void OJoinTableView::TabWinMoved(OTableWindow* ptWhich, const Point& ptOldPosition) { DBG_CHKTHIS(OJoinTableView,NULL); @@ -1174,7 +1116,6 @@ void OJoinTableView::TabWinMoved(OTableWindow* ptWhich, const Point& ptOldPositi invalidateAndModify(new OJoinMoveTabWinUndoAct(this, ptOldPosition, ptWhich)); } -//------------------------------------------------------------------------ void OJoinTableView::TabWinSized(OTableWindow* ptWhich, const Point& ptOldPosition, const Size& szOldSize) { DBG_CHKTHIS(OJoinTableView,NULL); @@ -1184,7 +1125,6 @@ void OJoinTableView::TabWinSized(OTableWindow* ptWhich, const Point& ptOldPositi invalidateAndModify(new OJoinSizeTabWinUndoAct(this, ptOldPosition, szOldSize, ptWhich)); } -//------------------------------------------------------------------------------ sal_Bool OJoinTableView::IsAddAllowed() { DBG_CHKTHIS(OJoinTableView,NULL); @@ -1212,7 +1152,7 @@ sal_Bool OJoinTableView::IsAddAllowed() return sal_True; } -// ----------------------------------------------------------------------------- + void OJoinTableView::executePopup(const Point& _aPos,OTableConnection* _pSelConnection) { PopupMenu aContextMenu( ModuleRes( RID_MENU_JOINVIEW_CONNECTION ) ); @@ -1226,7 +1166,7 @@ void OJoinTableView::executePopup(const Point& _aPos,OTableConnection* _pSelConn break; } } -//------------------------------------------------------------------------------ + void OJoinTableView::Command(const CommandEvent& rEvt) { DBG_CHKTHIS(OJoinTableView,NULL); @@ -1277,7 +1217,6 @@ void OJoinTableView::Command(const CommandEvent& rEvt) Window::Command(rEvt); } -//------------------------------------------------------------------------------ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTableWindow* pRhs,bool _bSupressCrossOrNaturalJoin,const OTableConnection* _rpFirstAfter) const { OTableConnection* pConn = NULL; @@ -1330,7 +1269,6 @@ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTab return pConn; } -//------------------------------------------------------------------------------ long OJoinTableView::PreNotify(NotifyEvent& rNEvt) { sal_Bool bHandled = sal_False; @@ -1525,7 +1463,6 @@ long OJoinTableView::PreNotify(NotifyEvent& rNEvt) return 1L; } -//------------------------------------------------------------------------------ void OJoinTableView::GrabTabWinFocus() { if (m_pLastFocusTabWin && m_pLastFocusTabWin->IsVisible()) @@ -1544,7 +1481,7 @@ void OJoinTableView::GrabTabWinFocus() pFirstWin->GrabFocus(); } } -// ----------------------------------------------------------------------------- + void OJoinTableView::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); @@ -1569,7 +1506,7 @@ void OJoinTableView::StateChanged( StateChangedType nType ) Resize(); } } -//------------------------------------------------------------------------------ + void OJoinTableView::HideTabWins() { DBG_CHKTHIS(OJoinTableView,NULL); @@ -1591,30 +1528,29 @@ void OJoinTableView::HideTabWins() SetUpdateMode(sal_True); } -// ----------------------------------------------------------------------------- + sal_Int8 OJoinTableView::AcceptDrop( const AcceptDropEvent& /*_rEvt*/ ) { return DND_ACTION_NONE; } -// ----------------------------------------------------------------------------- + sal_Int8 OJoinTableView::ExecuteDrop( const ExecuteDropEvent& /*_rEvt*/ ) { return DND_ACTION_NONE; } -// ----------------------------------------------------------------------------- + void OJoinTableView::dragFinished( ) { } -//------------------------------------------------------------------------------ + void OJoinTableView::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ ) { } -// ----------------------------------------------------------------------------- + void OJoinTableView::clearLayoutInformation() { m_pLastFocusTabWin = NULL; m_pSelectedConn = NULL; - ////////////////////////////////////////////////////////////////////// // delete lists OTableWindowMapIterator aIter = m_aTableMap.begin(); OTableWindowMapIterator aEnd = m_aTableMap.end(); @@ -1637,30 +1573,30 @@ void OJoinTableView::clearLayoutInformation() m_vTableConnection.clear(); } -// ----------------------------------------------------------------------------- + void OJoinTableView::lookForUiActivities() { } -// ----------------------------------------------------------------------------- + void OJoinTableView::LoseFocus() { DeselectConn(GetSelectedConn()); Window::LoseFocus(); } -// ----------------------------------------------------------------------------- + void OJoinTableView::GetFocus() { Window::GetFocus(); if ( !m_aTableMap.empty() && !GetSelectedConn() ) GrabTabWinFocus(); } -// ----------------------------------------------------------------------------- + Reference< XAccessible > OJoinTableView::CreateAccessible() { m_pAccessible = new OJoinDesignViewAccess(this); return m_pAccessible; } -// ----------------------------------------------------------------------------- + void OJoinTableView::modified() { OJoinController& rController = m_pView->getController(); @@ -1668,7 +1604,7 @@ void OJoinTableView::modified() rController.InvalidateFeature(ID_BROWSER_ADDTABLE); rController.InvalidateFeature(SID_RELATION_ADD_RELATION); } -// ----------------------------------------------------------------------------- + void OJoinTableView::addConnection(OTableConnection* _pConnection,sal_Bool _bAddData) { if ( _bAddData ) @@ -1689,18 +1625,18 @@ void OJoinTableView::addConnection(OTableConnection* _pConnection,sal_Bool _bAdd Any(), makeAny(_pConnection->GetAccessible())); } -// ----------------------------------------------------------------------------- + bool OJoinTableView::allowQueries() const { return true; } -// ----------------------------------------------------------------------------- + void OJoinTableView::onNoColumns_throw() { OSL_FAIL( "OTableWindow::onNoColumns_throw: cannot really handle this!" ); throw SQLException(); } -//------------------------------------------------------------------------------ + bool OJoinTableView::supressCrossNaturalJoin(const TTableConnectionData::value_type& ) const { return false; diff --git a/dbaccess/source/ui/querydesign/QTableConnection.cxx b/dbaccess/source/ui/querydesign/QTableConnection.cxx index 849cd9c30482..48ce949d29c2 100644 --- a/dbaccess/source/ui/querydesign/QTableConnection.cxx +++ b/dbaccess/source/ui/querydesign/QTableConnection.cxx @@ -22,12 +22,9 @@ #include "QueryTableView.hxx" #include "ConnectionLine.hxx" using namespace dbaui; -//======================================================================== // class OQueryTableConnection -//======================================================================== DBG_NAME(OQueryTableConnection) -//------------------------------------------------------------------------ OQueryTableConnection::OQueryTableConnection(OQueryTableView* pContainer, const TTableConnectionData::value_type& pTabConnData) :OTableConnection(pContainer, pTabConnData) ,m_bVisited(sal_False) @@ -35,20 +32,18 @@ OQueryTableConnection::OQueryTableConnection(OQueryTableView* pContainer, const DBG_CTOR(OQueryTableConnection,NULL); } -//------------------------------------------------------------------------ OQueryTableConnection::OQueryTableConnection(const OQueryTableConnection& rConn) :OTableConnection( rConn ) { DBG_CTOR(OQueryTableConnection,NULL); // no own members, so base class functionality is sufficient } -//------------------------------------------------------------------------ + OQueryTableConnection::~OQueryTableConnection() { DBG_DTOR(OQueryTableConnection,NULL); } -//------------------------------------------------------------------------ OQueryTableConnection& OQueryTableConnection::operator=(const OQueryTableConnection& rConn) { if (&rConn == this) @@ -59,7 +54,6 @@ OQueryTableConnection& OQueryTableConnection::operator=(const OQueryTableConnect return *this; } -//------------------------------------------------------------------------ sal_Bool OQueryTableConnection::operator==(const OQueryTableConnection& rCompare) { OSL_ENSURE(GetData() && rCompare.GetData(), "OQueryTableConnection::operator== : one of the two participants has no data!"); @@ -82,6 +76,5 @@ sal_Bool OQueryTableConnection::operator==(const OQueryTableConnection& rCompare ) ); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QTableConnection.hxx b/dbaccess/source/ui/querydesign/QTableConnection.hxx index 728bd4dc0a79..352f309486b2 100644 --- a/dbaccess/source/ui/querydesign/QTableConnection.hxx +++ b/dbaccess/source/ui/querydesign/QTableConnection.hxx @@ -25,7 +25,6 @@ namespace dbaui { - //================================================================== class OQueryTableView; class OQueryTableConnection : public OTableConnection { diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx index 314fda96ba0a..429e32a11352 100644 --- a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx +++ b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx @@ -23,11 +23,8 @@ using namespace dbaui; -//======================================================================== // class OQueryTableConnectionData -//======================================================================== DBG_NAME(OQueryTableConnectionData) -//------------------------------------------------------------------------ OQueryTableConnectionData::OQueryTableConnectionData() :OTableConnectionData() ,m_eJoinType (INNER_JOIN) @@ -36,7 +33,6 @@ OQueryTableConnectionData::OQueryTableConnectionData() DBG_CTOR(OQueryTableConnectionData,NULL); } -//------------------------------------------------------------------------ OQueryTableConnectionData::OQueryTableConnectionData( const OQueryTableConnectionData& rConnData ) :OTableConnectionData( rConnData ) { @@ -50,7 +46,6 @@ OQueryTableConnectionData::OQueryTableConnectionData( const OQueryTableConnectio m_bNatural = rConnData.m_bNatural; } -//------------------------------------------------------------------------ OQueryTableConnectionData::OQueryTableConnectionData(const TTableWindowData::value_type& _pReferencingTable ,const TTableWindowData::value_type& _pReferencedTable ,const OUString& rConnName) @@ -65,13 +60,11 @@ OQueryTableConnectionData::OQueryTableConnectionData(const TTableWindowData::val DBG_CTOR(OQueryTableConnectionData,NULL); } -//------------------------------------------------------------------------ OQueryTableConnectionData::~OQueryTableConnectionData() { DBG_DTOR(OQueryTableConnectionData,NULL); } -//------------------------------------------------------------------------ OConnectionLineDataRef OQueryTableConnectionData::CreateLineDataObj() { DBG_CHKTHIS(OQueryTableConnectionData,NULL); @@ -79,14 +72,12 @@ OConnectionLineDataRef OQueryTableConnectionData::CreateLineDataObj() return new OConnectionLineData(); } -//------------------------------------------------------------------------ OConnectionLineDataRef OQueryTableConnectionData::CreateLineDataObj( const OConnectionLineData& rConnLineData ) { DBG_CHKTHIS(OQueryTableConnectionData,NULL); return new OConnectionLineData( rConnLineData ); } -//------------------------------------------------------------------------ void OQueryTableConnectionData::CopyFrom(const OTableConnectionData& rSource) { DBG_CHKTHIS(OQueryTableConnectionData,NULL); @@ -94,7 +85,6 @@ void OQueryTableConnectionData::CopyFrom(const OTableConnectionData& rSource) *this = (const OQueryTableConnectionData&)rSource; } -//------------------------------------------------------------------------ OQueryTableConnectionData& OQueryTableConnectionData::operator=(const OQueryTableConnectionData& rConnData) { DBG_CHKTHIS(OQueryTableConnectionData,NULL); @@ -114,14 +104,12 @@ OQueryTableConnectionData& OQueryTableConnectionData::operator=(const OQueryTabl return *this; } -//------------------------------------------------------------------------------ OUString OQueryTableConnectionData::GetAliasName(EConnectionSide nWhich) const { DBG_CHKTHIS(OQueryTableConnectionData,NULL); return nWhich == JTCS_FROM ? m_pReferencingTable->GetWinName() : m_pReferencedTable->GetWinName(); } -//------------------------------------------------------------------------------ void OQueryTableConnectionData::InitFromDrag(const OTableFieldDescRef& rDragLeft, const OTableFieldDescRef& rDragRight) { DBG_CHKTHIS(OQueryTableConnectionData,NULL); @@ -142,16 +130,15 @@ void OQueryTableConnectionData::InitFromDrag(const OTableFieldDescRef& rDragLeft AppendConnLine((OUString)rDragLeft->GetField(),(OUString)rDragRight->GetField()); } -// ----------------------------------------------------------------------------- + OTableConnectionData* OQueryTableConnectionData::NewInstance() const { return new OQueryTableConnectionData(); } -// ----------------------------------------------------------------------------- + sal_Bool OQueryTableConnectionData::Update() { return sal_True; } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx b/dbaccess/source/ui/querydesign/QTableWindow.cxx index 928245ab9c73..43e96642b95f 100644 --- a/dbaccess/source/ui/querydesign/QTableWindow.cxx +++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx @@ -48,11 +48,8 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::container; using namespace ::com::sun::star::beans; using namespace dbaui; -//======================================================================== // class OQueryTableWindow -//======================================================================== DBG_NAME(OQueryTableWindow) -//------------------------------------------------------------------------------ OQueryTableWindow::OQueryTableWindow( Window* pParent, const TTableWindowData::value_type& pTabWinData, sal_Unicode* pszInitialAlias) :OTableWindow( pParent, pTabWinData ) ,m_nAliasNum(0) @@ -71,13 +68,11 @@ OQueryTableWindow::OQueryTableWindow( Window* pParent, const TTableWindowData::v SetHelpId(HID_CTL_QRYDGNTAB); } -//------------------------------------------------------------------------------ OQueryTableWindow::~OQueryTableWindow() { DBG_DTOR(OQueryTableWindow,NULL); } -//------------------------------------------------------------------------------ sal_Bool OQueryTableWindow::Init() { sal_Bool bSuccess = OTableWindow::Init(); @@ -106,7 +101,6 @@ sal_Bool OQueryTableWindow::Init() sAliasName += OUString::number(m_nAliasNum); } - sAliasName = comphelper::string::remove(sAliasName, '"'); SetAliasName(sAliasName); // SetAliasName passes it as WinName, hence it uses the base class @@ -135,7 +129,7 @@ sal_Bool OQueryTableWindow::Init() getTableView()->getDesignView()->getController().InvalidateFeature(ID_BROWSER_QUERY_EXECUTE); return bSuccess; } -// ----------------------------------------------------------------------------- + void* OQueryTableWindow::createUserData(const Reference< XPropertySet>& _xColumn,bool _bPrimaryKey) { OTableFieldInfo* pInfo = new OTableFieldInfo(); @@ -144,13 +138,13 @@ void* OQueryTableWindow::createUserData(const Reference< XPropertySet>& _xColumn pInfo->SetDataType(::comphelper::getINT32(_xColumn->getPropertyValue(PROPERTY_TYPE))); return pInfo; } -// ----------------------------------------------------------------------------- + void OQueryTableWindow::deleteUserData(void*& _pUserData) { delete static_cast<OTableFieldInfo*>(_pUserData); _pUserData = NULL; } -//------------------------------------------------------------------------------ + void OQueryTableWindow::OnEntryDoubleClicked(SvTreeListEntry* pEntry) { OSL_ENSURE(pEntry != NULL, "OQueryTableWindow::OnEntryDoubleClicked : pEntry must not be NULL !"); @@ -173,7 +167,6 @@ void OQueryTableWindow::OnEntryDoubleClicked(SvTreeListEntry* pEntry) static_cast<OQueryTableView*>(getTableView())->InsertField(aInfo); } -//------------------------------------------------------------------------------ sal_Bool OQueryTableWindow::ExistsField(const OUString& strFieldName, OTableFieldDescRef& rInfo) { OSL_ENSURE(m_pListBox != NULL, "OQueryTableWindow::ExistsField : doesn't have ::com::sun::star::form::ListBox !"); @@ -215,17 +208,14 @@ sal_Bool OQueryTableWindow::ExistsField(const OUString& strFieldName, OTableFiel return bExists; } -//------------------------------------------------------------------------------ sal_Bool OQueryTableWindow::ExistsAVisitedConn() const { return static_cast<const OQueryTableView*>(getTableView())->ExistsAVisitedConn(this); } -//------------------------------------------------------------------------------ void OQueryTableWindow::KeyInput( const KeyEvent& rEvt ) { OTableWindow::KeyInput( rEvt ); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QTableWindow.hxx b/dbaccess/source/ui/querydesign/QTableWindow.hxx index 7718355195eb..d97069f08701 100644 --- a/dbaccess/source/ui/querydesign/QTableWindow.hxx +++ b/dbaccess/source/ui/querydesign/QTableWindow.hxx @@ -26,7 +26,6 @@ namespace dbaui { - //================================================================== class OQueryTableWindow : public OTableWindow { sal_Int32 m_nAliasNum; @@ -81,5 +80,4 @@ namespace dbaui } #endif // DBAUI_QUERY_TABLEWINDOW_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QTableWindowData.cxx b/dbaccess/source/ui/querydesign/QTableWindowData.cxx index 582e8ae916f4..238ea80b616f 100644 --- a/dbaccess/source/ui/querydesign/QTableWindowData.cxx +++ b/dbaccess/source/ui/querydesign/QTableWindowData.cxx @@ -20,30 +20,21 @@ #include "QTableWindowData.hxx" #include <tools/debug.hxx> - using namespace dbaui; using namespace ::com::sun::star::io; using namespace ::com::sun::star::uno; DBG_NAME(OQueryTableWindowData) -//================================================================== // class OQueryTableWindowData -//================================================================== -//------------------------------------------------------------------------------ OQueryTableWindowData::OQueryTableWindowData(const OUString& _rComposedName, const OUString& rTableName, const OUString& rTableAlias ) :OTableWindowData(NULL,_rComposedName, rTableName, rTableAlias) { DBG_CTOR(OQueryTableWindowData,NULL); } -//------------------------------------------------------------------------------ OQueryTableWindowData::~OQueryTableWindowData() { DBG_DTOR(OQueryTableWindowData,NULL); } -// ----------------------------------------------------------------------------- - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QueryAddTabConnUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryAddTabConnUndoAction.hxx index 59986c15b085..9977e7ff2d77 100644 --- a/dbaccess/source/ui/querydesign/QueryAddTabConnUndoAction.hxx +++ b/dbaccess/source/ui/querydesign/QueryAddTabConnUndoAction.hxx @@ -23,7 +23,6 @@ namespace dbaui { - // ================================================================================================ // OQueryAddTabConnUndoAction - Undo-Klasse fuer Einfuegen einer Connection class OQueryTableView; @@ -36,7 +35,6 @@ namespace dbaui virtual void Redo(); }; - // ================================================================================================ // OQueryDelTabConnUndoAction - Undo-Klasse fuer Einfuegen einer Connection class OQueryDelTabConnUndoAction : public OQueryTabConnUndoAction @@ -50,5 +48,4 @@ namespace dbaui } #endif // DBAUI_QUERYADDTABCONNUNDOACTION_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx index 3179e6259222..129e5454bd37 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx +++ b/dbaccess/source/ui/querydesign/QueryDesignFieldUndoAct.hxx @@ -23,13 +23,10 @@ #include "dbu_qry.hrc" #include "SelectionBrowseBox.hxx" - namespace dbaui { - // ================================================================================================ // OQueryDesignFieldUndoAct - Basisclass for undo's in the fieldlist of a query design - class OQueryDesignFieldUndoAct : public OCommentUndoAction { protected: @@ -51,7 +48,6 @@ namespace dbaui } }; - // ================================================================================================ // OTabFieldCellModifiedUndoAct - undo class to change a line of the column description class OTabFieldCellModifiedUndoAct : public OQueryDesignFieldUndoAct @@ -72,7 +68,6 @@ namespace dbaui virtual void Redo() { Undo(); } }; - // ================================================================================================ // OTabFieldSizedUndoAct - undo class to change the column width class OTabFieldSizedUndoAct : public OQueryDesignFieldUndoAct @@ -89,7 +84,6 @@ namespace dbaui virtual void Redo() { Undo(); } }; - // ================================================================================================ // OTabFieldUndoAct - base class for undos in the fieldlist of a query design, which are used to change complete field descriptions class OTabFieldUndoAct : public OQueryDesignFieldUndoAct @@ -103,7 +97,6 @@ namespace dbaui void SetTabFieldDescr(OTableFieldDescRef pDescription) { pDescr = pDescription; } }; - // ================================================================================================ // OTabFieldDelUndoAct - undo class to delete a field class OTabFieldDelUndoAct : public OTabFieldUndoAct @@ -116,7 +109,6 @@ namespace dbaui OTabFieldDelUndoAct(OSelectionBrowseBox* pSelBrwBox) : OTabFieldUndoAct(pSelBrwBox, STR_QUERY_UNDO_TABFIELDDELETE) { } }; - // ================================================================================================ // OTabFieldDelUndoAct - Undo-Klasse fuer Anlegen eines Feldes // OTabFieldDelUndoAct - undo class to create a field @@ -130,7 +122,6 @@ namespace dbaui OTabFieldCreateUndoAct(OSelectionBrowseBox* pSelBrwBox) : OTabFieldUndoAct(pSelBrwBox, STR_QUERY_UNDO_TABFIELDCREATE) { } }; - // ================================================================================================ // OTabFieldMovedUndoAct - Undo class when a field was moved inside the selection class OTabFieldMovedUndoAct : public OTabFieldUndoAct @@ -148,6 +139,4 @@ namespace dbaui } #endif // DBAUI_QUERYDESIGNFIELDUNDOACT_HXX - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx index e114f6e0ba6a..911c7c2cee09 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx +++ b/dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx @@ -23,7 +23,6 @@ namespace dbaui { - // ================================================================================================ // OQueryDesignUndoAction - undo base class for actions in graphical query design (without field list) class OJoinTableView; class OQueryDesignUndoAction : public OCommentUndoAction diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 99f24d3d7201..b62564a244e5 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -100,7 +100,6 @@ namespace sal_Bool bHaving, bool _bAddOrOnOneLine); - //------------------------------------------------------------------------------ OUString quoteTableAlias(sal_Bool _bQuote, const OUString& _sAliasName, const OUString& _sQuote) { OUString sRet; @@ -112,7 +111,6 @@ namespace } return sRet; } - //------------------------------------------------------------------------------ OUString getTableRange(const OQueryDesignView* _pView,const ::connectivity::OSQLParseNode* _pTableRef) { Reference< XConnection> xConnection = static_cast<OQueryController&>(_pView->getController()).getConnection(); @@ -125,7 +123,6 @@ namespace } return sTableRange; } - //------------------------------------------------------------------------------ void insertConnection(const OQueryDesignView* _pView,const EJoinType& _eJoinType,OTableFieldDescRef _aDragLeft,OTableFieldDescRef _aDragRight,bool _bNatural = false) { OQueryTableView* pTableView = static_cast<OQueryTableView*>(_pView->getTableView()); @@ -187,7 +184,6 @@ namespace pConn->InvalidateConnection(); } } - //------------------------------------------------------------------------------ OUString ParseCondition( OQueryController& rController ,const ::connectivity::OSQLParseNode* pCondition ,const OUString _sDecimal @@ -209,7 +205,6 @@ namespace } return aCondition; } - //------------------------------------------------------------------------------ SqlParseError FillOuterJoins(OQueryDesignView* _pView, const ::connectivity::OSQLParseNode* pTableRefList) { @@ -239,11 +234,9 @@ namespace return eErrorCode; } - // ----------------------------------------------------------------------------- /** FillDragInfo fills the field description out of the table */ - //------------------------------------------------------------------------------ SqlParseError FillDragInfo( const OQueryDesignView* _pView, const ::connectivity::OSQLParseNode* pColumnRef, OTableFieldDescRef& _rDragInfo) @@ -288,7 +281,6 @@ namespace return eErrorCode; } - //------------------------------------------------------------------------------ OUString BuildJoinCriteria( const Reference< XConnection>& _xConnection, const OConnectionLineDataVec* pLineDataList, const OQueryTableConnectionData* pData) @@ -324,7 +316,6 @@ namespace return aCondition.makeStringAndClear(); } - //------------------------------------------------------------------------------ /** JoinCycle looks for a join cycle and append it to the string @param _xConnection the connection @param _pEntryConn the table connection which holds the data @@ -353,7 +344,6 @@ namespace _pEntryConn->SetVisited(sal_True); } } - //------------------------------------------------------------------------------ OUString BuildTable( const Reference< XConnection>& _xConnection, const OQueryTableWindow* pEntryTab, bool _bForce = false @@ -388,7 +378,6 @@ namespace } return aDBName; } - //------------------------------------------------------------------------------ OUString BuildJoin( const Reference< XConnection>& _xConnection, const OUString& rLh, const OUString& rRh, @@ -428,7 +417,6 @@ namespace return aErg; } - //------------------------------------------------------------------------------ OUString BuildJoin( const Reference< XConnection>& _xConnection, const OQueryTableWindow* pLh, const OQueryTableWindow* pRh, @@ -438,7 +426,6 @@ namespace bool bForce = pData->GetJoinType() == CROSS_JOIN || pData->isNatural(); return BuildJoin(_xConnection,BuildTable(_xConnection,pLh,bForce),BuildTable(_xConnection,pRh,bForce),pData); } - //------------------------------------------------------------------------------ OUString BuildJoin( const Reference< XConnection>& _xConnection, const OUString &rLh, const OQueryTableWindow* pRh, @@ -447,7 +434,6 @@ namespace { return BuildJoin(_xConnection,rLh,BuildTable(_xConnection,pRh),pData); } - //------------------------------------------------------------------------------ OUString BuildJoin( const Reference< XConnection>& _xConnection, const OQueryTableWindow* pLh, const OUString &rRh, @@ -475,9 +461,7 @@ namespace } return BuildJoin(_xConnection, rRh, BuildTable(_xConnection,pLh), &data); } - //------------------------------------------------------------------------------ typedef ::std::map< OUString,sal_Bool,::comphelper::UStringMixLess> tableNames_t; - //------------------------------------------------------------------------------ void addConnectionTableNames( const Reference< XConnection>& _xConnection, const OQueryTableConnection* const pEntryConn, tableNames_t &_rTableNames ) @@ -493,7 +477,6 @@ namespace if(_rTableNames.find(sTabName) == _rTableNames.end()) _rTableNames[sTabName] = sal_True; } - //------------------------------------------------------------------------------ void GetNextJoin( const Reference< XConnection>& _xConnection, OQueryTableConnection* pEntryConn, OQueryTableWindow* pEntryTabTo, @@ -559,7 +542,6 @@ namespace } } } - //------------------------------------------------------------------------------ SqlParseError InsertJoinConnection( const OQueryDesignView* _pView, const ::connectivity::OSQLParseNode *pNode, const EJoinType& _eJoinType, @@ -616,13 +598,11 @@ namespace eErrorCode = eIllegalJoin; return eErrorCode; } - //------------------------------------------------------------------------------ sal_Bool GetInnerJoinCriteria( const OQueryDesignView* _pView, const ::connectivity::OSQLParseNode *pCondition) { return InsertJoinConnection(_pView,pCondition, INNER_JOIN,NULL,NULL) != eOk; } - //------------------------------------------------------------------------------ OUString GenerateSelectList( const OQueryDesignView* _pView, OTableFields& _rFieldList, sal_Bool bAlias) @@ -732,7 +712,6 @@ namespace } return aFieldListStr.makeStringAndClear(); } - //------------------------------------------------------------------------------ sal_Bool GenerateCriterias( OQueryDesignView* _pView, OUStringBuffer& rRetStr, OUStringBuffer& rHavingStr, @@ -785,7 +764,6 @@ namespace } aWork = OUString(); - aWork += quoteTableAlias(bMulti,pEntryField->GetAlias(),aQuote); if ( (pEntryField->GetFunctionType() & (FKT_OTHER|FKT_NUMERIC)) || (aFieldName.toChar() == '*') ) @@ -909,7 +887,6 @@ namespace } return sal_True; } - //------------------------------------------------------------------------------ SqlParseError GenerateOrder( OQueryDesignView* _pView, OTableFields& _rFieldList, sal_Bool bMulti, @@ -1010,7 +987,6 @@ namespace return eErrorCode; } - //------------------------------------------------------------------------------ void GenerateInnerJoinCriterias(const Reference< XConnection>& _xConnection, OUString& _rJoinCrit, const ::std::vector<OTableConnection*>* _pConnList) @@ -1029,7 +1005,6 @@ namespace } } } - //------------------------------------------------------------------------------ void searchAndAppendName(const Reference< XConnection>& _xConnection, const OQueryTableWindow* _pTableWindow, tableNames_t& _rTableNames, @@ -1045,7 +1020,6 @@ namespace _rsTableListStr += OUString(','); } } - //------------------------------------------------------------------------------ OUString GenerateFromClause( const Reference< XConnection>& _xConnection, const OQueryTableView::OTableWindowMap* pTabList, const ::std::vector<OTableConnection*>* pConnList @@ -1162,7 +1136,6 @@ namespace aTableListStr = aTableListStr.replaceAt(aTableListStr.getLength()-1,1, OUString() ); return aTableListStr; } - //------------------------------------------------------------------------------ OUString GenerateGroupBy(const OQueryDesignView* _pView,OTableFields& _rFieldList, sal_Bool bMulti ) { OQueryController& rController = static_cast<OQueryController&>(_pView->getController()); @@ -1236,14 +1209,12 @@ namespace } return aGroupByStr; } - // ----------------------------------------------------------------------------- SqlParseError GetORCriteria(OQueryDesignView* _pView, OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, sal_uInt16& nLevel , sal_Bool bHaving = sal_False, bool bAddOrOnOneLine = false); - // ----------------------------------------------------------------------------- SqlParseError GetSelectionCriteria( OQueryDesignView* _pView, OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode* pNode, @@ -1287,21 +1258,18 @@ namespace } return eErrorCode; } - //------------------------------------------------------------------------------ SqlParseError GetANDCriteria( OQueryDesignView* _pView, OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, sal_uInt16& nLevel, sal_Bool bHaving, bool bAddOrOnOneLine); - //------------------------------------------------------------------------------ SqlParseError ComparisonPredicate(OQueryDesignView* _pView, OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, const sal_uInt16 nLevel, sal_Bool bHaving, bool bAddOrOnOneLine); - //------------------------------------------------------------------------------ SqlParseError GetORCriteria(OQueryDesignView* _pView, OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, @@ -1340,7 +1308,6 @@ namespace return eErrorCode; } - //-------------------------------------------------------------------------------------------------- bool CheckOrCriteria(const ::connectivity::OSQLParseNode* _pCondition,::connectivity::OSQLParseNode* _pFirstColumnRef) { bool bRet = true; @@ -1362,7 +1329,6 @@ namespace } return bRet; } - //-------------------------------------------------------------------------------------------------- SqlParseError GetANDCriteria( OQueryDesignView* _pView, OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, @@ -1526,7 +1492,6 @@ namespace // Pass on the error code return eErrorCode; } - //------------------------------------------------------------------------------ SqlParseError AddFunctionCondition(OQueryDesignView* _pView, OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, @@ -1569,7 +1534,6 @@ namespace if ( aCondition.indexOf('=',0) == 0 ) // ignore the equal sign aCondition = aCondition.copy(1); - if ( SQL_ISRULE(pFunction, general_set_fct ) ) { sal_Int32 nFunctionType = FKT_AGGREGATE; @@ -1620,7 +1584,6 @@ namespace return eErrorCode; } - //------------------------------------------------------------------------------ SqlParseError ComparisonPredicate(OQueryDesignView* _pView, OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, @@ -1733,7 +1696,6 @@ namespace } // else ??? - if( eOk == ( eErrorCode = FillDragInfo(_pView,pCondition->getChild(nPos),aDragLeft))) { if(bHaving) @@ -1783,7 +1745,6 @@ namespace return eErrorCode; } - //------------------------------------------------------------------------------ namespace { OQueryTableWindow* lcl_findColumnInTables( const OUString& _rColumName, const OJoinTableView::OTableWindowMap& _rTabList, OTableFieldDescRef& _rInfo ) @@ -1800,7 +1761,6 @@ namespace } } - //------------------------------------------------------------------------------ void InsertColumnRef(const OQueryDesignView* _pView, const ::connectivity::OSQLParseNode * pColumnRef, OUString& aColumnName, @@ -1844,7 +1804,6 @@ namespace _raInfo->SetFunctionType(FKT_OTHER); } } - //----------------------------------------------------------------------------- sal_Bool checkJoinConditions( const OQueryDesignView* _pView, const ::connectivity::OSQLParseNode* _pNode ) { @@ -1864,7 +1823,6 @@ namespace bRet = sal_False; return bRet; } - //----------------------------------------------------------------------------- sal_Bool InsertJoin(const OQueryDesignView* _pView, const ::connectivity::OSQLParseNode *pNode) { @@ -1947,10 +1905,8 @@ namespace insertConnection(_pView,eJoinType,aDragLeft,aDragRight,bNatural); } - return sal_True; } - //------------------------------------------------------------------------------ void insertUnUsedFields(OQueryDesignView* _pView,OSelectionBrowseBox* _pSelectionBrw) { // now we have to insert the fields which aren't in the statement @@ -1963,7 +1919,6 @@ namespace OTableFields().swap( rUnUsedFields ); } - //------------------------------------------------------------------------------ SqlParseError InitFromParseNodeImpl(OQueryDesignView* _pView,OSelectionBrowseBox* _pSelectionBrw) { SqlParseError eErrorCode = eOk; @@ -1974,7 +1929,6 @@ namespace _pSelectionBrw->SetReadOnly(rController.isReadOnly()); _pSelectionBrw->Fill(); - ::connectivity::OSQLParseTreeIterator& aIterator = rController.getParseIterator(); const ::connectivity::OSQLParseNode* pParseTree = aIterator.getParseTree(); @@ -2141,12 +2095,10 @@ namespace _pSelectionBrw->Invalidate(); return eErrorCode; } - //------------------------------------------------------------------------------ /** fillSelectSubList @return <TRUE/> when columns could be inserted otherwise <FALSE/> */ - //------------------------------------------------------------------------------ SqlParseError fillSelectSubList( OQueryDesignView* _pView, OJoinTableView::OTableWindowMap* _pTabList) { @@ -2167,7 +2119,6 @@ namespace } return eErrorCode; } - //------------------------------------------------------------------------------ SqlParseError InstallFields(OQueryDesignView* _pView, const ::connectivity::OSQLParseNode* pNode, OJoinTableView::OTableWindowMap* pTabList ) @@ -2346,7 +2297,6 @@ namespace return eErrorCode; } - //------------------------------------------------------------------------------ SqlParseError GetOrderCriteria( OQueryDesignView* _pView, OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode* pParseRoot ) @@ -2423,7 +2373,6 @@ namespace } return eErrorCode; } - //------------------------------------------------------------------------------ SqlParseError GetHavingCriteria( OQueryDesignView* _pView, OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode* pSelectRoot, @@ -2434,7 +2383,6 @@ namespace eErrorCode = GetORCriteria(_pView,_pSelectionBrw,pSelectRoot->getChild(3)->getChild(3)->getChild(1),rLevel, sal_True); return eErrorCode; } - //------------------------------------------------------------------------------ SqlParseError GetGroupCriteria( OQueryDesignView* _pView, OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode* pSelectRoot ) @@ -2490,7 +2438,6 @@ namespace return eErrorCode; } - //------------------------------------------------------------------------------ String getParseErrorMessage( SqlParseError _eErrorCode ) { sal_uInt16 nResId; @@ -2540,9 +2487,8 @@ namespace return String( ModuleRes( nResId ) ); } - //------------------------------------------------------------------------------ - //------------------------------------------------------------------------------ } + // end of anonymouse namespace DBG_NAME(OQueryDesignView) @@ -2575,7 +2521,7 @@ OQueryDesignView::OQueryDesignView( OQueryContainerWindow* _pParent, m_aSplitter.Show(); } -// ----------------------------------------------------------------------------- + OQueryDesignView::~OQueryDesignView() { if ( m_pTableView ) @@ -2587,7 +2533,7 @@ OQueryDesignView::~OQueryDesignView() DBG_DTOR(OQueryDesignView,NULL); } -//------------------------------------------------------------------------------ + IMPL_LINK( OQueryDesignView, SplitHdl, void*, /*p*/ ) { if (!getController().isReadOnly()) @@ -2601,14 +2547,14 @@ IMPL_LINK( OQueryDesignView, SplitHdl, void*, /*p*/ ) } return 0L; } -// ------------------------------------------------------------------------- + void OQueryDesignView::Construct() { m_pTableView = new OQueryTableView(m_pScrollWindow,this); ::dbaui::notifySystemWindow(this,m_pTableView,::comphelper::mem_fun(&TaskPaneList::AddWindow)); OQueryView::Construct(); } -// ----------------------------------------------------------------------------- + void OQueryDesignView::initialize() { if(static_cast<OQueryController&>(getController()).getSplitPos() != -1) @@ -2619,7 +2565,7 @@ void OQueryDesignView::initialize() m_pSelectionBox->initialize(); reset(); } -// ------------------------------------------------------------------------- + void OQueryDesignView::resizeDocumentView(Rectangle& _rPlayground) { Point aPlaygroundPos( _rPlayground.TopLeft() ); @@ -2690,28 +2636,28 @@ void OQueryDesignView::resizeDocumentView(Rectangle& _rPlayground) _rPlayground.SetPos( _rPlayground.BottomRight() ); _rPlayground.SetSize( Size( 0, 0 ) ); } -// ----------------------------------------------------------------------------- + void OQueryDesignView::setReadOnly(sal_Bool _bReadOnly) { m_pSelectionBox->SetReadOnly(_bReadOnly); } -// ----------------------------------------------------------------------------- + void OQueryDesignView::clear() { m_pSelectionBox->ClearAll(); // clear the whole selection m_pTableView->ClearAll(); } -// ----------------------------------------------------------------------------- + void OQueryDesignView::setStatement(const OUString& /*_rsStatement*/) { } -// ----------------------------------------------------------------------------- + void OQueryDesignView::copy() { if( m_eChildFocus == SELECTION) m_pSelectionBox->copy(); } -// ----------------------------------------------------------------------------- + sal_Bool OQueryDesignView::isCutAllowed() { sal_Bool bAllowed = sal_False; @@ -2719,7 +2665,7 @@ sal_Bool OQueryDesignView::isCutAllowed() bAllowed = m_pSelectionBox->isCutAllowed(); return bAllowed; } -// ----------------------------------------------------------------------------- + sal_Bool OQueryDesignView::isPasteAllowed() { sal_Bool bAllowed = sal_False; @@ -2727,7 +2673,7 @@ sal_Bool OQueryDesignView::isPasteAllowed() bAllowed = m_pSelectionBox->isPasteAllowed(); return bAllowed; } -// ----------------------------------------------------------------------------- + sal_Bool OQueryDesignView::isCopyAllowed() { sal_Bool bAllowed = sal_False; @@ -2735,17 +2681,17 @@ sal_Bool OQueryDesignView::isCopyAllowed() bAllowed = m_pSelectionBox->isCopyAllowed(); return bAllowed; } -// ----------------------------------------------------------------------------- + void OQueryDesignView::stopTimer() { m_pSelectionBox->stopTimer(); } -// ----------------------------------------------------------------------------- + void OQueryDesignView::startTimer() { m_pSelectionBox->startTimer(); } -// ----------------------------------------------------------------------------- + void OQueryDesignView::cut() { if( m_eChildFocus == SELECTION) @@ -2754,7 +2700,7 @@ void OQueryDesignView::cut() static_cast<OQueryController&>(getController()).setModified(sal_True); } } -// ----------------------------------------------------------------------------- + void OQueryDesignView::paste() { if( m_eChildFocus == SELECTION) @@ -2763,29 +2709,29 @@ void OQueryDesignView::paste() static_cast<OQueryController&>(getController()).setModified(sal_True); } } -// ----------------------------------------------------------------------------- + void OQueryDesignView::TableDeleted(const OUString& rAliasName) { // message that the table was removed from the window DeleteFields(rAliasName); static_cast<OQueryController&>(getController()).InvalidateFeature(ID_BROWSER_ADDTABLE); // inform the view again } -//------------------------------------------------------------------------------ + void OQueryDesignView::DeleteFields( const OUString& rAliasName ) { m_pSelectionBox->DeleteFields( rAliasName ); } -// ----------------------------------------------------------------------------- + bool OQueryDesignView::HasFieldByAliasName(const OUString& rFieldName, OTableFieldDescRef& rInfo) const { return m_pSelectionBox->HasFieldByAliasName( rFieldName, rInfo); } -// ----------------------------------------------------------------------------- + SqlParseError OQueryDesignView::InsertField( const OTableFieldDescRef& rInfo, sal_Bool bVis, sal_Bool bActivate) { return m_pSelectionBox->InsertField( rInfo, BROWSER_INVALIDID,bVis, bActivate ).is() ? eOk : eTooManyColumns; } -// ----------------------------------------------------------------------------- + sal_Int32 OQueryDesignView::getColWidth(sal_uInt16 _nColPos) const { static sal_Int32 s_nDefaultWidth = GetTextWidth(String(RTL_CONSTASCII_USTRINGPARAM("0"))) * 15; @@ -2794,7 +2740,7 @@ sal_Int32 OQueryDesignView::getColWidth(sal_uInt16 _nColPos) const nWidth = s_nDefaultWidth; return nWidth; } -//------------------------------------------------------------------------------ + void OQueryDesignView::fillValidFields(const OUString& sAliasName, ComboBox* pFieldList) { OSL_ENSURE(pFieldList != NULL, "OQueryDesignView::FillValidFields : What the hell do you think I can do with a NULL-ptr ? This will crash !"); @@ -2834,7 +2780,7 @@ void OQueryDesignView::fillValidFields(const OUString& sAliasName, ComboBox* pFi } } } -// ----------------------------------------------------------------------------- + long OQueryDesignView::PreNotify(NotifyEvent& rNEvt) { switch (rNEvt.GetType()) @@ -2856,10 +2802,7 @@ long OQueryDesignView::PreNotify(NotifyEvent& rNEvt) return OQueryView::PreNotify(rNEvt); } -//------------------------------------------------------------------------------ - -// ----------------------------------------------------------------------------- // check if the statement is correct when not returning false sal_Bool OQueryDesignView::checkStatement() { @@ -2868,7 +2811,7 @@ sal_Bool OQueryDesignView::checkStatement() bRet = m_pSelectionBox->Save(); // an error occurred so we return no return bRet; } -//------------------------------------------------------------------------------- + OUString OQueryDesignView::getStatement() { OQueryController& rController = static_cast<OQueryController&>(getController()); @@ -2922,6 +2865,7 @@ OUString OQueryDesignView::getStatement() // a table is deleted, also the belonging fields will be deleted -> therefore it CANNOT occur that fields // exist but no tables exist (and aFieldListStr has its length, I secure this above) OUStringBuffer aHavingStr,aCriteriaListStr; + // ----------------- Kriterien aufbauen ---------------------- if (!GenerateCriterias(this,aCriteriaListStr,aHavingStr,rFieldList, nTabcount > 1)) return OUString(); @@ -2953,7 +2897,6 @@ OUString OQueryDesignView::getStatement() aSqlCmd.append(OUString(" WHERE ")); aSqlCmd.append(aCriteriaListStr.makeStringAndClear()); } - // ----------------- construct GroupBy and attachen ------------ Reference<XDatabaseMetaData> xMeta; if ( xConnection.is() ) xMeta = xConnection->getMetaData(); @@ -2962,7 +2905,7 @@ OUString OQueryDesignView::getStatement() bUseAlias = bUseAlias || !xMeta->supportsGroupByUnrelated(); aSqlCmd.append(GenerateGroupBy(this,rFieldList,bUseAlias)); - // ----------------- attache having ------------ + // ----------------- construct GroupBy and attachen ------------ if(!aHavingStr.isEmpty()) { aSqlCmd.append(OUString(" HAVING ")); @@ -3015,8 +2958,7 @@ OUString OQueryDesignView::getStatement() } return sSQL; } -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- + void OQueryDesignView::setSlotEnabled(sal_Int32 _nSlotId,sal_Bool _bEnable) { sal_uInt16 nRow; @@ -3039,7 +2981,7 @@ void OQueryDesignView::setSlotEnabled(sal_Int32 _nSlotId,sal_Bool _bEnable) m_pSelectionBox->SetRowVisible(nRow,_bEnable); m_pSelectionBox->Invalidate(); } -// ----------------------------------------------------------------------------- + sal_Bool OQueryDesignView::isSlotEnabled(sal_Int32 _nSlotId) { sal_uInt16 nRow; @@ -3061,7 +3003,7 @@ sal_Bool OQueryDesignView::isSlotEnabled(sal_Int32 _nSlotId) } return m_pSelectionBox->IsRowVisible(nRow); } -// ----------------------------------------------------------------------------- + void OQueryDesignView::SaveUIConfig() { OQueryController& rCtrl = static_cast<OQueryController&>(getController()); @@ -3070,7 +3012,7 @@ void OQueryDesignView::SaveUIConfig() if ( m_aSplitter.GetSplitPosPixel() != 0 ) rCtrl.setSplitPos( m_aSplitter.GetSplitPosPixel() ); } -// ----------------------------------------------------------------------------- + OSQLParseNode* OQueryDesignView::getPredicateTreeFromEntry(OTableFieldDescRef pEntry, const OUString& _sCriteria, OUString& _rsErrorMessage, @@ -3163,7 +3105,7 @@ OSQLParseNode* OQueryDesignView::getPredicateTreeFromEntry(OTableFieldDescRef pE _rxColumn); return pParseNode; } -// ----------------------------------------------------------------------------- + void OQueryDesignView::GetFocus() { OQueryView::GetFocus(); @@ -3175,19 +3117,18 @@ void OQueryDesignView::GetFocus() m_pSelectionBox->GrabFocus(); } } -// ----------------------------------------------------------------------------- + void OQueryDesignView::reset() { m_pTableView->ClearAll(); m_pTableView->ReSync(); } -// ----------------------------------------------------------------------------- + void OQueryDesignView::setNoneVisbleRow(sal_Int32 _nRows) { m_pSelectionBox->SetNoneVisbleRow(_nRows); } -// ----------------------------------------------------------------------------- void OQueryDesignView::initByFieldDescriptions( const Sequence< PropertyValue >& i_rFieldDescriptions ) { OQueryController& rController = static_cast< OQueryController& >( getController() ); @@ -3210,7 +3151,6 @@ void OQueryDesignView::initByFieldDescriptions( const Sequence< PropertyValue >& m_pSelectionBox->Invalidate(); } -// ----------------------------------------------------------------------------- bool OQueryDesignView::initByParseIterator( ::dbtools::SQLExceptionInfo* _pErrorInfo ) { SqlParseError eErrorCode = eNativeMode; @@ -3297,7 +3237,6 @@ namespace { } } -//------------------------------------------------------------------------------ // Try to guess the type of an expression in simple cases. // Originally meant to be called only on a function call (hence the misnomer), // but now tries to do the best it can also in other cases. @@ -3624,6 +3563,5 @@ void OQueryDesignView::fillFunctionInfo( const ::connectivity::OSQLParseNode* p aInfo->SetField(sFunctionTerm); aInfo->SetTabWindow(NULL); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx index e1063449794e..7b0eaed7aff9 100644 --- a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx +++ b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.cxx @@ -17,12 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "QueryMoveTabWinUndoAct.hxx" #include "JoinTableView.hxx" #include "QTableWindow.hxx" using namespace dbaui; -//------------------------------------------------------------------------------ void OJoinMoveTabWinUndoAct::TogglePosition() { Point ptFrameScrollPos(m_pOwner->GetHScrollBar()->GetThumbPos(), m_pOwner->GetVScrollBar()->GetThumbPos()); @@ -38,5 +36,4 @@ void OJoinMoveTabWinUndoAct::TogglePosition() m_ptNextPosition = ptNext; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx index 4a9e609f65d0..15bbc2ae27bc 100644 --- a/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx +++ b/dbaccess/source/ui/querydesign/QueryMoveTabWinUndoAct.hxx @@ -26,7 +26,6 @@ namespace dbaui { - // ================================================================================================ // OQueryMoveTabWinUndoAct - Undo-Klasse fuer Verschieben eines TabWins class OTableWindow; class OJoinMoveTabWinUndoAct : public OQueryDesignUndoAction @@ -44,7 +43,6 @@ namespace dbaui virtual void Redo() { TogglePosition(); } }; - // ------------------------------------------------------------------------------------------------ inline OJoinMoveTabWinUndoAct::OJoinMoveTabWinUndoAct(OJoinTableView* pOwner, const Point& ptOriginalPosition, OTableWindow* pTabWin) :OQueryDesignUndoAction(pOwner, STR_QUERY_UNDO_MOVETABWIN) ,m_ptNextPosition(ptOriginalPosition) @@ -54,5 +52,4 @@ namespace dbaui } #endif // DBAUI_OQUERYMOVETABWINUNDOACT_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx index e21ebf02716a..c6ada503e71a 100644 --- a/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx +++ b/dbaccess/source/ui/querydesign/QuerySizeTabWinUndoAct.hxx @@ -25,7 +25,6 @@ namespace dbaui { - // ================================================================================================ // OQuerySizeTabWinUndoAct - undo class to change size of TabWins class OTableWindow; class OJoinSizeTabWinUndoAct : public OQueryDesignUndoAction @@ -47,7 +46,6 @@ namespace dbaui virtual void Redo() { ToggleSizePosition(); } }; - //------------------------------------------------------------------------------ inline OJoinSizeTabWinUndoAct::OJoinSizeTabWinUndoAct(OJoinTableView* pOwner, const Point& ptOriginalPos, const Size& szOriginalSize, OTableWindow* pTabWin) :OQueryDesignUndoAction(pOwner, STR_QUERY_UNDO_SIZETABWIN) ,m_ptNextPosition(ptOriginalPos) @@ -56,7 +54,6 @@ namespace dbaui { } - //------------------------------------------------------------------------------ inline void OJoinSizeTabWinUndoAct::ToggleSizePosition() { Point ptNext = m_pTabWin->GetPosPixel(); @@ -73,5 +70,4 @@ namespace dbaui #endif //DBAUI_QUERYSIZETABWINUNDOACT_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx index d09f60dd4400..0ad9239d1899 100644 --- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx +++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx @@ -28,7 +28,6 @@ using namespace dbaui; DBG_NAME(OQueryTabConnUndoAction) -// ------------------------------------------------------------------------------------------------ OQueryTabConnUndoAction::~OQueryTabConnUndoAction() { DBG_DTOR(OQueryTabConnUndoAction,NULL); @@ -39,7 +38,6 @@ OQueryTabConnUndoAction::~OQueryTabConnUndoAction() } } -// ------------------------------------------------------------------------------------------------ OQueryTabConnUndoAction::OQueryTabConnUndoAction(OQueryTableView* pOwner, sal_uInt16 nCommentID) :OQueryDesignUndoAction(pOwner, nCommentID) ,m_pConnection(NULL) @@ -47,82 +45,81 @@ OQueryTabConnUndoAction::OQueryTabConnUndoAction(OQueryTableView* pOwner, sal_uI { DBG_CTOR(OQueryTabConnUndoAction,NULL); } -// ----------------------------------------------------------------------------- + OQueryAddTabConnUndoAction::OQueryAddTabConnUndoAction(OQueryTableView* pOwner) : OQueryTabConnUndoAction(pOwner, STR_QUERY_UNDO_INSERTCONNECTION) { } -// ----------------------------------------------------------------------------- + void OQueryAddTabConnUndoAction::Undo() { static_cast<OQueryTableView*>(m_pOwner)->DropConnection(m_pConnection); SetOwnership(sal_True); } -// ----------------------------------------------------------------------------- + void OQueryAddTabConnUndoAction::Redo() { static_cast<OQueryTableView*>(m_pOwner)->GetConnection(m_pConnection); SetOwnership(sal_False); } -// ----------------------------------------------------------------------------- + OQueryDelTabConnUndoAction::OQueryDelTabConnUndoAction(OQueryTableView* pOwner) : OQueryTabConnUndoAction(pOwner, STR_QUERY_UNDO_REMOVECONNECTION) { } -// ----------------------------------------------------------------------------- + void OQueryDelTabConnUndoAction::Undo() { static_cast<OQueryTableView*>(m_pOwner)->GetConnection(m_pConnection); SetOwnership(sal_False); } -// ----------------------------------------------------------------------------- + void OQueryDelTabConnUndoAction::Redo() { static_cast<OQueryTableView*>(m_pOwner)->DropConnection(m_pConnection); SetOwnership(sal_True); } -// ----------------------------------------------------------------------------- + OQueryTabWinShowUndoAct::OQueryTabWinShowUndoAct(OQueryTableView* pOwner) : OQueryTabWinUndoAct(pOwner, STR_QUERY_UNDO_TABWINSHOW) { } -// ----------------------------------------------------------------------------- + OQueryTabWinShowUndoAct::~OQueryTabWinShowUndoAct() { } -// ----------------------------------------------------------------------------- + void OQueryTabWinShowUndoAct::Undo() { static_cast<OQueryTableView*>(m_pOwner)->HideTabWin(m_pTabWin, this); SetOwnership(sal_True); } -// ----------------------------------------------------------------------------- + void OQueryTabWinShowUndoAct::Redo() { static_cast<OQueryTableView*>(m_pOwner)->ShowTabWin(m_pTabWin, this,sal_True); SetOwnership(sal_False); } -// ----------------------------------------------------------------------------- + OQueryTabWinDelUndoAct::OQueryTabWinDelUndoAct(OQueryTableView* pOwner) : OQueryTabWinUndoAct(pOwner, STR_QUERY_UNDO_TABWINDELETE) { } -// ----------------------------------------------------------------------------- + OQueryTabWinDelUndoAct::~OQueryTabWinDelUndoAct() { } -// ----------------------------------------------------------------------------- + void OQueryTabWinDelUndoAct::Undo() { static_cast<OQueryTableView*>(m_pOwner)->ShowTabWin( m_pTabWin, this,sal_True ); SetOwnership(sal_False); } -// ----------------------------------------------------------------------------- + void OQueryTabWinDelUndoAct::Redo() { static_cast<OQueryTableView*>(m_pOwner)->HideTabWin( m_pTabWin, this ); SetOwnership(sal_True); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.hxx index 8bf401416e7f..57a6777e96b8 100644 --- a/dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.hxx +++ b/dbaccess/source/ui/querydesign/QueryTabWinShowUndoAct.hxx @@ -24,7 +24,6 @@ namespace dbaui { - // ================================================================================================ // OQueryTabWinShowUndoAct - undo class to show a TabWins class OQueryTabWinShowUndoAct : public OQueryTabWinUndoAct @@ -37,7 +36,6 @@ namespace dbaui virtual void Redo(); }; - // ================================================================================================ // OQueryTabWinDelUndoAct - undo class to delete a TabWins class OQueryTabWinDelUndoAct : public OQueryTabWinUndoAct @@ -52,6 +50,4 @@ namespace dbaui } #endif // DBAUI_QUERYTABWINSHOWUNDOACT_HXX - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx index 2e3e995b7132..85b895c32fa8 100644 --- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx +++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx @@ -26,7 +26,6 @@ #include "QueryDesignFieldUndoAct.hxx" #include "QueryTableView.hxx" - using namespace dbaui; DBG_NAME(OQueryDesignFieldUndoAct) OQueryDesignFieldUndoAct::OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwBox, sal_uInt16 nCommentID) @@ -36,23 +35,21 @@ OQueryDesignFieldUndoAct::OQueryDesignFieldUndoAct(OSelectionBrowseBox* pSelBrwB { DBG_CTOR(OQueryDesignFieldUndoAct,NULL); } -// ----------------------------------------------------------------------------- + OQueryDesignFieldUndoAct::~OQueryDesignFieldUndoAct() { DBG_DTOR(OQueryDesignFieldUndoAct,NULL); pOwner = NULL; } -// ----------------------------------------------------------------------------- DBG_NAME(OQueryTabWinUndoAct ) -// ------------------------------------------------------------------------------------------------ OQueryTabWinUndoAct::OQueryTabWinUndoAct(OQueryTableView* pOwner, sal_uInt16 nCommentID) :OQueryDesignUndoAction(pOwner, nCommentID) ,m_pTabWin(NULL) { DBG_CTOR(OQueryTabWinUndoAct ,NULL); } -//============================================================================== + OQueryTabWinUndoAct::~OQueryTabWinUndoAct() { DBG_DTOR(OQueryTabWinUndoAct ,NULL); @@ -77,7 +74,7 @@ OQueryTabWinUndoAct::~OQueryTabWinUndoAct() m_vTableConnection.clear(); } } -//------------------------------------------------------------------------------ + void OTabFieldCellModifiedUndoAct::Undo() { pOwner->EnterUndoMode(); @@ -93,7 +90,6 @@ void OTabFieldCellModifiedUndoAct::Undo() pOwner->LeaveUndoMode(); } -//------------------------------------------------------------------------------ void OTabFieldSizedUndoAct::Undo() { pOwner->EnterUndoMode(); @@ -107,7 +103,7 @@ void OTabFieldSizedUndoAct::Undo() } pOwner->LeaveUndoMode(); } -// ----------------------------------------------------------------------------- + void OTabFieldMovedUndoAct::Undo() { pOwner->EnterUndoMode(); @@ -122,6 +118,5 @@ void OTabFieldMovedUndoAct::Undo() } pOwner->LeaveUndoMode(); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx index af839edaebb9..7ea2f86064d3 100644 --- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx +++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx @@ -25,7 +25,6 @@ namespace dbaui { - // ================================================================================================ // OQueryTabWinUndoAct - undo base class for all which is concerned with insert/remove TabWins class OQueryTableWindow; @@ -45,7 +44,6 @@ namespace dbaui void SetOwnership(sal_Bool bTakeIt) { m_bOwnerOfObjects = bTakeIt; } - virtual void Undo() = 0; virtual void Redo() = 0; @@ -65,10 +63,7 @@ namespace dbaui } }; - } #endif // DBAUI_QUERYTABWINUNDOACT_HXX - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index 2a57381338f8..ecb8c10236ae 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "QueryTableView.hxx" #include "TableFieldInfo.hxx" #include "TableFieldDescription.hxx" @@ -59,10 +58,8 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::accessibility; -//------------------------------------------------------------------------------ namespace { - // ----------------------------------------------------------------------------- sal_Bool isColumnInKeyType(const Reference<XIndexAccess>& _rxKeys,const OUString& _rColumnName,sal_Int32 _nKeyType) { sal_Bool bReturn = sal_False; @@ -96,14 +93,12 @@ namespace } return bReturn; } - // ----------------------------------------------------------------------------- /** appends a new TabAdd Undo action at controller @param _pView the view which we use @param _pUndoAction the undo action which should be added @param _pConnection the connection for which the undo action should be appended @param _bOwner is the undo action the owner */ - // ----------------------------------------------------------------------------- void addUndoAction( OQueryTableView* _pView, OQueryTabConnUndoAction* _pUndoAction, OQueryTableConnection* _pConnection, @@ -113,7 +108,6 @@ namespace _pUndoAction->SetConnection(_pConnection); _pView->getDesignView()->getController().addUndoActionAndInvalidate(_pUndoAction); } - // ----------------------------------------------------------------------------- /** openJoinDialog opens the join dialog with this connection data @param _pView the view which we use @param _pConnectionData the connection data @@ -134,7 +128,6 @@ namespace return bOk; } - // ----------------------------------------------------------------------------- /** connectionModified adds an undo action for the modified connection and forces an redraw @param _pView the view which we use @param _pConnection the connection which was modified @@ -159,7 +152,6 @@ namespace _pView->Invalidate(INVALIDATE_NOCHILDREN); } - // ----------------------------------------------------------------------------- void addConnections(OQueryTableView* _pView, const OQueryTableWindow& _rSource, const OQueryTableWindow& _rDest, @@ -228,11 +220,9 @@ namespace } } } -//================================================================== + // class OQueryTableView -//================================================================== DBG_NAME(OQueryTableView) -//------------------------------------------------------------------------ OQueryTableView::OQueryTableView( Window* pParent,OQueryDesignView* pView) : OJoinTableView( pParent,pView) { @@ -240,13 +230,11 @@ OQueryTableView::OQueryTableView( Window* pParent,OQueryDesignView* pView) SetHelpId(HID_CTL_QRYDGNTAB); } -//------------------------------------------------------------------------ OQueryTableView::~OQueryTableView() { DBG_DTOR(OQueryTableView,NULL); } -//------------------------------------------------------------------------ sal_Int32 OQueryTableView::CountTableAlias(const String& rName, sal_Int32& rMax) { DBG_CHKTHIS(OQueryTableView,NULL); @@ -263,7 +251,7 @@ sal_Int32 OQueryTableView::CountTableAlias(const String& rName, sal_Int32& rMax) return nRet; } -//------------------------------------------------------------------------ + void OQueryTableView::ReSync() { DBG_CHKTHIS(OQueryTableView,NULL); @@ -271,7 +259,6 @@ void OQueryTableView::ReSync() OSL_ENSURE((getTableConnections()->size()==0) && (GetTabWinMap()->size()==0), "before calling OQueryTableView::ReSync() please call ClearAll !"); - // I need a collection of all window names that cannot be created so that I do not initialize connections for them. ::std::vector<String> arrInvalidTables; @@ -332,7 +319,6 @@ void OQueryTableView::ReSync() } } -//------------------------------------------------------------------------ void OQueryTableView::ClearAll() { DBG_CHKTHIS(OQueryTableView,NULL); @@ -342,13 +328,11 @@ void OQueryTableView::ClearAll() m_pView->getController().setModified(sal_True); } -// ----------------------------------------------------------------------------- OTableWindow* OQueryTableView::createWindow(const TTableWindowData::value_type& _pData) { return new OQueryTableWindow(this,_pData); } -//------------------------------------------------------------------------------ void OQueryTableView::NotifyTabConnection(const OQueryTableConnection& rNewConn, sal_Bool _bCreateUndoAction) { DBG_CHKTHIS(OQueryTableView,NULL); @@ -388,14 +372,14 @@ void OQueryTableView::NotifyTabConnection(const OQueryTableConnection& rNewConn, connectionModified(this,pNewConn,_bCreateUndoAction); } } -// ----------------------------------------------------------------------------- + OTableWindowData* OQueryTableView::CreateImpl(const OUString& _rComposedName ,const OUString& _sTableName ,const OUString& _rWinName) { return new OQueryTableWindowData( _rComposedName, _sTableName,_rWinName ); } -//------------------------------------------------------------------------------ + void OQueryTableView::AddTabWin(const OUString& _rTableName, const OUString& _rAliasName, sal_Bool bNewTable) { DBG_CHKTHIS(OQueryTableView,NULL); @@ -429,7 +413,7 @@ void OQueryTableView::AddTabWin(const OUString& _rTableName, const OUString& _rA OSL_FAIL("qualifiedNameComponents"); } } -// ----------------------------------------------------------------------------- + // find the table which has a foreign key with this referencedTable name Reference<XPropertySet> getKeyReferencedTo(const Reference<XIndexAccess>& _rxKeys,const OUString& _rReferencedTable) { @@ -459,7 +443,7 @@ Reference<XPropertySet> getKeyReferencedTo(const Reference<XIndexAccess>& _rxKey } return Reference<XPropertySet>(); } -//------------------------------------------------------------------------------ + void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString& _rTableName, const OUString& strAlias, sal_Bool bNewTable) { DBG_CHKTHIS(OQueryTableView,NULL); @@ -521,7 +505,6 @@ void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString& try { - ////////////////////////////////////////////////////////////////////// // find relations between the table an the tables already inserted Reference< XIndexAccess> xKeyIndex = pNewTabWin->GetData()->getKeys(); if ( !xKeyIndex.is() ) @@ -611,8 +594,7 @@ void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString& m_lnkTabWinsChangeHandler.Call(&aHint); } } -// ----------------------------------------------------------------------------- -// ----------------------------------------------------------------------------- + void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJoinExchangeData& jxdDest) { DBG_CHKTHIS(OQueryTableView,NULL); @@ -672,7 +654,7 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ connectionModified(this,pConn,sal_False); } } -// ----------------------------------------------------------------------------- + void OQueryTableView::ConnDoubleClicked(OTableConnection* pConnection) { DBG_CHKTHIS(OQueryTableView,NULL); @@ -682,7 +664,7 @@ void OQueryTableView::ConnDoubleClicked(OTableConnection* pConnection) SelectConn( pConnection ); } } -// ----------------------------------------------------------------------------- + void OQueryTableView::createNewConnection() { TTableConnectionData::value_type pData(new OQueryTableConnectionData()); @@ -711,7 +693,7 @@ void OQueryTableView::createNewConnection() SelectConn( pConn ); } } -//------------------------------------------------------------------------------ + bool OQueryTableView::RemoveConnection( OTableConnection* _pConnection,sal_Bool /*_bDelete*/ ) { DBG_CHKTHIS(OQueryTableView,NULL); @@ -727,14 +709,12 @@ bool OQueryTableView::RemoveConnection( OTableConnection* _pConnection,sal_Bool return bRet; } -//------------------------------------------------------------------------------ void OQueryTableView::KeyInput( const KeyEvent& rEvt ) { DBG_CHKTHIS(OQueryTableView,NULL); OJoinTableView::KeyInput( rEvt ); } -//------------------------------------------------------------------------------ OQueryTableWindow* OQueryTableView::FindTable(const String& rAliasName) { DBG_CHKTHIS(OQueryTableView,NULL); @@ -746,7 +726,6 @@ OQueryTableWindow* OQueryTableView::FindTable(const String& rAliasName) return NULL; } -//------------------------------------------------------------------------------ sal_Bool OQueryTableView::FindTableFromField(const String& rFieldName, OTableFieldDescRef& rInfo, sal_uInt16& rCnt) { DBG_CHKTHIS(OQueryTableView,NULL); @@ -762,7 +741,6 @@ sal_Bool OQueryTableView::FindTableFromField(const String& rFieldName, OTableFie return rCnt == 1; } -//------------------------------------------------------------------------------ bool OQueryTableView::ContainsTabWin(const OTableWindow& rTabWin) { OTableWindowMap* pTabWins = GetTabWinMap(); @@ -782,7 +760,6 @@ bool OQueryTableView::ContainsTabWin(const OTableWindow& rTabWin) return false; } -//------------------------------------------------------------------------------ void OQueryTableView::RemoveTabWin(OTableWindow* pTabWin) { DBG_CHKTHIS(OQueryTableView,NULL); @@ -824,7 +801,6 @@ void OQueryTableView::RemoveTabWin(OTableWindow* pTabWin) } } -//------------------------------------------------------------------------ void OQueryTableView::EnsureVisible(const OTableWindow* pWin) { DBG_CHKTHIS(OQueryTableView,NULL); @@ -833,7 +809,6 @@ void OQueryTableView::EnsureVisible(const OTableWindow* pWin) OJoinTableView::EnsureVisible(pWin); } -//------------------------------------------------------------------------ void OQueryTableView::GetConnection(OQueryTableConnection* pConn) { DBG_CHKTHIS(OQueryTableView,NULL); @@ -842,7 +817,6 @@ void OQueryTableView::GetConnection(OQueryTableConnection* pConn) addConnection( pConn ); } -//------------------------------------------------------------------------ void OQueryTableView::DropConnection(OQueryTableConnection* pConn) { DBG_CHKTHIS(OQueryTableView,NULL); @@ -851,7 +825,6 @@ void OQueryTableView::DropConnection(OQueryTableConnection* pConn) RemoveConnection( pConn ,sal_False); } -//------------------------------------------------------------------------ void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction ) { DBG_CHKTHIS(OQueryTableView,NULL); @@ -925,7 +898,6 @@ void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc } } -//------------------------------------------------------------------------ sal_Bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction,sal_Bool _bAppend ) { DBG_CHKTHIS(OQueryTableView,NULL); @@ -999,14 +971,14 @@ sal_Bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUn return bSuccess; } -//------------------------------------------------------------------------ + void OQueryTableView::InsertField(const OTableFieldDescRef& rInfo) { DBG_CHKTHIS(OQueryTableView,NULL); OSL_ENSURE(getDesignView() != NULL, "OQueryTableView::InsertField : has no Parent !"); static_cast<OQueryDesignView*>(getDesignView())->InsertField(rInfo); } -//------------------------------------------------------------------------------ + sal_Bool OQueryTableView::ExistsAVisitedConn(const OQueryTableWindow* pFrom) const { DBG_CHKTHIS(OQueryTableView,NULL); @@ -1026,18 +998,17 @@ sal_Bool OQueryTableView::ExistsAVisitedConn(const OQueryTableWindow* pFrom) con return sal_False; } -// ----------------------------------------------------------------------------- + void OQueryTableView::onNoColumns_throw() { String sError( ModuleRes( STR_STATEMENT_WITHOUT_RESULT_SET ) ); ::dbtools::throwSQLException( sError, ::dbtools::SQL_GENERAL_ERROR, NULL ); } -//------------------------------------------------------------------------------ + bool OQueryTableView::supressCrossNaturalJoin(const TTableConnectionData::value_type& _pData) const { OQueryTableConnectionData* pQueryData = static_cast<OQueryTableConnectionData*>(_pData.get()); return pQueryData && (pQueryData->GetJoinType() == CROSS_JOIN); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QueryTextView.cxx b/dbaccess/source/ui/querydesign/QueryTextView.cxx index 4a0b2ae0df59..4bf48814ec49 100644 --- a/dbaccess/source/ui/querydesign/QueryTextView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTextView.cxx @@ -36,10 +36,8 @@ using namespace dbaui; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::frame; -// ----------------------------------------------------------------------------- // end of temp classes -// ------------------------------------------------------------------------- DBG_NAME(OQueryTextView) OQueryTextView::OQueryTextView(OQueryContainerWindow* _pParent) :Window(_pParent) @@ -52,42 +50,42 @@ OQueryTextView::OQueryTextView(OQueryContainerWindow* _pParent) m_pEdit->SetPosPixel( Point( 0, 0 ) ); m_pEdit->Show(); } -// ----------------------------------------------------------------------------- + OQueryTextView::~OQueryTextView() { DBG_DTOR(OQueryTextView,NULL); ::std::auto_ptr<Window> aTemp(m_pEdit); m_pEdit = NULL; } -// ----------------------------------------------------------------------------- + void OQueryTextView::GetFocus() { if ( m_pEdit ) m_pEdit->GrabFocus(); } -// ------------------------------------------------------------------------- + void OQueryTextView::Resize() { Window::Resize(); m_pEdit->SetSizePixel( GetOutputSizePixel() ); } -// ----------------------------------------------------------------------------- + // check if the statement is correct when not returning false sal_Bool OQueryTextView::checkStatement() { return sal_True; } -// ----------------------------------------------------------------------------- + OUString OQueryTextView::getStatement() { return m_pEdit->GetText(); } -// ----------------------------------------------------------------------------- + void OQueryTextView::setReadOnly(sal_Bool _bReadOnly) { m_pEdit->SetReadOnly(_bReadOnly); } -// ----------------------------------------------------------------------------- + void OQueryTextView::clear() { OSqlEditUndoAct* pUndoAct = new OSqlEditUndoAct( m_pEdit ); @@ -97,46 +95,45 @@ void OQueryTextView::clear() m_pEdit->SetText(String()); } -// ----------------------------------------------------------------------------- + void OQueryTextView::setStatement(const OUString& _rsStatement) { m_pEdit->SetText(_rsStatement); } -// ----------------------------------------------------------------------------- + void OQueryTextView::copy() { if(!m_pEdit->IsInAccelAct() ) m_pEdit->Copy(); } -// ----------------------------------------------------------------------------- + sal_Bool OQueryTextView::isCutAllowed() { return !m_pEdit->GetSelected().isEmpty(); } -// ----------------------------------------------------------------------------- + sal_Bool OQueryTextView::isPasteAllowed() { return sal_True; } -// ----------------------------------------------------------------------------- + sal_Bool OQueryTextView::isCopyAllowed() { return sal_True; } -// ----------------------------------------------------------------------------- + void OQueryTextView::cut() { if(!m_pEdit->IsInAccelAct() ) m_pEdit->Cut(); getContainerWindow()->getDesignView()->getController().setModified(sal_True); } -// ----------------------------------------------------------------------------- + void OQueryTextView::paste() { if(!m_pEdit->IsInAccelAct() ) m_pEdit->Paste(); getContainerWindow()->getDesignView()->getController().setModified(sal_True); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx index 2f940cf326f6..bf470cdbbad5 100644 --- a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx +++ b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx @@ -40,7 +40,7 @@ OQueryViewSwitch::OQueryViewSwitch(OQueryContainerWindow* _pParent, OQueryContro m_pTextView = new OQueryTextView(_pParent); m_pDesignView = new OQueryDesignView( _pParent, _rController, _rxContext ); } -// ----------------------------------------------------------------------------- + OQueryViewSwitch::~OQueryViewSwitch() { DBG_DTOR(OQueryViewSwitch,NULL); @@ -57,19 +57,19 @@ OQueryViewSwitch::~OQueryViewSwitch() m_pDesignView = NULL; } } -// ------------------------------------------------------------------------- + void OQueryViewSwitch::Construct() { m_pDesignView->Construct( ); } -// ----------------------------------------------------------------------------- + void OQueryViewSwitch::initialize() { // initially be in SQL mode m_pTextView->Show(); m_pDesignView->initialize(); } -// ------------------------------------------------------------------------- + void OQueryViewSwitch::resizeDocumentView(Rectangle& _rPlayground) { m_pTextView->SetPosSizePixel( _rPlayground.TopLeft(), _rPlayground.GetSize() ); @@ -79,21 +79,21 @@ void OQueryViewSwitch::resizeDocumentView(Rectangle& _rPlayground) _rPlayground.SetPos( _rPlayground.BottomRight() ); _rPlayground.SetSize( Size( 0, 0 ) ); } -// ----------------------------------------------------------------------------- + sal_Bool OQueryViewSwitch::checkStatement() { if(m_pTextView->IsVisible()) return m_pTextView->checkStatement(); return m_pDesignView->checkStatement(); } -// ----------------------------------------------------------------------------- + OUString OQueryViewSwitch::getStatement() { if(m_pTextView->IsVisible()) return m_pTextView->getStatement(); return m_pDesignView->getStatement(); } -// ----------------------------------------------------------------------------- + void OQueryViewSwitch::setReadOnly(sal_Bool _bReadOnly) { if(m_pTextView->IsVisible()) @@ -101,7 +101,7 @@ void OQueryViewSwitch::setReadOnly(sal_Bool _bReadOnly) else m_pDesignView->setReadOnly(_bReadOnly); } -// ----------------------------------------------------------------------------- + void OQueryViewSwitch::clear() { if(m_pTextView->IsVisible()) @@ -109,7 +109,7 @@ void OQueryViewSwitch::clear() else m_pDesignView->clear(); } -// ----------------------------------------------------------------------------- + void OQueryViewSwitch::GrabFocus() { if ( m_pTextView && m_pTextView->IsVisible() ) @@ -117,7 +117,7 @@ void OQueryViewSwitch::GrabFocus() else if ( m_pDesignView && m_pDesignView->IsVisible() ) m_pDesignView->GrabFocus(); } -// ----------------------------------------------------------------------------- + void OQueryViewSwitch::setStatement(const OUString& _rsStatement) { if(m_pTextView->IsVisible()) @@ -125,7 +125,7 @@ void OQueryViewSwitch::setStatement(const OUString& _rsStatement) else m_pDesignView->setStatement(_rsStatement); } -// ----------------------------------------------------------------------------- + void OQueryViewSwitch::copy() { if(m_pTextView->IsVisible()) @@ -133,28 +133,28 @@ void OQueryViewSwitch::copy() else m_pDesignView->copy(); } -// ----------------------------------------------------------------------------- + sal_Bool OQueryViewSwitch::isCutAllowed() { if(m_pTextView->IsVisible()) return m_pTextView->isCutAllowed(); return m_pDesignView->isCutAllowed(); } -// ----------------------------------------------------------------------------- + sal_Bool OQueryViewSwitch::isCopyAllowed() { if(m_pTextView->IsVisible()) return m_pTextView->isCopyAllowed(); return m_pDesignView->isCopyAllowed(); } -// ----------------------------------------------------------------------------- + sal_Bool OQueryViewSwitch::isPasteAllowed() { if(m_pTextView->IsVisible()) return m_pTextView->isPasteAllowed(); return m_pDesignView->isPasteAllowed(); } -// ----------------------------------------------------------------------------- + void OQueryViewSwitch::cut() { if(m_pTextView->IsVisible()) @@ -162,7 +162,7 @@ void OQueryViewSwitch::cut() else m_pDesignView->cut(); } -// ----------------------------------------------------------------------------- + void OQueryViewSwitch::paste() { if(m_pTextView->IsVisible()) @@ -170,14 +170,13 @@ void OQueryViewSwitch::paste() else m_pDesignView->paste(); } -// ----------------------------------------------------------------------------- + OQueryContainerWindow* OQueryViewSwitch::getContainer() const { Window* pDesignParent = getDesignView() ? getDesignView()->GetParent() : NULL; return static_cast< OQueryContainerWindow* >( pDesignParent ); } -// ----------------------------------------------------------------------------- void OQueryViewSwitch::impl_forceSQLView() { OAddTableDlg* pAddTabDialog( getAddTableDialog() ); @@ -196,7 +195,6 @@ void OQueryViewSwitch::impl_forceSQLView() m_pTextView->setStatement(static_cast<OQueryController&>(m_pDesignView->getController()).getStatement()); } -// ----------------------------------------------------------------------------- void OQueryViewSwitch::forceInitialView() { OQueryController& rQueryController( static_cast< OQueryController& >( m_pDesignView->getController() ) ); @@ -223,7 +221,6 @@ void OQueryViewSwitch::forceInitialView() impl_postViewSwitch( bGraphicalDesign, true ); } -// ----------------------------------------------------------------------------- bool OQueryViewSwitch::switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo ) { sal_Bool bRet = sal_True; @@ -253,7 +250,6 @@ bool OQueryViewSwitch::switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo ) return impl_postViewSwitch( bGraphicalDesign, bRet ); } -// ----------------------------------------------------------------------------- bool OQueryViewSwitch::impl_postViewSwitch( const bool i_bGraphicalDesign, const bool i_bSuccess ) { if ( i_bSuccess ) @@ -278,42 +274,41 @@ bool OQueryViewSwitch::impl_postViewSwitch( const bool i_bGraphicalDesign, const return i_bSuccess; } -// ----------------------------------------------------------------------------- OAddTableDlg* OQueryViewSwitch::getAddTableDialog() { if ( !m_pDesignView ) return NULL; return m_pDesignView->getController().getAddTableDialog(); } -// ----------------------------------------------------------------------------- + sal_Bool OQueryViewSwitch::isSlotEnabled(sal_Int32 _nSlotId) { return m_pDesignView->isSlotEnabled(_nSlotId); } -// ----------------------------------------------------------------------------- + void OQueryViewSwitch::setSlotEnabled(sal_Int32 _nSlotId,sal_Bool _bEnable) { m_pDesignView->setSlotEnabled(_nSlotId,_bEnable); } -// ----------------------------------------------------------------------------- + void OQueryViewSwitch::SaveUIConfig() { if(m_pDesignView->IsVisible()) m_pDesignView->SaveUIConfig(); } -// ----------------------------------------------------------------------------- + void OQueryViewSwitch::SetPosSizePixel( Point _rPt,Size _rSize) { m_pDesignView->SetPosSizePixel( _rPt,_rSize); m_pDesignView->Resize(); m_pTextView->SetPosSizePixel( _rPt,_rSize); } -// ----------------------------------------------------------------------------- + Reference< XComponentContext > OQueryViewSwitch::getORB() const { return m_pDesignView->getORB(); } -// ----------------------------------------------------------------------------- + bool OQueryViewSwitch::reset( ::dbtools::SQLExceptionInfo* _pErrorInfo ) { m_pDesignView->reset(); @@ -325,12 +320,11 @@ bool OQueryViewSwitch::reset( ::dbtools::SQLExceptionInfo* _pErrorInfo ) return true; } -// ----------------------------------------------------------------------------- + void OQueryViewSwitch::setNoneVisbleRow(sal_Int32 _nRows) { if(m_pDesignView) m_pDesignView->setNoneVisbleRow(_nRows); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index ec85ed39a8a0..652a4c3437d9 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -61,7 +61,6 @@ using namespace ::com::sun::star::accessibility; #define HANDLE_COLUMN_WITDH 70 #define SORT_COLUMN_NONE 0xFFFFFFFF -// ----------------------------------------------------------------------------- namespace { sal_Bool isFieldNameAsterix(const OUString& _sFieldName ) @@ -79,7 +78,6 @@ namespace } return bAsterix; } - // ----------------------------------------------------------------------------- sal_Bool lcl_SupportsCoreSQLGrammar(const Reference< XConnection>& _xConnection) { sal_Bool bSupportsCoreGrammar = sal_False; @@ -99,7 +97,6 @@ namespace } DBG_NAME(OSelectionBrowseBox) -//------------------------------------------------------------------------------ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent ) :EditBrowseBox( pParent,EBBF_NOROWPICTURE, WB_3DLOOK, BROWSER_COLUMNSELECTION | BROWSER_KEEPSELECTION | BROWSER_HIDESELECT | BROWSER_HIDECURSOR | BROWSER_HLINESFULL | BROWSER_VLINESFULL ) @@ -134,7 +131,6 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent ) m_pOrderCell->SetHelpId(HID_QRYDGN_ROW_ORDER); m_pFunctionCell->SetHelpId(HID_QRYDGN_ROW_FUNCTION); - ////////////////////////////////////////////////////////////////////// // switch off triState of ::com::sun::star::form::CheckBox m_pVisibleCell->GetBox().EnableTriState( sal_False ); @@ -158,7 +154,6 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent ) m_timerInvalidate.Start(); } -//------------------------------------------------------------------------------ OSelectionBrowseBox::~OSelectionBrowseBox() { DBG_DTOR(OSelectionBrowseBox,NULL); @@ -170,7 +165,7 @@ OSelectionBrowseBox::~OSelectionBrowseBox() delete m_pOrderCell; delete m_pFunctionCell; } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::initialize() { Reference< XConnection> xConnection = static_cast<OQueryController&>(getDesignView()->getController()).getConnection(); @@ -232,20 +227,21 @@ void OSelectionBrowseBox::initialize() Init(); } -//============================================================================== + OQueryDesignView* OSelectionBrowseBox::getDesignView() { DBG_CHKTHIS(OSelectionBrowseBox,NULL); OSL_ENSURE(static_cast<const OQueryDesignView*>(GetParent()),"Parent isn't an OQueryDesignView!"); return static_cast<OQueryDesignView*>(GetParent()); } -// ----------------------------------------------------------------------------- + OQueryDesignView* OSelectionBrowseBox::getDesignView() const { DBG_CHKTHIS(OSelectionBrowseBox,NULL); OSL_ENSURE(static_cast<const OQueryDesignView*>(GetParent()),"Parent isn't an OQueryDesignView!"); return static_cast<OQueryDesignView*>(GetParent()); } + namespace { class OSelectionBrwBoxHeader : public ::svt::EditBrowserHeader @@ -284,12 +280,11 @@ namespace } } -// ----------------------------------------------------------------------------- BrowserHeader* OSelectionBrowseBox::imp_CreateHeaderBar(BrowseBox* /*pParent*/) { return new OSelectionBrwBoxHeader(this); } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::ColumnMoved( sal_uInt16 nColId,sal_Bool _bCreateUndo ) { EditBrowseBox::ColumnMoved( nColId ); @@ -325,7 +320,7 @@ void OSelectionBrowseBox::ColumnMoved( sal_uInt16 nColId,sal_Bool _bCreateUndo ) else OSL_FAIL("Invalid column id!"); } -//------------------------------------------------------------------------------ + void OSelectionBrowseBox::Init() { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -380,7 +375,6 @@ void OSelectionBrowseBox::Init() } } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::PreFill() { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -389,7 +383,6 @@ void OSelectionBrowseBox::PreFill() if (GetCurRow() != 0) GoToRow(0); - static_cast< OQueryController& >( getDesignView()->getController() ).clearFields(); DeactivateCell(); @@ -398,7 +391,7 @@ void OSelectionBrowseBox::PreFill() InsertHandleColumn( HANDLE_COLUMN_WITDH ); SetUpdateMode(sal_True); } -//------------------------------------------------------------------------------ + void OSelectionBrowseBox::ClearAll() { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -416,7 +409,7 @@ void OSelectionBrowseBox::ClearAll() m_nLastSortColumn = SORT_COLUMN_NONE; SetUpdateMode(sal_True); } -//------------------------------------------------------------------------------ + void OSelectionBrowseBox::SetReadOnly(sal_Bool bRO) { if (bRO) @@ -433,7 +426,6 @@ void OSelectionBrowseBox::SetReadOnly(sal_Bool bRO) } } -//------------------------------------------------------------------------------ CellController* OSelectionBrowseBox::GetController(long nRow, sal_uInt16 nColId) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -466,7 +458,6 @@ CellController* OSelectionBrowseBox::GetController(long nRow, sal_uInt16 nColId) } } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, long nRow, sal_uInt16 nColId) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -561,14 +552,14 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon } Controller()->ClearModified(); } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::notifyTableFieldChanged(const String& _sOldAlias,const String& _sAlias,sal_Bool& _bListAction,sal_uInt16 _nColumnId) { appendUndoAction(_sOldAlias,_sAlias,BROW_TABLE_ROW,_bListAction); if ( m_bVisibleRow[BROW_TABLE_ROW] ) RowModified(GetBrowseRow(BROW_TABLE_ROW), _nColumnId); } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::notifyFunctionFieldChanged(const String& _sOldFunctionName,const String& _sFunctionName,sal_Bool& _bListAction,sal_uInt16 _nColumnId) { appendUndoAction(_sOldFunctionName,_sFunctionName,BROW_FUNCTION_ROW,_bListAction); @@ -576,7 +567,7 @@ void OSelectionBrowseBox::notifyFunctionFieldChanged(const String& _sOldFunction SetRowVisible(BROW_FUNCTION_ROW, sal_True); RowModified(GetBrowseRow(BROW_FUNCTION_ROW), _nColumnId); } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::clearEntryFunctionField(const String& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction,sal_uInt16 _nColumnId) { if ( isFieldNameAsterix( _sFieldName ) && (!_pEntry->isNoneFunction() || _pEntry->IsGroupBy()) ) @@ -594,7 +585,7 @@ void OSelectionBrowseBox::clearEntryFunctionField(const String& _sFieldName,OTab } } } -// ----------------------------------------------------------------------------- + sal_Bool OSelectionBrowseBox::fillColumnRef(const OSQLParseNode* _pColumnRef, const Reference< XConnection >& _rxConnection, OTableFieldDescRef& _pEntry, sal_Bool& _bListAction ) { OSL_ENSURE(_pColumnRef,"No valid parsenode!"); @@ -602,7 +593,7 @@ sal_Bool OSelectionBrowseBox::fillColumnRef(const OSQLParseNode* _pColumnRef, co OSQLParseTreeIterator::getColumnRange(_pColumnRef,_rxConnection,sColumnName,sTableRange); return fillColumnRef(sColumnName,sTableRange,_rxConnection->getMetaData(),_pEntry,_bListAction); } -// ----------------------------------------------------------------------------- + sal_Bool OSelectionBrowseBox::fillColumnRef(const OUString& _sColumnName,const OUString& _sTableRange,const Reference<XDatabaseMetaData>& _xMetaData,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction) { sal_Bool bError = sal_False; @@ -647,7 +638,7 @@ sal_Bool OSelectionBrowseBox::fillColumnRef(const OUString& _sColumnName,const O return bError; } -// ----------------------------------------------------------------------------- + sal_Bool OSelectionBrowseBox::saveField(String& _sFieldName ,OTableFieldDescRef& _pEntry, sal_Bool& _bListAction) { sal_Bool bError = sal_False; @@ -904,7 +895,7 @@ sal_Bool OSelectionBrowseBox::saveField(String& _sFieldName ,OTableFieldDescRef& return bError; } -//------------------------------------------------------------------------------ + sal_Bool OSelectionBrowseBox::SaveModified() { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1229,7 +1220,6 @@ sal_Bool OSelectionBrowseBox::SaveModified() return pEntry != NULL && !bError; } -//------------------------------------------------------------------------------ sal_Bool OSelectionBrowseBox::SeekRow(long nRow) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1242,7 +1232,6 @@ sal_Bool OSelectionBrowseBox::SeekRow(long nRow) return bRet; } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId) const { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1265,7 +1254,6 @@ void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const Rectangle& rRect, rDev.SetClipRegion( ); } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::PaintStatusCell(OutputDevice& rDev, const Rectangle& rRect) const { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1280,7 +1268,6 @@ void OSelectionBrowseBox::PaintStatusCell(OutputDevice& rDev, const Rectangle& r rDev.DrawText(aRect, aLabel.GetToken(nToken),TEXT_DRAW_VCENTER); } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::RemoveColumn(sal_uInt16 _nColumnId) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1315,7 +1302,6 @@ void OSelectionBrowseBox::RemoveColumn(sal_uInt16 _nColumnId) invalidateUndoRedo(); } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::RemoveField(sal_uInt16 nColumnId ) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1341,7 +1327,6 @@ void OSelectionBrowseBox::RemoveField(sal_uInt16 nColumnId ) invalidateUndoRedo(); } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::adjustSelectionMode( sal_Bool _bClickedOntoHeader, sal_Bool _bClickedOntoHandleCol ) { // if a Header has been selected it should be shown otherwise not @@ -1370,7 +1355,6 @@ void OSelectionBrowseBox::adjustSelectionMode( sal_Bool _bClickedOntoHeader, sal } } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::MouseButtonDown(const BrowserMouseEvent& rEvt) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1383,7 +1367,6 @@ void OSelectionBrowseBox::MouseButtonDown(const BrowserMouseEvent& rEvt) EditBrowseBox::MouseButtonDown(rEvt); } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::MouseButtonUp(const BrowserMouseEvent& rEvt) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1391,7 +1374,6 @@ void OSelectionBrowseBox::MouseButtonUp(const BrowserMouseEvent& rEvt) static_cast<OQueryController&>(getDesignView()->getController()).InvalidateFeature( ID_BROWSER_QUERY_EXECUTE ); } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::KeyInput( const KeyEvent& rEvt ) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1408,8 +1390,6 @@ void OSelectionBrowseBox::KeyInput( const KeyEvent& rEvt ) EditBrowseBox::KeyInput(rEvt); } - -//------------------------------------------------------------------------------ sal_Int8 OSelectionBrowseBox::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1432,7 +1412,6 @@ sal_Int8 OSelectionBrowseBox::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) return nDropAction; } -//------------------------------------------------------------------------------ sal_Int8 OSelectionBrowseBox::ExecuteDrop( const BrowserExecuteDropEvent& _rEvt ) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1452,7 +1431,6 @@ sal_Int8 OSelectionBrowseBox::ExecuteDrop( const BrowserExecuteDropEvent& _rEvt return DND_ACTION_LINK; } -//------------------------------------------------------------------------------ OTableFieldDescRef OSelectionBrowseBox::AppendNewCol( sal_uInt16 nCnt) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1471,7 +1449,6 @@ OTableFieldDescRef OSelectionBrowseBox::AppendNewCol( sal_uInt16 nCnt) return getFields()[nCount]; } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::DeleteFields(const String& rAliasName) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1501,7 +1478,6 @@ void OSelectionBrowseBox::DeleteFields(const String& rAliasName) } } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::SetColWidth(sal_uInt16 nColId, long nNewWidth) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1521,15 +1497,12 @@ void OSelectionBrowseBox::SetColWidth(sal_uInt16 nColId, long nNewWidth) ActivateCell(GetCurRow(), GetCurColumnId()); } -//------------------------------------------------------------------------------ Rectangle OSelectionBrowseBox::GetInvalidRect( sal_uInt16 nColId ) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); - ////////////////////////////////////////////////////////////////////// // The rectangle is the full output area of the window Rectangle aInvalidRect( Point(0,0), GetOutputSizePixel() ); - ////////////////////////////////////////////////////////////////////// // now update the left side Rectangle aFieldRect(GetCellRect( 0, nColId )); // used instead of GetFieldRectPixel aInvalidRect.Left() = aFieldRect.Left(); @@ -1537,7 +1510,6 @@ Rectangle OSelectionBrowseBox::GetInvalidRect( sal_uInt16 nColId ) return aInvalidRect; } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _nColumnPosition) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1601,7 +1573,6 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _n invalidateUndoRedo(); } -//------------------------------------------------------------------------------ OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition, sal_Bool bVis, sal_Bool bActivate) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1627,7 +1598,6 @@ OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxd return InsertField(aInfo, _nColumnPosition, bVis, bActivate); } -//------------------------------------------------------------------------------ OTableFieldDescRef OSelectionBrowseBox::InsertField(const OTableFieldDescRef& _rInfo, sal_uInt16 _nColumnPosition, sal_Bool bVis, sal_Bool bActivate) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1656,7 +1626,6 @@ OTableFieldDescRef OSelectionBrowseBox::InsertField(const OTableFieldDescRef& _r return pEntry; } -//------------------------------------------------------------------------------ sal_uInt16 OSelectionBrowseBox::FieldsCount() { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1673,7 +1642,6 @@ sal_uInt16 OSelectionBrowseBox::FieldsCount() return nCount; } -//------------------------------------------------------------------------------ OTableFieldDescRef OSelectionBrowseBox::FindFirstFreeCol(sal_uInt16& _rColumnPosition ) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1694,7 +1662,6 @@ OTableFieldDescRef OSelectionBrowseBox::FindFirstFreeCol(sal_uInt16& _rColumnPos return NULL; } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::CheckFreeColumns(sal_uInt16& _rColumnPosition) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1705,7 +1672,7 @@ void OSelectionBrowseBox::CheckFreeColumns(sal_uInt16& _rColumnPosition) OSL_VERIFY(FindFirstFreeCol(_rColumnPosition).is()); } } -//------------------------------------------------------------------------------ + void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt32 /*_nCurrentPos*/) { Reference< XConnection> xConnection = static_cast<OQueryController&>(getDesignView()->getController()).getConnection(); @@ -1761,7 +1728,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt pTmp->SetGroupBy(sal_False); } } -//------------------------------------------------------------------------------ + void OSelectionBrowseBox::DuplicateConditionLevel( const sal_uInt16 nLevel) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1787,7 +1754,7 @@ void OSelectionBrowseBox::DuplicateConditionLevel( const sal_uInt16 nLevel) } } } -//------------------------------------------------------------------------------ + void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const String& rValue, const sal_uInt16 nLevel,bool _bAddOrOnOneLine ) { Reference< XConnection> xConnection = static_cast<OQueryController&>(getDesignView()->getController()).getConnection(); @@ -1880,7 +1847,6 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const S } } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrderDir eDir, sal_uInt32 _nCurrentPos) { if (_nCurrentPos == 0) @@ -1936,14 +1902,12 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde } } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::ArrangeControls(sal_uInt16& nX, sal_uInt16 nY) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); EditBrowseBox::ArrangeControls(nX, nY); } -//------------------------------------------------------------------------------ sal_Bool OSelectionBrowseBox::Save() { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1953,7 +1917,6 @@ sal_Bool OSelectionBrowseBox::Save() return bRet; } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::CellModified() { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1981,7 +1944,6 @@ void OSelectionBrowseBox::CellModified() static_cast<OQueryController&>(getDesignView()->getController()).setModified( sal_True ); } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::Fill() { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -1992,7 +1954,6 @@ void OSelectionBrowseBox::Fill() AppendNewCol(DEFAULT_QUERY_COLS - nColCount); } -//------------------------------------------------------------------------------ Size OSelectionBrowseBox::CalcOptimalSize( const Size& _rAvailable ) { Size aReturn( _rAvailable.Width(), GetTitleHeight() ); @@ -2003,7 +1964,6 @@ Size OSelectionBrowseBox::CalcOptimalSize( const Size& _rAvailable ) return aReturn; } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::Command(const CommandEvent& rEvt) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -2102,14 +2062,12 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt) } } -//------------------------------------------------------------------------------ sal_Bool OSelectionBrowseBox::IsRowVisible(sal_uInt16 _nWhich) const { OSL_ENSURE(_nWhich<(m_bVisibleRow.size()), "OSelectionBrowseBox::IsRowVisible : invalid parameter !"); return m_bVisibleRow[_nWhich]; } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, sal_Bool _bVis) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -2138,7 +2096,6 @@ void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, sal_Bool _bVis) ActivateCell(); } -//------------------------------------------------------------------------------ long OSelectionBrowseBox::GetBrowseRow(long nRowId) const { sal_uInt16 nCount(0); @@ -2149,7 +2106,7 @@ long OSelectionBrowseBox::GetBrowseRow(long nRowId) const } return nCount; } -//------------------------------------------------------------------------------ + long OSelectionBrowseBox::GetRealRow(long nRowId) const { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -2166,6 +2123,7 @@ long OSelectionBrowseBox::GetRealRow(long nRowId) const OSL_ENSURE(nErg <= long(m_bVisibleRow.size()),"nErg kann nicht groesser als BROW_ROW_CNT sein!"); return i; } + static const long nVisibleRowMask[] = { 0x0001, @@ -2181,7 +2139,6 @@ static const long nVisibleRowMask[] = 0x0400, 0x0800 }; -//------------------------------------------------------------------------------ sal_Int32 OSelectionBrowseBox::GetNoneVisibleRows() const { sal_Int32 nErg(0); @@ -2194,7 +2151,7 @@ sal_Int32 OSelectionBrowseBox::GetNoneVisibleRows() const } return nErg; } -//------------------------------------------------------------------------------ + void OSelectionBrowseBox::SetNoneVisbleRow(long nRows) { // only the first 11 row are interesting @@ -2202,7 +2159,7 @@ void OSelectionBrowseBox::SetNoneVisbleRow(long nRows) for(sal_Int32 i=0;i< nSize;i++) m_bVisibleRow[i] = !(nRows & nVisibleRowMask[i]); } -//------------------------------------------------------------------------------ + OUString OSelectionBrowseBox::GetCellText(long nRow, sal_uInt16 nColId) const { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -2253,7 +2210,7 @@ OUString OSelectionBrowseBox::GetCellText(long nRow, sal_uInt16 nColId) const } return aText; } -//------------------------------------------------------------------------------ + sal_Bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId,String& rFkt) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -2324,7 +2281,7 @@ sal_Bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId,Strin return bErg; } -//------------------------------------------------------------------------------ + String OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, sal_uInt16 nColId) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -2351,7 +2308,6 @@ String OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, sal_uInt16 nCo } } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, const String& strNewText) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -2363,7 +2319,6 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, con OTableFieldDescRef pEntry = getEntry(nPos - 1); OSL_ENSURE(pEntry != NULL, "OSelectionBrowseBox::SetCellContents : invalid column id, prepare for GPF ... "); - switch (nRow) { case BROW_VIS_ROW: @@ -2394,7 +2349,6 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, con if ( pEntry->IsGroupBy() && !sGroupFunctionName.EqualsIgnoreCaseAscii(strNewText) ) pEntry->SetGroupBy(sal_False); - if ( sGroupFunctionName.EqualsIgnoreCaseAscii(strNewText) ) pEntry->SetGroupBy(sal_True); else if ( strNewText.Len() ) @@ -2420,7 +2374,7 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, con static_cast<OQueryController&>(getDesignView()->getController()).setModified( sal_True ); } -//------------------------------------------------------------------------------ + sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(long nRow, sal_uInt16 nColId) const { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -2432,7 +2386,6 @@ sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(long nRow, sal_uInt16 nColId) return GetDataWindow().GetTextWidth(GetCellText(nRowId, nColId)); } -//------------------------------------------------------------------------------ void OSelectionBrowseBox::ColumnResized(sal_uInt16 nColId) { if (static_cast<OQueryController&>(getDesignView()->getController()).isReadOnly()) @@ -2463,7 +2416,6 @@ void OSelectionBrowseBox::ColumnResized(sal_uInt16 nColId) } } -//------------------------------------------------------------------------------ sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(long nRowId, sal_uInt16 nColId) { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -2478,7 +2430,6 @@ sal_uInt32 OSelectionBrowseBox::GetTotalCellWidth(long nRowId, sal_uInt16 nColId return GetDataWindow().LogicToPixel(Size(GetDataWindow().GetTextWidth(strText),0)).Width(); } -//------------------------------------------------------------------------------ sal_uInt16 OSelectionBrowseBox::GetDefaultColumnWidth(const String& /*rName*/) const { DBG_CHKTHIS(OSelectionBrowseBox,NULL); @@ -2486,7 +2437,7 @@ sal_uInt16 OSelectionBrowseBox::GetDefaultColumnWidth(const String& /*rName*/) c // like to have a new Default-value return static_cast<sal_uInt16>(DEFAULT_SIZE); } -//------------------------------------------------------------------------------ + sal_Bool OSelectionBrowseBox::isCutAllowed() { sal_Bool bCutAllowed = sal_False; @@ -2507,7 +2458,7 @@ sal_Bool OSelectionBrowseBox::isCutAllowed() } return bCutAllowed; } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::cut() { long nRow = GetRealRow(GetCurRow()); @@ -2526,7 +2477,7 @@ void OSelectionBrowseBox::cut() invalidateUndoRedo(); } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::paste() { long nRow = GetRealRow(GetCurRow()); @@ -2543,7 +2494,7 @@ void OSelectionBrowseBox::paste() RowModified(GetBrowseRow(nRow), GetCurColumnId()); invalidateUndoRedo(); } -// ----------------------------------------------------------------------------- + sal_Bool OSelectionBrowseBox::isPasteAllowed() { sal_Bool bPasteAllowed = sal_True; @@ -2559,12 +2510,12 @@ sal_Bool OSelectionBrowseBox::isPasteAllowed() } return bPasteAllowed; } -// ----------------------------------------------------------------------------- + sal_Bool OSelectionBrowseBox::isCopyAllowed() { return isCutAllowed(); } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::copy() { long nRow = GetRealRow(GetCurRow()); @@ -2577,7 +2528,7 @@ void OSelectionBrowseBox::copy() m_pTextCell->Copy(); } } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::appendUndoAction(const String& _rOldValue,const String& _rNewValue,sal_Int32 _nRow,sal_Bool& _bListAction) { if ( !m_bInUndoMode && !_rNewValue.Equals(_rOldValue) ) @@ -2590,7 +2541,7 @@ void OSelectionBrowseBox::appendUndoAction(const String& _rOldValue,const String appendUndoAction(_rOldValue,_rNewValue,_nRow); } } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::appendUndoAction(const String& _rOldValue,const String& _rNewValue,sal_Int32 _nRow) { if ( !m_bInUndoMode && !_rNewValue.Equals(_rOldValue) ) @@ -2603,7 +2554,7 @@ void OSelectionBrowseBox::appendUndoAction(const String& _rOldValue,const String getDesignView()->getController().addUndoActionAndInvalidate(pUndoAct); } } -// ----------------------------------------------------------------------------- + IMPL_LINK_NOARG(OSelectionBrowseBox, OnInvalidateTimer) { static_cast<OQueryController&>(getDesignView()->getController()).InvalidateFeature(SID_CUT); @@ -2613,34 +2564,34 @@ IMPL_LINK_NOARG(OSelectionBrowseBox, OnInvalidateTimer) m_timerInvalidate.Start(); return 0L; } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::stopTimer() { m_bStopTimer = sal_True; if (m_timerInvalidate.IsActive()) m_timerInvalidate.Stop(); } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::startTimer() { m_bStopTimer = sal_False; if (!m_timerInvalidate.IsActive()) m_timerInvalidate.Start(); } -// ----------------------------------------------------------------------------- + OTableFields& OSelectionBrowseBox::getFields() const { OQueryController& rController = static_cast<OQueryController&>(getDesignView()->getController()); return rController.getTableFieldDesc(); } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::enableControl(const OTableFieldDescRef& _rEntry,Window* _pControl) { sal_Bool bEnable = !_rEntry->isCondition(); _pControl->Enable(bEnable); _pControl->EnableInput(bEnable); } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::setTextCellContext(const OTableFieldDescRef& _rEntry,const String& _sText,const OString& _sHelpId) { m_pTextCell->SetText(_sText); @@ -2655,7 +2606,7 @@ void OSelectionBrowseBox::setTextCellContext(const OTableFieldDescRef& _rEntry,c m_pTextCell->SetHelpText(String()); m_pTextCell->SetHelpId(_sHelpId); } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::invalidateUndoRedo() { OQueryController& rController = static_cast<OQueryController&>(getDesignView()->getController()); @@ -2663,7 +2614,7 @@ void OSelectionBrowseBox::invalidateUndoRedo() rController.InvalidateFeature( ID_BROWSER_REDO ); rController.InvalidateFeature( ID_BROWSER_QUERY_EXECUTE ); } -// ----------------------------------------------------------------------------- + OTableFieldDescRef OSelectionBrowseBox::getEntry(OTableFields::size_type _nPos) { // we have to check if we need a new entry at this position @@ -2681,21 +2632,21 @@ OTableFieldDescRef OSelectionBrowseBox::getEntry(OTableFields::size_type _nPos) } return pEntry; } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::GetFocus() { if(!IsEditing() && !m_bWasEditing) ActivateCell(); EditBrowseBox::GetFocus(); } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::DeactivateCell(sal_Bool _bUpdate) { m_bWasEditing = sal_True; EditBrowseBox::DeactivateCell(_bUpdate); m_bWasEditing = sal_False; } -// ----------------------------------------------------------------------------- + OUString OSelectionBrowseBox::GetRowDescription( sal_Int32 _nRow ) const { String aLabel(ModuleRes(STR_QUERY_HANDLETEXT)); @@ -2706,7 +2657,7 @@ OUString OSelectionBrowseBox::GetRowDescription( sal_Int32 _nRow ) const xub_StrLen(BROW_CRIT2_ROW) : xub_StrLen(GetRealRow(_nRow)); return OUString(aLabel.GetToken(nToken)); } -// ----------------------------------------------------------------------------- + OUString OSelectionBrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType _eObjType,sal_Int32 _nPosition) const { OUString sRetText; @@ -2720,7 +2671,7 @@ OUString OSelectionBrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBo } return sRetText; } -// ----------------------------------------------------------------------------- + sal_Bool OSelectionBrowseBox::fillEntryTable(OTableFieldDescRef& _pEntry,const OUString& _sTableName) { sal_Bool bRet = sal_False; @@ -2741,7 +2692,7 @@ sal_Bool OSelectionBrowseBox::fillEntryTable(OTableFieldDescRef& _pEntry,const O } return bRet; } -// ----------------------------------------------------------------------------- + void OSelectionBrowseBox::setFunctionCell(OTableFieldDescRef& _pEntry) { Reference< XConnection> xConnection = static_cast<OQueryController&>(getDesignView()->getController()).getConnection(); @@ -2793,7 +2744,7 @@ void OSelectionBrowseBox::setFunctionCell(OTableFieldDescRef& _pEntry) } } } -// ----------------------------------------------------------------------------- + Reference< XAccessible > OSelectionBrowseBox::CreateAccessibleCell( sal_Int32 _nRow, sal_uInt16 _nColumnPos ) { OTableFieldDescRef pEntry = NULL; @@ -2805,7 +2756,7 @@ Reference< XAccessible > OSelectionBrowseBox::CreateAccessibleCell( sal_Int32 _n return EditBrowseBox::CreateAccessibleCell( _nRow, _nColumnPos ); } -// ----------------------------------------------------------------------------- + bool OSelectionBrowseBox::HasFieldByAliasName(const OUString& rFieldName, OTableFieldDescRef& rInfo) const { OTableFields& aFields = getFields(); @@ -2822,6 +2773,5 @@ bool OSelectionBrowseBox::HasFieldByAliasName(const OUString& rFieldName, OTable } return aIter != aEnd; } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx index 65867fc3363b..bce9fce6f13a 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx @@ -48,7 +48,6 @@ namespace dbaui #define BROW_CRIT6_ROW 11 #define BROW_ROW_CNT 12 - //================================================================== class OQueryDesignView; class OSelectionBrowseBox : public ::svt::EditBrowseBox { @@ -181,7 +180,6 @@ namespace dbaui @return The XAccessible interface of the specified cell. */ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId ); - protected: virtual sal_Bool SeekRow( long nRow ); @@ -283,7 +281,6 @@ namespace dbaui OTableFieldDescRef& _pEntry, sal_Bool& _bListAction); - /** append an undo action for the table field @param _sOldAlias The old table alias. @@ -330,6 +327,4 @@ namespace dbaui } #endif // DBAUI_QUERYDESIGN_OSELECTIONBROWSEBOX_HXX - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/TableConnection.cxx b/dbaccess/source/ui/querydesign/TableConnection.cxx index 8f2427a7f2b1..8a60793f2962 100644 --- a/dbaccess/source/ui/querydesign/TableConnection.cxx +++ b/dbaccess/source/ui/querydesign/TableConnection.cxx @@ -25,19 +25,15 @@ #include "ConnectionLineAccess.hxx" #include <algorithm> - using namespace dbaui; using namespace comphelper; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::accessibility; -//======================================================================== // class OTableConnection -//======================================================================== namespace dbaui { DBG_NAME(OTableConnection) - //------------------------------------------------------------------------ OTableConnection::OTableConnection( OJoinTableView* _pContainer,const TTableConnectionData::value_type& _pTabConnData ) :Window(_pContainer) ,m_pData( _pTabConnData ) @@ -49,7 +45,6 @@ namespace dbaui Show(); } - //------------------------------------------------------------------------ OTableConnection::OTableConnection( const OTableConnection& _rConn ) : Window(_rConn.m_pParent) ,m_pData(_rConn.GetData()->NewInstance()) { @@ -57,10 +52,8 @@ namespace dbaui *this = _rConn; } - //------------------------------------------------------------------------ void OTableConnection::Init() { - ////////////////////////////////////////////////////////////////////// // initialise linelist with defaults OConnectionLineDataVec* pLineData = GetData()->GetConnLineDataList(); OConnectionLineDataVec::const_iterator aIter = pLineData->begin(); @@ -70,12 +63,10 @@ namespace dbaui m_vConnLine.push_back( new OConnectionLine(this, *aIter) ); } - //------------------------------------------------------------------------ OConnectionLine* OTableConnection::CreateConnLine( const OConnectionLine& rConnLine ) { return new OConnectionLine( rConnLine ); } - // ----------------------------------------------------------------------------- void OTableConnection::clearLineData() { ::std::vector<OConnectionLine*>::iterator aLineEnd = m_vConnLine.end(); @@ -83,17 +74,14 @@ namespace dbaui delete *aLineIter; m_vConnLine.clear(); } - //------------------------------------------------------------------------ void OTableConnection::UpdateLineList() { - ////////////////////////////////////////////////////////////////////// // delete linelist clearLineData(); Init(); } - //------------------------------------------------------------------------ OTableConnection& OTableConnection::operator=( const OTableConnection& rConn ) { if( &rConn == this ) @@ -113,7 +101,6 @@ namespace dbaui m_vConnLine.push_back( CreateConnLine( **aIter )); } - // as the data are not mine, I also do not delete the old m_pData->CopyFrom(*rConn.GetData()); // CopyFrom is virtual, therefore it is not a problem if m_pData is a derived type of OTableConnectionData @@ -124,15 +111,12 @@ namespace dbaui return *this; } - - //------------------------------------------------------------------------ bool OTableConnection::RecalcLines() { // call RecalcLines on each line ::std::for_each(m_vConnLine.begin(),m_vConnLine.end(),::std::mem_fun(&OConnectionLine::RecalcLine)); return true; } - //------------------------------------------------------------------------ OTableWindow* OTableConnection::GetSourceWin() const { TTableWindowData::value_type pRef = GetData()->getReferencingTable(); @@ -143,7 +127,6 @@ namespace dbaui } return pRet; } - //------------------------------------------------------------------------ OTableWindow* OTableConnection::GetDestWin() const { TTableWindowData::value_type pRef = GetData()->getReferencedTable(); @@ -155,24 +138,20 @@ namespace dbaui return pRet; } - //------------------------------------------------------------------------ void OTableConnection::Select() { m_bSelected = sal_True; m_pParent->Invalidate( GetBoundingRect(), INVALIDATE_NOCHILDREN); } - //------------------------------------------------------------------------ void OTableConnection::Deselect() { m_bSelected = sal_False; InvalidateConnection(); } - //------------------------------------------------------------------------ sal_Bool OTableConnection::CheckHit( const Point& rMousePos ) const { - ////////////////////////////////////////////////////////////////////// // check if the point hit our line ::std::vector<OConnectionLine*>::const_iterator aIter = ::std::find_if(m_vConnLine.begin(), m_vConnLine.end(), @@ -180,7 +159,6 @@ namespace dbaui return aIter != m_vConnLine.end(); } - //------------------------------------------------------------------------ bool OTableConnection::InvalidateConnection() { Rectangle rcBounding = GetBoundingRect(); @@ -195,10 +173,8 @@ namespace dbaui return true; } - //------------------------------------------------------------------------ Rectangle OTableConnection::GetBoundingRect() const { - ////////////////////////////////////////////////////////////////////// // determine all lines of the surrounding rectangle Rectangle aBoundingRect( Point(0,0), Point(0,0) ); Rectangle aTempRect; @@ -207,7 +183,6 @@ namespace dbaui { aTempRect = (*aIter)->GetBoundingRect(); - ////////////////////////////////////////////////////////////////////// // is the BoundingRect of this line valid? if( (aTempRect.GetWidth()!=1) && (aTempRect.GetHeight()!=1) ) { @@ -221,16 +196,11 @@ namespace dbaui return aBoundingRect; } - //------------------------------------------------------------------------ void OTableConnection::Draw( const Rectangle& /*rRect*/ ) { - ////////////////////////////////////////////////////////////////////// // Draw line ::std::for_each(m_vConnLine.begin(),m_vConnLine.end(),TConnectionLineDrawFunctor(m_pParent)); } - // ----------------------------------------------------------------------------- } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx b/dbaccess/source/ui/querydesign/TableConnectionData.cxx index 2f68e74d1dc3..2d7b3be86c26 100644 --- a/dbaccess/source/ui/querydesign/TableConnectionData.cxx +++ b/dbaccess/source/ui/querydesign/TableConnectionData.cxx @@ -24,17 +24,14 @@ using namespace dbaui; using namespace comphelper; -//================================================================== // class OTableConnectionData -//================================================================== DBG_NAME(OTableConnectionData) -//------------------------------------------------------------------------ OTableConnectionData::OTableConnectionData() { DBG_CTOR(OTableConnectionData,NULL); Init(); } -// ----------------------------------------------------------------------------- + OTableConnectionData::OTableConnectionData(const TTableWindowData::value_type& _pReferencingTable ,const TTableWindowData::value_type& _pReferencedTable ,const String& rConnName ) @@ -45,29 +42,27 @@ OTableConnectionData::OTableConnectionData(const TTableWindowData::value_type& _ DBG_CTOR(OTableConnectionData,NULL); Init(); } -//------------------------------------------------------------------------ + void OTableConnectionData::Init() { - ////////////////////////////////////////////////////////////////////// // initialise linedatalist with defaults OSL_ENSURE(m_vConnLineData.empty(), "OTableConnectionData::Init() : nur mit leere Linienliste aufzurufen !"); ResetConnLines(); // this creates the defaults } -//------------------------------------------------------------------------ + OTableConnectionData::OTableConnectionData( const OTableConnectionData& rConnData ) { DBG_CTOR(OTableConnectionData,NULL); *this = rConnData; } -//------------------------------------------------------------------------ + void OTableConnectionData::CopyFrom(const OTableConnectionData& rSource) { *this = rSource; // here I revert to the (non-virtual) operator =, which only copies my members } -//------------------------------------------------------------------------ OTableConnectionData::~OTableConnectionData() { DBG_DTOR(OTableConnectionData,NULL); @@ -75,7 +70,6 @@ OTableConnectionData::~OTableConnectionData() OConnectionLineDataVec().swap(m_vConnLineData); } -//------------------------------------------------------------------------ OTableConnectionData& OTableConnectionData::operator=( const OTableConnectionData& rConnData ) { if (&rConnData == this) @@ -99,7 +93,6 @@ OTableConnectionData& OTableConnectionData::operator=( const OTableConnectionDat return *this; } -//------------------------------------------------------------------------ sal_Bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const String& rSourceFieldName, const String& rDestFieldName ) { if (sal_uInt16(m_vConnLineData.size()) < nIndex) @@ -119,7 +112,6 @@ sal_Bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const String& rSo return sal_True; } -//------------------------------------------------------------------------ sal_Bool OTableConnectionData::AppendConnLine( const OUString& rSourceFieldName, const OUString& rDestFieldName ) { OConnectionLineDataVec::iterator aIter = m_vConnLineData.begin(); @@ -140,29 +132,26 @@ sal_Bool OTableConnectionData::AppendConnLine( const OUString& rSourceFieldName, return sal_True; } -//------------------------------------------------------------------------ void OTableConnectionData::ResetConnLines() { OConnectionLineDataVec().swap(m_vConnLineData); } -//------------------------------------------------------------------------ OConnectionLineDataRef OTableConnectionData::CreateLineDataObj() { return new OConnectionLineData(); } -//------------------------------------------------------------------------ OConnectionLineDataRef OTableConnectionData::CreateLineDataObj( const OConnectionLineData& rConnLineData ) { return new OConnectionLineData( rConnLineData ); } -// ----------------------------------------------------------------------------- + OTableConnectionData* OTableConnectionData::NewInstance() const { return new OTableConnectionData(); } -// ----------------------------------------------------------------------------- + OConnectionLineDataVec::size_type OTableConnectionData::normalizeLines() { // remove empty lines @@ -183,9 +172,5 @@ OConnectionLineDataVec::size_type OTableConnectionData::normalizeLines() } return nRet; } -// ----------------------------------------------------------------------------- - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx index a36b9f777731..e70b23b2d93c 100644 --- a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx +++ b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "TableFieldDescription.hxx" #include <tools/debug.hxx> #include <com/sun/star/sdbc/DataType.hpp> @@ -32,7 +31,6 @@ using namespace comphelper; using namespace dbaui; DBG_NAME(OTableFieldDesc) -//============================================================================== OTableFieldDesc::OTableFieldDesc() :m_pTabWindow(0) ,m_eDataType(1000) @@ -47,7 +45,7 @@ OTableFieldDesc::OTableFieldDesc() { DBG_CTOR(OTableFieldDesc,NULL); } -//------------------------------------------------------------------------------ + OTableFieldDesc::OTableFieldDesc(const OTableFieldDesc& rRS) : ::salhelper::SimpleReferenceObject() @@ -56,7 +54,6 @@ OTableFieldDesc::OTableFieldDesc(const OTableFieldDesc& rRS) *this = rRS; } -//------------------------------------------------------------------------------ OTableFieldDesc::OTableFieldDesc(const OUString& rT, const OUString& rF ) :m_pTabWindow(0) ,m_eFunctionType( FKT_NONE ) @@ -69,12 +66,11 @@ OTableFieldDesc::OTableFieldDesc(const OUString& rT, const OUString& rF ) SetField( rF ); SetTable( rT ); } -//------------------------------------------------------------------------------ OTableFieldDesc::~OTableFieldDesc() { DBG_DTOR(OTableFieldDesc,NULL); } -//------------------------------------------------------------------------------ + OTableFieldDesc& OTableFieldDesc::operator=( const OTableFieldDesc& rRS ) { if (&rRS == this) @@ -99,7 +95,7 @@ OTableFieldDesc& OTableFieldDesc::operator=( const OTableFieldDesc& rRS ) return *this; } -//------------------------------------------------------------------------------ + sal_Bool OTableFieldDesc::operator==( const OTableFieldDesc& rDesc ) { DBG_CHKTHIS(OTableFieldDesc,NULL); @@ -116,7 +112,6 @@ sal_Bool OTableFieldDesc::operator==( const OTableFieldDesc& rDesc ) } -//------------------------------------------------------------------------------ void OTableFieldDesc::SetCriteria( sal_uInt16 nIdx, const OUString& rCrit) { DBG_CHKTHIS(OTableFieldDesc,NULL); @@ -130,7 +125,6 @@ void OTableFieldDesc::SetCriteria( sal_uInt16 nIdx, const OUString& rCrit) } } -//------------------------------------------------------------------------------ OUString OTableFieldDesc::GetCriteria( sal_uInt16 nIdx ) const { DBG_CHKTHIS(OTableFieldDesc,NULL); @@ -141,7 +135,6 @@ OUString OTableFieldDesc::GetCriteria( sal_uInt16 nIdx ) const return aRetStr; } -// ----------------------------------------------------------------------------- namespace { struct SelectPropertyValueAsString : public ::std::unary_function< PropertyValue, OUString > @@ -155,7 +148,6 @@ namespace }; } -// ----------------------------------------------------------------------------- void OTableFieldDesc::Load( const ::com::sun::star::beans::PropertyValue& i_rSettings, const bool i_bIncludingCriteria ) { DBG_CHKTHIS(OTableFieldDesc,NULL); @@ -187,7 +179,7 @@ void OTableFieldDesc::Load( const ::com::sun::star::beans::PropertyValue& i_rSet ); } } -//------------------------------------------------------------------------------ + void OTableFieldDesc::Save( ::comphelper::NamedValueCollection& o_rSettings, const bool i_bIncludingCriteria ) { DBG_CHKTHIS(OTableFieldDesc,NULL); @@ -224,8 +216,5 @@ void OTableFieldDesc::Save( ::comphelper::NamedValueCollection& o_rSettings, con } } } -// ----------------------------------------------------------------------------- - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/TableFieldInfo.cxx b/dbaccess/source/ui/querydesign/TableFieldInfo.cxx index 69125694e348..9c608cfd4c7a 100644 --- a/dbaccess/source/ui/querydesign/TableFieldInfo.cxx +++ b/dbaccess/source/ui/querydesign/TableFieldInfo.cxx @@ -17,14 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "TableFieldInfo.hxx" #include <tools/debug.hxx> using namespace dbaui; -//================================================================== // class OTableFieldInfo -//================================================================== DBG_NAME(OTableFieldInfo) OTableFieldInfo::OTableFieldInfo() : @@ -34,13 +31,9 @@ OTableFieldInfo::OTableFieldInfo() : m_eFieldType = TAB_NORMAL_FIELD; } -//------------------------------------------------------------------------------ OTableFieldInfo::~OTableFieldInfo() { DBG_DTOR(OTableFieldInfo,NULL); } - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index 88e1cfcb69b9..c32d8319e385 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -60,11 +60,8 @@ using namespace ::com::sun::star::accessibility; #define TABWIN_WIDTH_MIN 90 #define TABWIN_HEIGHT_MIN 80 -//======================================================================== // class OTableWindow -//======================================================================== DBG_NAME(OTableWindow) -//------------------------------------------------------------------------------ OTableWindow::OTableWindow( Window* pParent, const TTableWindowData::value_type& pTabWinData ) : ::comphelper::OContainerListener(m_aMutex) ,Window( pParent, WB_3DLOOK|WB_MOVEABLE ) @@ -97,7 +94,6 @@ OTableWindow::OTableWindow( Window* pParent, const TTableWindowData::value_type& EnableClipSiblings(); } -//------------------------------------------------------------------------------ OTableWindow::~OTableWindow() { DBG_DTOR(OTableWindow,NULL); @@ -113,25 +109,25 @@ OTableWindow::~OTableWindow() m_pAccessible = NULL; } -// ----------------------------------------------------------------------------- + const OJoinTableView* OTableWindow::getTableView() const { OSL_ENSURE(static_cast<OJoinTableView*>(GetParent()),"No OJoinTableView!"); return static_cast<OJoinTableView*>(GetParent()); } -// ----------------------------------------------------------------------------- + OJoinTableView* OTableWindow::getTableView() { OSL_ENSURE(static_cast<OJoinTableView*>(GetParent()),"No OJoinTableView!"); return static_cast<OJoinTableView*>(GetParent()); } -// ----------------------------------------------------------------------------- + OJoinDesignView* OTableWindow::getDesignView() { OSL_ENSURE(static_cast<OJoinDesignView*>(GetParent()->GetParent()->GetParent()),"No OJoinDesignView!"); return static_cast<OJoinDesignView*>(GetParent()->GetParent()->GetParent()); } -//------------------------------------------------------------------------------ + void OTableWindow::SetPosPixel( const Point& rNewPos ) { Point aNewPosData = rNewPos + getTableView()->GetScrollOffset(); @@ -139,7 +135,6 @@ void OTableWindow::SetPosPixel( const Point& rNewPos ) Window::SetPosPixel( rNewPos ); } -//------------------------------------------------------------------------------ void OTableWindow::SetSizePixel( const Size& rNewSize ) { Size aOutSize(rNewSize); @@ -151,19 +146,18 @@ void OTableWindow::SetSizePixel( const Size& rNewSize ) GetData()->SetSize( aOutSize ); Window::SetSizePixel( aOutSize ); } -//------------------------------------------------------------------------------ + void OTableWindow::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) { SetPosPixel( rNewPos ); SetSizePixel( rNewSize ); } -//------------------------------------------------------------------------------ + OTableWindowListBox* OTableWindow::CreateListBox() { return new OTableWindowListBox(this); } -//------------------------------------------------------------------------------ sal_Bool OTableWindow::FillListBox() { m_pListBox->Clear(); @@ -225,18 +219,18 @@ sal_Bool OTableWindow::FillListBox() return sal_True; } -// ----------------------------------------------------------------------------- + void* OTableWindow::createUserData(const Reference< XPropertySet>& /*_xColumn*/,bool /*_bPrimaryKey*/) { return NULL; } -// ----------------------------------------------------------------------------- + void OTableWindow::deleteUserData(void*& _pUserData) { OSL_ENSURE(!_pUserData,"INVALID call. Need to delete the userclass!"); _pUserData = NULL; } -//------------------------------------------------------------------------------ + void OTableWindow::clearListBox() { if ( m_pListBox ) @@ -254,7 +248,6 @@ void OTableWindow::clearListBox() } } -//------------------------------------------------------------------------------ void OTableWindow::impl_updateImage() { ImageProvider aImageProvider( getDesignView()->getController().getConnection() ); @@ -272,7 +265,6 @@ void OTableWindow::impl_updateImage() m_aTypeImage.Show(); } -//------------------------------------------------------------------------------ sal_Bool OTableWindow::Init() { // create list box if necessary @@ -299,7 +291,7 @@ sal_Bool OTableWindow::Init() return bSuccess; } -//------------------------------------------------------------------------------ + void OTableWindow::DataChanged(const DataChangedEvent& rDCEvt) { if (rDCEvt.GetType() == DATACHANGED_SETTINGS) @@ -311,7 +303,7 @@ void OTableWindow::DataChanged(const DataChangedEvent& rDCEvt) SetTextColor(aSystemStyle.GetButtonTextColor()); } } -//------------------------------------------------------------------------------ + void OTableWindow::Paint( const Rectangle& rRect ) { Rectangle aRect( Point(0,0), GetOutputSizePixel() ); @@ -319,7 +311,6 @@ void OTableWindow::Paint( const Rectangle& rRect ) Draw3DBorder( aRect ); } -//------------------------------------------------------------------------------ void OTableWindow::Draw3DBorder(const Rectangle& rRect) { // Use the System Style-Settings for my colours @@ -341,7 +332,7 @@ void OTableWindow::Draw3DBorder(const Rectangle& rRect) DrawLine( rRect.BottomLeft()+Point(1,-2), rRect.TopLeft() + aEHvector ); DrawLine( rRect.TopLeft() + aEHvector, rRect.TopRight()+Point(-2,1) ); } -// ----------------------------------------------------------------------------- + Rectangle OTableWindow::getSizingRect(const Point& _rPos,const Size& _rOutputSize) const { Rectangle aSizingRect = Rectangle( GetPosPixel(), GetSizePixel() ); @@ -363,7 +354,6 @@ Rectangle OTableWindow::getSizingRect(const Point& _rPos,const Size& _rOutputSiz aSizingRect.Bottom() = _rPos.Y(); } - if( nSizingFlags & SIZING_RIGHT ) { if( _rPos.X() > _rOutputSize.Width() ) @@ -381,11 +371,10 @@ Rectangle OTableWindow::getSizingRect(const Point& _rPos,const Size& _rOutputSiz } return aSizingRect; } -// ----------------------------------------------------------------------------- + void OTableWindow::setSizingFlag(const Point& _rPos) { Size aOutSize = GetOutputSizePixel(); - ////////////////////////////////////////////////////////////////////// // Set the flags when the mouse cursor is in the sizing area m_nSizingFlags = SIZING_NONE; @@ -401,7 +390,7 @@ void OTableWindow::setSizingFlag(const Point& _rPos) if( _rPos.Y() > aOutSize.Height()-TABWIN_SIZING_AREA ) m_nSizingFlags |= SIZING_BOTTOM; } -//------------------------------------------------------------------------------ + void OTableWindow::MouseMove( const MouseEvent& rEvt ) { Window::MouseMove(rEvt); @@ -414,8 +403,6 @@ void OTableWindow::MouseMove( const MouseEvent& rEvt ) setSizingFlag(aPos); Pointer aPointer; - - ////////////////////////////////////////////////////////////////////// // Set the mouse cursor when it is in the sizing area switch( m_nSizingFlags ) { @@ -443,10 +430,8 @@ void OTableWindow::MouseMove( const MouseEvent& rEvt ) SetPointer( aPointer ); } -//------------------------------------------------------------------------------ void OTableWindow::MouseButtonDown( const MouseEvent& rEvt ) { - ////////////////////////////////////////////////////////////////////// // When resizing, the parent must be informed that // the window size of its child has changed if( m_nSizingFlags ) @@ -455,19 +440,14 @@ void OTableWindow::MouseButtonDown( const MouseEvent& rEvt ) Window::MouseButtonDown( rEvt ); } - - -//------------------------------------------------------------------------------ void OTableWindow::Resize() { - ////////////////////////////////////////////////////////////////////// // The window must not disappear so we enforce a minimum size Size aOutSize = GetOutputSizePixel(); aOutSize = Size(CalcZoom(aOutSize.Width()),CalcZoom(aOutSize.Height())); long nTitleHeight = CalcZoom( GetTextHeight() )+ CalcZoom( 4 ); - ////////////////////////////////////////////////////////////////////// // Set the title and ListBox long n5Pos = CalcZoom(5); long nPositionX = n5Pos; @@ -494,7 +474,6 @@ void OTableWindow::Resize() Window::Invalidate(); } -//------------------------------------------------------------------------------ void OTableWindow::SetBoldTitle( sal_Bool bBold ) { Font aFont = m_aTitle.GetFont(); @@ -503,7 +482,6 @@ void OTableWindow::SetBoldTitle( sal_Bool bBold ) m_aTitle.Invalidate(); } -//------------------------------------------------------------------------------ void OTableWindow::GetFocus() { Window::GetFocus(); @@ -511,7 +489,7 @@ void OTableWindow::GetFocus() if(m_pListBox) m_pListBox->GrabFocus(); } -// ----------------------------------------------------------------------------- + void OTableWindow::setActive(sal_Bool _bActive) { SetBoldTitle( _bActive ); @@ -520,16 +498,14 @@ void OTableWindow::setActive(sal_Bool _bActive) m_pListBox->SelectAll(sal_False); } -//------------------------------------------------------------------------------ void OTableWindow::Remove() { - ////////////////////////////////////////////////////////////////// // Delete the window OJoinTableView* pTabWinCont = getTableView(); pTabWinCont->RemoveTabWin( this ); pTabWinCont->Invalidate(); } -//------------------------------------------------------------------------------ + sal_Bool OTableWindow::HandleKeyInput( const KeyEvent& rEvt ) { const KeyCode& rCode = rEvt.GetKeyCode(); @@ -547,12 +523,11 @@ sal_Bool OTableWindow::HandleKeyInput( const KeyEvent& rEvt ) return bHandle; } -//------------------------------------------------------------------------------ sal_Bool OTableWindow::ExistsAConn() const { return getTableView()->ExistsAConn(this); } -//------------------------------------------------------------------------------ + void OTableWindow::EnumValidFields(::std::vector< OUString>& arrstrFields) { arrstrFields.clear(); @@ -568,7 +543,7 @@ void OTableWindow::EnumValidFields(::std::vector< OUString>& arrstrFields) } } } -// ----------------------------------------------------------------------------- + void OTableWindow::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); @@ -588,14 +563,14 @@ void OTableWindow::StateChanged( StateChangedType nType ) Invalidate(); } } -// ----------------------------------------------------------------------------- + Reference< XAccessible > OTableWindow::CreateAccessible() { OTableWindowAccess* pAccessible = new OTableWindowAccess(this); m_pAccessible = pAccessible; return pAccessible; } -// ----------------------------------------------------------------------------- + void OTableWindow::Command(const CommandEvent& rEvt) { switch (rEvt.GetCommand()) @@ -631,7 +606,7 @@ void OTableWindow::Command(const CommandEvent& rEvt) Window::Command(rEvt); } } -// ----------------------------------------------------------------------------- + long OTableWindow::PreNotify(NotifyEvent& rNEvt) { sal_Bool bHandled = sal_False; @@ -764,26 +739,25 @@ long OTableWindow::PreNotify(NotifyEvent& rNEvt) return Window::PreNotify(rNEvt); return 1L; } -// ----------------------------------------------------------------------------- + String OTableWindow::getTitle() const { return m_aTitle.GetText(); } -// ----------------------------------------------------------------------------- + void OTableWindow::_elementInserted( const container::ContainerEvent& /*_rEvent*/ ) throw(::com::sun::star::uno::RuntimeException) { FillListBox(); } -// ----------------------------------------------------------------------------- + void OTableWindow::_elementRemoved( const container::ContainerEvent& /*_rEvent*/ ) throw(::com::sun::star::uno::RuntimeException) { FillListBox(); } -// ----------------------------------------------------------------------------- + void OTableWindow::_elementReplaced( const container::ContainerEvent& /*_rEvent*/ ) throw(::com::sun::star::uno::RuntimeException) { FillListBox(); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx index 92fa870682c7..c2c497973f8a 100644 --- a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx @@ -31,7 +31,6 @@ #include <comphelper/sequence.hxx> #include "dbu_qry.hrc" - namespace dbaui { using namespace ::com::sun::star::accessibility; @@ -45,13 +44,11 @@ namespace dbaui ,m_pTable(_pTable) { } - // ----------------------------------------------------------------------------- void SAL_CALL OTableWindowAccess::disposing() { m_pTable = NULL; VCLXAccessibleComponent::disposing(); } - // ----------------------------------------------------------------------------- void OTableWindowAccess::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { if ( rVclWindowEvent.GetId() == VCLEVENT_OBJECT_DYING ) @@ -62,28 +59,23 @@ namespace dbaui VCLXAccessibleComponent::ProcessWindowEvent( rVclWindowEvent ); } - // ----------------------------------------------------------------------------- Any SAL_CALL OTableWindowAccess::queryInterface( const Type& aType ) throw (RuntimeException) { Any aRet(VCLXAccessibleComponent::queryInterface( aType )); return aRet.hasValue() ? aRet : OTableWindowAccess_BASE::queryInterface( aType ); } - // ----------------------------------------------------------------------------- Sequence< Type > SAL_CALL OTableWindowAccess::getTypes( ) throw (RuntimeException) { return ::comphelper::concatSequences(VCLXAccessibleComponent::getTypes(),OTableWindowAccess_BASE::getTypes()); } - // ----------------------------------------------------------------------------- OUString SAL_CALL OTableWindowAccess::getImplementationName() throw(RuntimeException) { return getImplementationName_Static(); } - // ----------------------------------------------------------------------------- Sequence< OUString > SAL_CALL OTableWindowAccess::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); } - // ----------------------------------------------------------------------------- // XServiceInfo - static methods Sequence< OUString > OTableWindowAccess::getSupportedServiceNames_Static(void) throw( RuntimeException ) { @@ -92,12 +84,10 @@ namespace dbaui aSupported[1] = OUString("com.sun.star.accessibility.AccessibleContext"); return aSupported; } - // ----------------------------------------------------------------------------- OUString OTableWindowAccess::getImplementationName_Static(void) throw( RuntimeException ) { return OUString("org.openoffice.comp.dbu.TableWindowAccessibility"); } - // ----------------------------------------------------------------------------- // XAccessibleContext sal_Int32 SAL_CALL OTableWindowAccess::getAccessibleChildCount( ) throw (RuntimeException) { @@ -112,7 +102,6 @@ namespace dbaui } return nCount; } - // ----------------------------------------------------------------------------- Reference< XAccessible > SAL_CALL OTableWindowAccess::getAccessibleChild( sal_Int32 i ) throw (IndexOutOfBoundsException,RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -137,7 +126,6 @@ namespace dbaui } return aRet; } - // ----------------------------------------------------------------------------- sal_Int32 SAL_CALL OTableWindowAccess::getAccessibleIndexInParent( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -154,18 +142,15 @@ namespace dbaui } return nIndex; } - // ----------------------------------------------------------------------------- sal_Int16 SAL_CALL OTableWindowAccess::getAccessibleRole( ) throw (RuntimeException) { return AccessibleRole::PANEL; // ? or may be an AccessibleRole::WINDOW } - // ----------------------------------------------------------------------------- Reference< XAccessibleRelationSet > SAL_CALL OTableWindowAccess::getAccessibleRelationSet( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return this; } - // ----------------------------------------------------------------------------- // XAccessibleComponent Reference< XAccessible > SAL_CALL OTableWindowAccess::getAccessibleAtPoint( const awt::Point& _aPoint ) throw (RuntimeException) { @@ -182,7 +167,6 @@ namespace dbaui } return aRet; } - // ----------------------------------------------------------------------------- Reference< XAccessible > OTableWindowAccess::getParentChild(sal_Int32 _nIndex) { Reference< XAccessible > xReturn; @@ -197,14 +181,12 @@ namespace dbaui } return xReturn; } - // ----------------------------------------------------------------------------- sal_Int32 SAL_CALL OTableWindowAccess::getRelationCount( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return m_pTable ? m_pTable->getTableView()->getConnectionCount(m_pTable) : sal_Int32(0); } - // ----------------------------------------------------------------------------- AccessibleRelation SAL_CALL OTableWindowAccess::getRelation( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -222,14 +204,12 @@ namespace dbaui } return aRet; } - // ----------------------------------------------------------------------------- sal_Bool SAL_CALL OTableWindowAccess::containsRelation( sal_Int16 aRelationType ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return AccessibleRelationType::CONTROLLER_FOR == aRelationType && m_pTable && m_pTable->getTableView()->ExistsAConn(m_pTable); } - // ----------------------------------------------------------------------------- AccessibleRelation SAL_CALL OTableWindowAccess::getRelationByType( sal_Int16 aRelationType ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -255,17 +235,14 @@ namespace dbaui } return AccessibleRelation(); } - // ----------------------------------------------------------------------------- sal_Bool OTableWindowAccess::isEditable() const { return m_pTable && !m_pTable->getTableView()->getDesignView()->getController().isReadOnly(); } - // ----------------------------------------------------------------------------- OUString SAL_CALL OTableWindowAccess::getTitledBorderText( ) throw (RuntimeException) { return getAccessibleName( ); } - // ----------------------------------------------------------------------------- OUString SAL_CALL OTableWindowAccess::getAccessibleName( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -274,14 +251,11 @@ namespace dbaui sAccessibleName = m_pTable->getTitle(); return sAccessibleName; } - // ----------------------------------------------------------------------------- Reference< XAccessibleContext > SAL_CALL OTableWindowAccess::getAccessibleContext( ) throw (::com::sun::star::uno::RuntimeException) { return this; } - // ----------------------------------------------------------------------------- } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/TableWindowData.cxx b/dbaccess/source/ui/querydesign/TableWindowData.cxx index 90155ca00110..df5168f5a045 100644 --- a/dbaccess/source/ui/querydesign/TableWindowData.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowData.cxx @@ -35,11 +35,8 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; -//================================================================== // class OTableWindowData -//================================================================== DBG_NAME(OTableWindowData) -//------------------------------------------------------------------------------ OTableWindowData::OTableWindowData( const Reference< XPropertySet>& _xTable ,const OUString& _rComposedName ,const OUString& rTableName @@ -61,7 +58,6 @@ OTableWindowData::OTableWindowData( const Reference< XPropertySet>& _xTable listen(); } -//------------------------------------------------------------------------------ OTableWindowData::~OTableWindowData() { DBG_DTOR(OTableWindowData,NULL); @@ -70,18 +66,16 @@ OTableWindowData::~OTableWindowData() stopComponentListening( xComponent ); } -//------------------------------------------------------------------------------ sal_Bool OTableWindowData::HasPosition() const { return ( (m_aPosition.X() != -1) && (m_aPosition.Y() != -1) ); } -//------------------------------------------------------------------------------ sal_Bool OTableWindowData::HasSize() const { return ( (m_aSize.Width() != -1) && (m_aSize.Height() !=-1) ); } -// ----------------------------------------------------------------------------- + void OTableWindowData::_disposing( const ::com::sun::star::lang::EventObject& /*_rSource*/ ) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -90,7 +84,7 @@ void OTableWindowData::_disposing( const ::com::sun::star::lang::EventObject& /* m_xKeys.clear(); m_xTable.clear(); } -// ----------------------------------------------------------------------------- + bool OTableWindowData::init(const Reference< XConnection >& _xConnection,bool _bAllowQueries) { OSL_ENSURE(!m_xTable.is(),"We are already connected to a table!"); @@ -120,7 +114,7 @@ bool OTableWindowData::init(const Reference< XConnection >& _xConnection,bool _ Reference< XIndexAccess > xColumnsAsIndex( m_xColumns,UNO_QUERY ); return xColumnsAsIndex.is() && ( xColumnsAsIndex->getCount() > 0 ); } -// ----------------------------------------------------------------------------- + void OTableWindowData::listen() { if ( m_xTable.is() ) @@ -140,6 +134,5 @@ void OTableWindowData::listen() m_xKeys = xKeySup->getKeys(); } } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx index 9f4e3cce3064..6e718abe5015 100644 --- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx @@ -39,11 +39,8 @@ OJoinExchangeData::OJoinExchangeData(OTableWindowListBox* pBox) const sal_uLong SCROLLING_TIMESPAN = 500; const long LISTBOX_SCROLLING_AREA = 6; -//================================================================== // class OTableWindowListBox -//================================================================== DBG_NAME(OTableWindowListBox) -//------------------------------------------------------------------------------ OTableWindowListBox::OTableWindowListBox( OTableWindow* pParent ) :SvTreeListBox( pParent, WB_HASBUTTONS | WB_BORDER) ,m_aMousePos( Point(0,0) ) @@ -61,7 +58,6 @@ OTableWindowListBox::OTableWindowListBox( OTableWindow* pParent ) SetHighlightRange( ); } -//------------------------------------------------------------------------------ void OTableWindowListBox::dragFinished( ) { // first show the error msg when existing @@ -72,7 +68,6 @@ void OTableWindowListBox::dragFinished( ) m_nUiEvent = Application::PostUserEvent(LINK(this, OTableWindowListBox, LookForUiHdl)); } -//------------------------------------------------------------------------------ OTableWindowListBox::~OTableWindowListBox() { DBG_DTOR(OTableWindowListBox,NULL); @@ -85,10 +80,8 @@ OTableWindowListBox::~OTableWindowListBox() m_pTabWin = NULL; } -//------------------------------------------------------------------------------ SvTreeListEntry* OTableWindowListBox::GetEntryFromText( const String& rEntryText ) { - ////////////////////////////////////////////////////////////////////// // iterate through the list SvTreeList* pTreeList = GetModel(); SvTreeListEntry* pEntry = pTreeList->First(); @@ -121,13 +114,11 @@ SvTreeListEntry* OTableWindowListBox::GetEntryFromText( const String& rEntryText return NULL; } -//------------------------------------------------------------------------------ void OTableWindowListBox::NotifyScrolled() { m_bReallyScrolled = sal_True; } -//------------------------------------------------------------------------------ void OTableWindowListBox::NotifyEndScroll() { if (m_bReallyScrolled) @@ -139,7 +130,6 @@ void OTableWindowListBox::NotifyEndScroll() m_bReallyScrolled = sal_False; } -//------------------------------------------------------------------------------ long OTableWindowListBox::PreNotify(NotifyEvent& rNEvt) { sal_Bool bHandled = sal_False; @@ -172,7 +162,6 @@ long OTableWindowListBox::PreNotify(NotifyEvent& rNEvt) return 1L; } -//------------------------------------------------------------------------------ IMPL_LINK( OTableWindowListBox, ScrollUpHdl, SvTreeListBox*, /*pBox*/ ) { SvTreeListEntry* pEntry = GetEntry( m_aMousePos ); @@ -189,7 +178,6 @@ IMPL_LINK( OTableWindowListBox, ScrollUpHdl, SvTreeListBox*, /*pBox*/ ) return 0; } -//------------------------------------------------------------------------------ IMPL_LINK( OTableWindowListBox, ScrollDownHdl, SvTreeListBox*, /*pBox*/ ) { SvTreeListEntry* pEntry = GetEntry( m_aMousePos ); @@ -206,7 +194,6 @@ IMPL_LINK( OTableWindowListBox, ScrollDownHdl, SvTreeListBox*, /*pBox*/ ) return 0; } -//------------------------------------------------------------------------------ void OTableWindowListBox::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPixel*/ ) { OJoinTableView* pCont = m_pTabWin->getTableView(); @@ -224,7 +211,6 @@ void OTableWindowListBox::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPi } } -//------------------------------------------------------------------------------ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt ) { sal_Int8 nDND_Action = DND_ACTION_NONE; @@ -287,16 +273,14 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt ) } return nDND_Action; } -// ----------------------------------------------------------------------------- -//------------------------------------------------------------------------------ IMPL_LINK( OTableWindowListBox, LookForUiHdl, void *, /*EMPTY_ARG*/) { m_nUiEvent = 0; m_pTabWin->getTableView()->lookForUiActivities(); return 0L; } -//------------------------------------------------------------------------------ + IMPL_LINK( OTableWindowListBox, DropHdl, void *, /*EMPTY_ARG*/) { // create the connection @@ -315,7 +299,7 @@ IMPL_LINK( OTableWindowListBox, DropHdl, void *, /*EMPTY_ARG*/) } return 0L; } -//------------------------------------------------------------------------------ + sal_Int8 OTableWindowListBox::ExecuteDrop( const ExecuteDropEvent& _rEvt ) { TransferableDataHelper aDropped(_rEvt.maDropEvent.Transferable); @@ -333,7 +317,6 @@ sal_Int8 OTableWindowListBox::ExecuteDrop( const ExecuteDropEvent& _rEvt ) return DND_ACTION_NONE; } -//------------------------------------------------------------------------------ void OTableWindowListBox::LoseFocus() { if(m_pTabWin) @@ -341,7 +324,6 @@ void OTableWindowListBox::LoseFocus() SvTreeListBox::LoseFocus(); } -//------------------------------------------------------------------------------ void OTableWindowListBox::GetFocus() { if(m_pTabWin) @@ -361,7 +343,6 @@ void OTableWindowListBox::GetFocus() SvTreeListBox::GetFocus(); } -//------------------------------------------------------------------------------ IMPL_LINK( OTableWindowListBox, OnDoubleClick, SvTreeListBox *, /*pBox*/ ) { // tell my parent @@ -372,7 +353,7 @@ IMPL_LINK( OTableWindowListBox, OnDoubleClick, SvTreeListBox *, /*pBox*/ ) return 0; } -// ----------------------------------------------------------------------------- + void OTableWindowListBox::Command(const CommandEvent& rEvt) { switch (rEvt.GetCommand()) @@ -386,6 +367,5 @@ void OTableWindowListBox::Command(const CommandEvent& rEvt) SvTreeListBox::Command(rEvt); } } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx index 6acc2851a60e..da3caaa4604e 100644 --- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx @@ -37,11 +37,8 @@ using namespace dbaui; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::uno; -//================================================================== // class OTableWindowTitle -//================================================================== DBG_NAME(OTableWindowTitle) -//------------------------------------------------------------------------------ OTableWindowTitle::OTableWindowTitle( OTableWindow* pParent ) : FixedText( pParent, WB_3DLOOK|WB_LEFT|WB_NOLABEL|WB_VCENTER ) ,m_pTabWin( pParent ) @@ -57,26 +54,23 @@ OTableWindowTitle::OTableWindowTitle( OTableWindow* pParent ) : SetFont( aFont ); } -//------------------------------------------------------------------------------ OTableWindowTitle::~OTableWindowTitle() { DBG_DTOR(OTableWindowTitle,NULL); m_pTabWin = NULL; } -//------------------------------------------------------------------------------ void OTableWindowTitle::GetFocus() { if(m_pTabWin) m_pTabWin->GetFocus(); } -//------------------------------------------------------------------------------ void OTableWindowTitle::LoseFocus() { m_pTabWin->LoseFocus(); } -//------------------------------------------------------------------------------ + void OTableWindowTitle::RequestHelp( const HelpEvent& rHEvt ) { if(m_pTabWin) @@ -101,7 +95,6 @@ void OTableWindowTitle::RequestHelp( const HelpEvent& rHEvt ) } } -//------------------------------------------------------------------------------ void OTableWindowTitle::Command( const CommandEvent& rEvt ) { switch( rEvt.GetCommand() ) @@ -117,14 +110,12 @@ void OTableWindowTitle::Command( const CommandEvent& rEvt ) } } -//------------------------------------------------------------------------------ void OTableWindowTitle::KeyInput( const KeyEvent& rEvt ) { if ( m_pTabWin ) m_pTabWin->KeyInput( rEvt ); } -//------------------------------------------------------------------------------ void OTableWindowTitle::MouseButtonDown( const MouseEvent& rEvt ) { if( rEvt.IsLeft() ) @@ -165,8 +156,6 @@ void OTableWindowTitle::MouseButtonDown( const MouseEvent& rEvt ) Control::MouseButtonDown( rEvt ); } - -//------------------------------------------------------------------------------ void OTableWindowTitle::DataChanged(const DataChangedEvent& rDCEvt) { if (rDCEvt.GetType() == DATACHANGED_SETTINGS) @@ -177,7 +166,7 @@ void OTableWindowTitle::DataChanged(const DataChangedEvent& rDCEvt) SetTextColor(aSystemStyle.GetButtonTextColor()); } } -// ----------------------------------------------------------------------------- + void OTableWindowTitle::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx index a99e407dabaf..8cc0b6e8470a 100644 --- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx +++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "querycontainerwindow.hxx" #include "QueryDesignView.hxx" #include <tools/debug.hxx> @@ -32,19 +31,15 @@ #include <com/sun/star/frame/Frame.hpp> #include <com/sun/star/util/XCloseable.hpp> -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::beans; - //===================================================================== - //= OQueryContainerWindow - //===================================================================== + // OQueryContainerWindow DBG_NAME(OQueryContainerWindow) OQueryContainerWindow::OQueryContainerWindow(Window* pParent, OQueryController& _rController,const Reference< XComponentContext >& _rxContext) :ODataView( pParent, _rController, _rxContext ) @@ -59,7 +54,6 @@ namespace dbaui m_pSplitter->SetSplitHdl( LINK( this, OQueryContainerWindow, SplitHdl ) ); m_pSplitter->SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetDialogColor() ) ); } - // ----------------------------------------------------------------------------- OQueryContainerWindow::~OQueryContainerWindow() { DBG_DTOR(OQueryContainerWindow,NULL); @@ -82,19 +76,16 @@ namespace dbaui m_pSplitter = NULL; } - // ----------------------------------------------------------------------------- bool OQueryContainerWindow::switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo ) { return m_pViewSwitch->switchView( _pErrorInfo ); } - // ----------------------------------------------------------------------------- void OQueryContainerWindow::forceInitialView() { return m_pViewSwitch->forceInitialView(); } - // ----------------------------------------------------------------------------- void OQueryContainerWindow::resizeAll( const Rectangle& _rPlayground ) { Rectangle aPlayground( _rPlayground ); @@ -127,7 +118,6 @@ namespace dbaui ODataView::resizeAll( aPlayground ); } - // ----------------------------------------------------------------------------- void OQueryContainerWindow::resizeDocumentView( Rectangle& _rPlayground ) { m_pViewSwitch->SetPosSizePixel( _rPlayground.TopLeft(), Size( _rPlayground.GetWidth(), _rPlayground.GetHeight() ) ); @@ -135,14 +125,12 @@ namespace dbaui ODataView::resizeDocumentView( _rPlayground ); } - // ----------------------------------------------------------------------------- void OQueryContainerWindow::GetFocus() { ODataView::GetFocus(); if(m_pViewSwitch) m_pViewSwitch->GrabFocus(); } - // ----------------------------------------------------------------------------- IMPL_LINK( OQueryContainerWindow, SplitHdl, void*, /*p*/ ) { m_pSplitter->SetPosPixel( Point( m_pSplitter->GetPosPixel().X(),m_pSplitter->GetSplitPosPixel() ) ); @@ -151,13 +139,11 @@ namespace dbaui return 0L; } - // ----------------------------------------------------------------------------- void OQueryContainerWindow::Construct() { m_pViewSwitch->Construct(); } - // ----------------------------------------------------------------------------- void OQueryContainerWindow::disposingPreview() { if ( m_pBeamer ) @@ -170,7 +156,6 @@ namespace dbaui Resize(); } } - // ----------------------------------------------------------------------------- long OQueryContainerWindow::PreNotify( NotifyEvent& rNEvt ) { sal_Bool bHandled = sal_False; @@ -187,7 +172,6 @@ namespace dbaui } return bHandled ? 1L : ODataView::PreNotify(rNEvt); } - // ----------------------------------------------------------------------------- void OQueryContainerWindow::showPreview(const Reference<XFrame>& _xFrame) { if(!m_pBeamer) @@ -239,12 +223,7 @@ namespace dbaui Resize(); } } - // ----------------------------------------------------------------------------- - -//......................................................................... } // namespace dbaui -//......................................................................... - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index c4d0b3cbf1e6..ca88cc47ca43 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -90,6 +90,7 @@ extern "C" void SAL_CALL createRegistryInfo_OQueryControl() { static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OQueryController > aAutoRegistration; } + namespace dbaui { using namespace ::com::sun::star::uno; @@ -100,12 +101,10 @@ namespace dbaui class OViewController : public OQueryController { - //------------------------------------------------------------------------------ virtual OUString SAL_CALL getImplementationName() throw( RuntimeException ) { return getImplementationName_Static(); } - //------------------------------------------------------------------------- virtual Sequence< OUString> SAL_CALL getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); @@ -130,6 +129,7 @@ namespace dbaui } }; } + extern "C" void SAL_CALL createRegistryInfo_OViewControl() { static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OViewController > aAutoRegistration; @@ -141,7 +141,6 @@ namespace dbaui #if OSL_DEBUG_LEVEL > 1 namespace { - // ----------------------------------------------------------------------------- void insertParseTree(SvTreeListBox* _pBox,::connectivity::OSQLParseNode* _pNode,SvTreeListEntry* _pParent = NULL) { OUString rString; @@ -151,7 +150,6 @@ namespace dbaui rString = "RULE_ID: " + OUString::number( (sal_Int32)_pNode->getRuleID() ) + "(" + OSQLParser::RuleIDToStr(_pNode->getRuleID()) + ")"; - _pParent = _pBox->InsertEntry(rString,_pParent); // determine how much subtrees this node has @@ -223,7 +221,6 @@ namespace dbaui namespace { - // ----------------------------------------------------------------------------- String lcl_getObjectResourceString( sal_uInt16 _nResId, sal_Int32 _nCommandType ) { String sMessageText = String( ModuleRes( _nResId ) ); @@ -301,36 +298,34 @@ namespace } } -//------------------------------------------------------------------------------ OUString SAL_CALL OQueryController::getImplementationName() throw( RuntimeException ) { return getImplementationName_Static(); } -//------------------------------------------------------------------------------ OUString OQueryController::getImplementationName_Static() throw( RuntimeException ) { return OUString("org.openoffice.comp.dbu.OQueryDesign"); } -//------------------------------------------------------------------------------ + Sequence< OUString> OQueryController::getSupportedServiceNames_Static(void) throw( RuntimeException ) { Sequence< OUString> aSupported(1); aSupported.getArray()[0] = "com.sun.star.sdb.QueryDesign"; return aSupported; } -//------------------------------------------------------------------------- + Sequence< OUString> SAL_CALL OQueryController::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL OQueryController::Create(const Reference<XMultiServiceFactory >& _rxFactory) { return *(new OQueryController(comphelper::getComponentContext(_rxFactory))); } + DBG_NAME(OQueryController); -// ----------------------------------------------------------------------------- OQueryController::OQueryController(const Reference< XComponentContext >& _rM) :OJoinController(_rM) ,OQueryController_PBase( getBroadcastHelper() ) @@ -357,7 +352,6 @@ OQueryController::OQueryController(const Reference< XComponentContext >& _rM) &m_bEscapeProcessing, ::getCppuType( &m_bEscapeProcessing ) ); } -// ----------------------------------------------------------------------------- OQueryController::~OQueryController() { DBG_DTOR(OQueryController,NULL); @@ -373,26 +367,22 @@ OQueryController::~OQueryController() IMPLEMENT_FORWARD_XINTERFACE2( OQueryController, OJoinController, OQueryController_PBase ) IMPLEMENT_FORWARD_XTYPEPROVIDER2( OQueryController, OJoinController, OQueryController_PBase ) -//------------------------------------------------------------------------- Reference< XPropertySetInfo > SAL_CALL OQueryController::getPropertySetInfo() throw(RuntimeException) { Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); return xInfo; } -//------------------------------------------------------------------------- sal_Bool SAL_CALL OQueryController::convertFastPropertyValue( Any& o_rConvertedValue, Any& o_rOldValue, sal_Int32 i_nHandle, const Any& i_rValue ) throw (IllegalArgumentException) { return OPropertyContainer::convertFastPropertyValue( o_rConvertedValue, o_rOldValue, i_nHandle, i_rValue ); } -//------------------------------------------------------------------------- void SAL_CALL OQueryController::setFastPropertyValue_NoBroadcast( sal_Int32 i_nHandle, const Any& i_rValue ) throw ( Exception ) { OPropertyContainer::setFastPropertyValue_NoBroadcast( i_nHandle, i_rValue ); } -//------------------------------------------------------------------------- void SAL_CALL OQueryController::getFastPropertyValue( Any& o_rValue, sal_Int32 i_nHandle ) const { switch ( i_nHandle ) @@ -424,13 +414,11 @@ void SAL_CALL OQueryController::getFastPropertyValue( Any& o_rValue, sal_Int32 i } } -//------------------------------------------------------------------------- ::cppu::IPropertyArrayHelper& OQueryController::getInfoHelper() { return *const_cast< OQueryController* >( this )->getArrayHelper(); } -//-------------------------------------------------------------------- ::cppu::IPropertyArrayHelper* OQueryController::createArrayHelper( ) const { Sequence< Property > aProps; @@ -455,7 +443,6 @@ void SAL_CALL OQueryController::getFastPropertyValue( Any& o_rValue, sal_Int32 i return new ::cppu::OPropertyArrayHelper(aProps); } -// ----------------------------------------------------------------------------- void OQueryController::deleteIterator() { if(m_pSqlIterator) @@ -466,7 +453,7 @@ void OQueryController::deleteIterator() m_pSqlIterator = NULL; } } -// ----------------------------------------------------------------------------- + void OQueryController::disposing() { OQueryController_PBase::disposing(); @@ -482,12 +469,12 @@ void OQueryController::disposing() OJoinController::disposing(); OQueryController_PBase::disposing(); } -// ----------------------------------------------------------------------------- + void OQueryController::clearFields() { OTableFields().swap(m_vTableFieldDesc); } -// ----------------------------------------------------------------------------- + FeatureState OQueryController::GetState(sal_uInt16 _nId) const { FeatureState aReturn; @@ -580,7 +567,7 @@ FeatureState OQueryController::GetState(sal_uInt16 _nId) const } return aReturn; } -// ----------------------------------------------------------------------------- + void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& aArgs) { switch(_nId) @@ -829,7 +816,6 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& InvalidateFeature(_nId); } -// ----------------------------------------------------------------------------- void OQueryController::impl_showAutoSQLViewError( const ::com::sun::star::uno::Any& _rErrorDetails ) { SQLContext aErrorContext; @@ -840,7 +826,6 @@ void OQueryController::impl_showAutoSQLViewError( const ::com::sun::star::uno::A showError( aErrorContext ); } -// ----------------------------------------------------------------------------- bool OQueryController::impl_setViewMode( ::dbtools::SQLExceptionInfo* _pErrorInfo ) { OSL_PRECOND( getContainer(), "OQueryController::impl_setViewMode: illegal call!" ); @@ -870,7 +855,6 @@ bool OQueryController::impl_setViewMode( ::dbtools::SQLExceptionInfo* _pErrorInf return bSuccess; } -// ----------------------------------------------------------------------------- void OQueryController::impl_initialize() { OJoinController::impl_initialize(); @@ -952,7 +936,6 @@ void OQueryController::impl_initialize() m_bGraphicalDesign = false; } - // ......................................................................... // . initial design bool bForceInitialDesign = false; Sequence< PropertyValue > aCurrentQueryDesignProps; @@ -1088,13 +1071,11 @@ void OQueryController::impl_initialize() } } -// ----------------------------------------------------------------------------- void OQueryController::onLoadedMenu(const Reference< ::com::sun::star::frame::XLayoutManager >& /*_xLayoutManager*/) { ensureToolbars( *this, m_bGraphicalDesign ); } -// ----------------------------------------------------------------------------- OUString OQueryController::getPrivateTitle( ) const { OUString sName = m_sName; @@ -1111,7 +1092,7 @@ OUString OQueryController::getPrivateTitle( ) const } return sName; } -// ----------------------------------------------------------------------------- + void OQueryController::setQueryComposer() { if(isConnected()) @@ -1136,7 +1117,7 @@ void OQueryController::setQueryComposer() } } } -// ----------------------------------------------------------------------------- + sal_Bool OQueryController::Construct(Window* pParent) { // TODO: we have to check if we should create the text- or the design- view @@ -1146,12 +1127,11 @@ sal_Bool OQueryController::Construct(Window* pParent) return OJoinController::Construct(pParent); } -// ----------------------------------------------------------------------------- OJoinDesignView* OQueryController::getJoinView() { return getContainer()->getDesignView(); } -// ----------------------------------------------------------------------------- + void OQueryController::describeSupportedFeatures() { OJoinController::describeSupportedFeatures(); @@ -1174,7 +1154,7 @@ void OQueryController::describeSupportedFeatures() implDescribeSupportedFeature( ".uno:DBMakeDisjunct", ID_EDIT_QUERY_DESIGN ); #endif } -// ----------------------------------------------------------------------------- + void OQueryController::impl_onModifyChanged() { OJoinController::impl_onModifyChanged(); @@ -1182,7 +1162,7 @@ void OQueryController::impl_onModifyChanged() InvalidateFeature(ID_BROWSER_SAVEASDOC); InvalidateFeature(ID_BROWSER_QUERY_EXECUTE); } -// ----------------------------------------------------------------------------- + void SAL_CALL OQueryController::disposing( const EventObject& Source ) throw(RuntimeException) { SolarMutexGuard aGuard; @@ -1202,7 +1182,7 @@ void SAL_CALL OQueryController::disposing( const EventObject& Source ) throw(Run OJoinController::disposing(Source); } -// ----------------------------------------------------------------------------- + void OQueryController::reconnect(sal_Bool _bUI) { deleteIterator(); @@ -1226,7 +1206,6 @@ void OQueryController::reconnect(sal_Bool _bUI) } } -// ----------------------------------------------------------------------------- void OQueryController::saveViewSettings( ::comphelper::NamedValueCollection& o_rViewSettings, const bool i_includingCriteria ) const { saveTableWindows( o_rViewSettings ); @@ -1252,7 +1231,7 @@ void OQueryController::saveViewSettings( ::comphelper::NamedValueCollection& o_r o_rViewSettings.put( "SplitterPosition", m_nSplitPos ); o_rViewSettings.put( "VisibleRows", m_nVisibleRows ); } -// ----------------------------------------------------------------------------- + void OQueryController::loadViewSettings( const ::comphelper::NamedValueCollection& o_rViewSettings ) { loadTableWindows( o_rViewSettings ); @@ -1261,7 +1240,7 @@ void OQueryController::loadViewSettings( const ::comphelper::NamedValueCollectio m_nVisibleRows = o_rViewSettings.getOrDefault( "VisibleRows", m_nVisibleRows ); m_aFieldInformation = o_rViewSettings.getOrDefault( "Fields", m_aFieldInformation ); } -// ----------------------------------------------------------------------------- + void OQueryController::execute_QueryPropDlg() { QueryPropertiesDialog aQueryPropDlg( @@ -1275,7 +1254,7 @@ void OQueryController::execute_QueryPropDlg() InvalidateFeature( SID_QUERY_LIMIT, 0, sal_True ); } } -// ----------------------------------------------------------------------------- + sal_Int32 OQueryController::getColWidth(sal_uInt16 _nColPos) const { if ( _nColPos < m_aFieldInformation.getLength() ) @@ -1286,7 +1265,7 @@ sal_Int32 OQueryController::getColWidth(sal_uInt16 _nColPos) const } return 0; } -// ----------------------------------------------------------------------------- + Reference<XNameAccess> OQueryController::getObjectContainer() const { Reference< XNameAccess > xElements; @@ -1313,7 +1292,6 @@ Reference<XNameAccess> OQueryController::getObjectContainer() const return xElements; } -// ----------------------------------------------------------------------------- void OQueryController::executeQuery() { // we don't need to check the connection here because we already check the composer @@ -1399,7 +1377,7 @@ void OQueryController::executeQuery() } } } -// ----------------------------------------------------------------------------- + sal_Bool OQueryController::askForNewName(const Reference<XNameAccess>& _xElements,sal_Bool _bSaveAs) { OSL_ENSURE( !editingCommand(), "OQueryController::askForNewName: not to be called when designing an independent statement!" ); @@ -1447,7 +1425,7 @@ sal_Bool OQueryController::askForNewName(const Reference<XNameAccess>& _xElement } return bRet; } -// ----------------------------------------------------------------------------- + bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs) { OSL_ENSURE(isEditable(),"Slot ID_BROWSER_SAVEDOC should not be enabled!"); @@ -1629,7 +1607,6 @@ bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs) return bSuccess; } -//----------------------------------------------------------------------------- namespace { struct CommentStrip @@ -1639,6 +1616,7 @@ struct CommentStrip CommentStrip( const OUString& rComment, bool bLastOnLine ) : maComment( rComment), mbLastOnLine( bLastOnLine) {} }; + } /** Obtain all comments in a query. @@ -1713,7 +1691,6 @@ static ::std::vector< CommentStrip > getComment( const OUString& rQuery ) } return aRet; } -//------------------------------------------------------------------------------ /** Concat/insert comments that were previously obtained with getComment(). @@ -1772,7 +1749,7 @@ static OUString concatComment( const OUString& rQuery, const ::std::vector< Comm } return aBuf.makeStringAndClear(); } -// ----------------------------------------------------------------------------- + OUString OQueryController::translateStatement( bool _bFireStatementChange ) { // now set the properties @@ -1817,7 +1794,7 @@ OUString OQueryController::translateStatement( bool _bFireStatementChange ) return sTranslatedStmt; } -// ----------------------------------------------------------------------------- + short OQueryController::saveModified() { SolarMutexGuard aSolarGuard; @@ -1845,7 +1822,7 @@ short OQueryController::saveModified() } return nRet; } -// ----------------------------------------------------------------------------- + void OQueryController::impl_reset( const bool i_bForceCurrentControllerSettings ) { bool bValid = false; @@ -1969,7 +1946,6 @@ void OQueryController::impl_reset( const bool i_bForceCurrentControllerSettings getContainer()->setNoneVisbleRow(m_nVisibleRows); } -// ----------------------------------------------------------------------------- void OQueryController::reset() { impl_reset(); @@ -1977,7 +1953,6 @@ void OQueryController::reset() ClearUndoManager(); } -// ----------------------------------------------------------------------------- void OQueryController::setStatement_fireEvent( const OUString& _rNewStatement, bool _bFireStatementChange ) { Any aOldValue = makeAny( m_sStatement ); @@ -1989,7 +1964,6 @@ void OQueryController::setStatement_fireEvent( const OUString& _rNewStatement, b fire( &nHandle, &aNewValue, &aOldValue, 1, sal_False ); } -// ----------------------------------------------------------------------------- void OQueryController::setEscapeProcessing_fireEvent( const sal_Bool _bEscapeProcessing ) { if ( _bEscapeProcessing == m_bEscapeProcessing ) @@ -2003,20 +1977,17 @@ void OQueryController::setEscapeProcessing_fireEvent( const sal_Bool _bEscapePro fire( &nHandle, &aNewValue, &aOldValue, 1, sal_False ); } -// ----------------------------------------------------------------------------- IMPL_LINK( OQueryController, OnExecuteAddTable, void*, /*pNotInterestedIn*/ ) { Execute( ID_BROWSER_ADDTABLE,Sequence<PropertyValue>() ); return 0L; } -// ----------------------------------------------------------------------------- bool OQueryController::allowViews() const { return true; } -// ----------------------------------------------------------------------------- bool OQueryController::allowQueries() const { OSL_ENSURE( getSdbMetaData().isConnected(), "OQueryController::allowQueries: illegal call!" ); @@ -2029,7 +2000,6 @@ bool OQueryController::allowQueries() const return !bCreatingView; } -// ----------------------------------------------------------------------------- Any SAL_CALL OQueryController::getViewData() throw( RuntimeException ) { ::osl::MutexGuard aGuard( getMutex() ); @@ -2041,14 +2011,12 @@ Any SAL_CALL OQueryController::getViewData() throw( RuntimeException ) return makeAny( aViewSettings.getPropertyValues() ); } -// ----------------------------------------------------------------------------- + void SAL_CALL OQueryController::restoreViewData(const Any& /*Data*/) throw( RuntimeException ) { // TODO } -// ----------------------------------------------------------------------------- } // namespace dbaui -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx index e382fda8f23f..3229a55daa63 100644 --- a/dbaccess/source/ui/querydesign/querydlg.cxx +++ b/dbaccess/source/ui/querydesign/querydlg.cxx @@ -47,6 +47,7 @@ public: OJoinControl(Window* _pParent,const ResId& _rResId); }; + OJoinControl::OJoinControl(Window* _pParent,const ResId& _rResId) : Window(_pParent,_rResId) ,aFL_Join( this, ResId( FL_JOIN,*_rResId.GetResMgr() ) ) @@ -56,9 +57,9 @@ OJoinControl::OJoinControl(Window* _pParent,const ResId& _rResId) { FreeResource(); } -// ----------------------------------------------------------------------------- + } // dbaui -// ----------------------------------------------------------------------------- + DBG_NAME(DlgQryJoin) DlgQryJoin::DlgQryJoin( OQueryTableView * pParent, const TTableConnectionData::value_type& _pData, @@ -81,7 +82,6 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent, DBG_CTOR(DlgQryJoin,NULL); aML_HelpText.SetControlBackground( GetSettings().GetStyleSettings().GetFaceColor() ); - ////////////////////////////////////////////////////////////////////// // Connection kopieren m_pConnData.reset(_pData->NewInstance()); m_pConnData->CopyFrom(*_pData); @@ -160,14 +160,13 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent, FreeResource(); } -//------------------------------------------------------------------------ DlgQryJoin::~DlgQryJoin() { DBG_DTOR(DlgQryJoin,NULL); delete m_pJoinControl; delete m_pTableControl; } -// ----------------------------------------------------------------------------- + IMPL_LINK( DlgQryJoin, LBChangeHdl, ListBox*, /*pListBox*/ ) { DBG_CHKTHIS(DlgQryJoin,NULL); @@ -256,7 +255,6 @@ IMPL_LINK( DlgQryJoin, LBChangeHdl, ListBox*, /*pListBox*/ ) aML_HelpText.SetText( sHelpText ); return 1; } -// ----------------------------------------------------------------------------- IMPL_LINK( DlgQryJoin, OKClickHdl, Button*, /*pButton*/ ) { @@ -268,7 +266,6 @@ IMPL_LINK( DlgQryJoin, OKClickHdl, Button*, /*pButton*/ ) EndDialog(RET_OK); return 1; } -// ----------------------------------------------------------------------------- IMPL_LINK( DlgQryJoin, NaturalToggleHdl, CheckBox*, /*pButton*/ ) { @@ -301,24 +298,24 @@ IMPL_LINK( DlgQryJoin, NaturalToggleHdl, CheckBox*, /*pButton*/ ) return 1; } -// ----------------------------------------------------------------------------- + TTableConnectionData::value_type DlgQryJoin::getConnectionData() const { return m_pConnData; } -// ----------------------------------------------------------------------------- + void DlgQryJoin::setValid(sal_Bool _bValid) { aPB_OK.Enable(_bValid || eJoinType == CROSS_JOIN ); } -// ----------------------------------------------------------------------------- + void DlgQryJoin::notifyConnectionChange( ) { setJoinType( static_cast<OQueryTableConnectionData*>(m_pConnData.get())->GetJoinType() ); m_pJoinControl->m_aCBNatural.Check(static_cast<OQueryTableConnectionData*>(m_pConnData.get())->isNatural()); NaturalToggleHdl(&m_pJoinControl->m_aCBNatural); } -// ----------------------------------------------------------------------------- + void DlgQryJoin::setJoinType(EJoinType _eNewJoinType) { eJoinType = _eNewJoinType; @@ -357,8 +354,5 @@ void DlgQryJoin::setJoinType(EJoinType _eNewJoinType) LBChangeHdl(&m_pJoinControl->aLB_JoinType); } -// ----------------------------------------------------------------------------- - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/queryview.cxx b/dbaccess/source/ui/querydesign/queryview.cxx index e49c7b000c9f..e2946c73940c 100644 --- a/dbaccess/source/ui/querydesign/queryview.cxx +++ b/dbaccess/source/ui/querydesign/queryview.cxx @@ -21,27 +21,21 @@ #include "dbu_qry.hrc" #include "querycontroller.hxx" - using namespace dbaui; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; DBG_NAME(OQueryView) -// ------------------------------------------------------------------------- OQueryView::OQueryView(Window* _pParent, OQueryController& _rController,const Reference< XComponentContext >& _rxContext) :OJoinDesignView( _pParent, _rController, _rxContext ) { DBG_CTOR(OQueryView,NULL); } -// ----------------------------------------------------------------------------- + OQueryView::~OQueryView() { DBG_DTOR(OQueryView,NULL); } -// ----------------------------------------------------------------------------- - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/relationdesign/RTableConnection.cxx b/dbaccess/source/ui/relationdesign/RTableConnection.cxx index 42fe9096fa57..eabdf23c9c79 100644 --- a/dbaccess/source/ui/relationdesign/RTableConnection.cxx +++ b/dbaccess/source/ui/relationdesign/RTableConnection.cxx @@ -24,11 +24,8 @@ #include "ConnectionLine.hxx" using namespace dbaui; -//======================================================================== // class ORelationTableConnection -//======================================================================== DBG_NAME(ORelationTableConnection) -//------------------------------------------------------------------------ ORelationTableConnection::ORelationTableConnection( ORelationTableView* pContainer, const TTableConnectionData::value_type& pTabConnData ) :OTableConnection( pContainer, pTabConnData ) @@ -36,7 +33,6 @@ ORelationTableConnection::ORelationTableConnection( ORelationTableView* pContain DBG_CTOR(ORelationTableConnection,NULL); } -//------------------------------------------------------------------------ ORelationTableConnection::ORelationTableConnection( const ORelationTableConnection& rConn ) : OTableConnection( rConn ) { @@ -44,13 +40,11 @@ ORelationTableConnection::ORelationTableConnection( const ORelationTableConnecti // keine eigenen Members, also reicht die Basisklassenfunktionalitaet } -//------------------------------------------------------------------------ ORelationTableConnection::~ORelationTableConnection() { DBG_DTOR(ORelationTableConnection,NULL); } -//------------------------------------------------------------------------ ORelationTableConnection& ORelationTableConnection::operator=( const ORelationTableConnection& rConn ) { DBG_CHKTHIS(ORelationTableConnection,NULL); @@ -62,8 +56,6 @@ ORelationTableConnection& ORelationTableConnection::operator=( const ORelationTa return *this; } - -//------------------------------------------------------------------------ void ORelationTableConnection::Draw( const Rectangle& rRect ) { DBG_CHKTHIS(ORelationTableConnection,NULL); @@ -72,7 +64,6 @@ void ORelationTableConnection::Draw( const Rectangle& rRect ) if ( pData && (pData->GetCardinality() == CARDINAL_UNDEFINED) ) return; - ////////////////////////////////////////////////////////////////////// // Linien nach oberster Linie durchsuchen Rectangle aBoundingRect; long nTop = GetBoundingRect().Bottom(); @@ -96,7 +87,6 @@ void ORelationTableConnection::Draw( const Rectangle& rRect ) } } - ////////////////////////////////////////////////////////////////////// // Kardinalitaet antragen if( !pTopLine ) return; @@ -130,10 +120,8 @@ void ORelationTableConnection::Draw( const Rectangle& rRect ) else GetParent()->SetTextColor(Application::GetSettings().GetStyleSettings().GetWindowTextColor()); - GetParent()->DrawText( aSourcePos, aSourceText, TEXT_DRAW_CLIP | TEXT_DRAW_CENTER | TEXT_DRAW_BOTTOM); GetParent()->DrawText( aDestPos, aDestText, TEXT_DRAW_CLIP | TEXT_DRAW_CENTER | TEXT_DRAW_BOTTOM); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/relationdesign/RTableConnection.hxx b/dbaccess/source/ui/relationdesign/RTableConnection.hxx index fe3ca777cce4..f8d83d80f192 100644 --- a/dbaccess/source/ui/relationdesign/RTableConnection.hxx +++ b/dbaccess/source/ui/relationdesign/RTableConnection.hxx @@ -25,7 +25,6 @@ namespace dbaui { class ORelationTableView; - //================================================================== class ORelationTableConnection : public OTableConnection { public: @@ -42,7 +41,4 @@ namespace dbaui } #endif // DBAUI_RTABLECONNECTION_HXX - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx index 57b8fdf0f3db..ed16d84860a2 100644 --- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx +++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx @@ -43,10 +43,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; DBG_NAME(ORelationTableConnectionData) -//======================================================================== // class ORelationTableConnectionData -//======================================================================== -//------------------------------------------------------------------------ ORelationTableConnectionData::ORelationTableConnectionData() :OTableConnectionData() ,m_nUpdateRules(KeyRule::NO_ACTION) @@ -55,7 +52,7 @@ ORelationTableConnectionData::ORelationTableConnectionData() { DBG_CTOR(ORelationTableConnectionData,NULL); } -//------------------------------------------------------------------------ + ORelationTableConnectionData::ORelationTableConnectionData( const TTableWindowData::value_type& _pReferencingTable, const TTableWindowData::value_type& _pReferencedTable, const OUString& rConnName ) @@ -71,7 +68,6 @@ ORelationTableConnectionData::ORelationTableConnectionData( const TTableWindowDa SetCardinality(); } -//------------------------------------------------------------------------ ORelationTableConnectionData::ORelationTableConnectionData( const ORelationTableConnectionData& rConnData ) :OTableConnectionData( rConnData ) { @@ -79,18 +75,15 @@ ORelationTableConnectionData::ORelationTableConnectionData( const ORelationTable *this = rConnData; } -//------------------------------------------------------------------------ ORelationTableConnectionData::~ORelationTableConnectionData() { DBG_DTOR(ORelationTableConnectionData,NULL); } -//------------------------------------------------------------------------ sal_Bool ORelationTableConnectionData::DropRelation() { DBG_CHKTHIS(ORelationTableConnectionData,NULL); ::osl::MutexGuard aGuard( m_aMutex ); - //////////////////////////////////////////////////////////// // Relation loeschen Reference< XIndexAccess> xKeys = getReferencingTable()->getKeys(); if( m_aConnName.Len() && xKeys.is() ) @@ -118,11 +111,9 @@ sal_Bool ORelationTableConnectionData::DropRelation() return sal_True; } -//------------------------------------------------------------------------ void ORelationTableConnectionData::ChangeOrientation() { DBG_CHKTHIS(ORelationTableConnectionData,NULL); - ////////////////////////////////////////////////////////////////////// // Source- und DestFieldName der Linien austauschen OUString sTempString; OConnectionLineDataVec::iterator aIter = m_vConnLineData.begin(); @@ -134,14 +125,12 @@ void ORelationTableConnectionData::ChangeOrientation() (*aIter)->SetDestFieldName( sTempString ); } - ////////////////////////////////////////////////////////////////////// // Member anpassen TTableWindowData::value_type pTemp = m_pReferencingTable; m_pReferencingTable = m_pReferencedTable; m_pReferencedTable = pTemp; } -//------------------------------------------------------------------------ void ORelationTableConnectionData::SetCardinality() { DBG_CHKTHIS(ORelationTableConnectionData,NULL); @@ -163,7 +152,7 @@ void ORelationTableConnectionData::SetCardinality() } } -// ----------------------------------------------------------------------------- + sal_Bool ORelationTableConnectionData::checkPrimaryKey(const Reference< XPropertySet>& i_xTable,EConnectionSide _eEConnectionSide) const { // check if Table has the primary key column dependig on _eEConnectionSide @@ -198,13 +187,12 @@ sal_Bool ORelationTableConnectionData::checkPrimaryKey(const Reference< XPropert return sal_True; } -//------------------------------------------------------------------------ + sal_Bool ORelationTableConnectionData::IsConnectionPossible() { DBG_CHKTHIS(ORelationTableConnectionData,NULL); ::osl::MutexGuard aGuard( m_aMutex ); - ////////////////////////////////////////////////////////////////////// // Wenn die SourceFelder ein PrimKey sind, ist nur die Orientierung falsch if ( IsSourcePrimKey() && !IsDestPrimKey() ) ChangeOrientation(); @@ -212,26 +200,22 @@ sal_Bool ORelationTableConnectionData::IsConnectionPossible() return sal_True; } -//------------------------------------------------------------------------ OConnectionLineDataRef ORelationTableConnectionData::CreateLineDataObj() { return new OConnectionLineData(); } -//------------------------------------------------------------------------ OConnectionLineDataRef ORelationTableConnectionData::CreateLineDataObj( const OConnectionLineData& rConnLineData ) { return new OConnectionLineData( rConnLineData ); } -//------------------------------------------------------------------------ void ORelationTableConnectionData::CopyFrom(const OTableConnectionData& rSource) { // wie in der Basisklasse zurueckziehen auf das (nicht-virtuelle) operator= *this = *static_cast<const ORelationTableConnectionData*>(&rSource); } -//------------------------------------------------------------------------ ORelationTableConnectionData& ORelationTableConnectionData::operator=( const ORelationTableConnectionData& rConnData ) { if (&rConnData == this) @@ -244,9 +228,9 @@ ORelationTableConnectionData& ORelationTableConnectionData::operator=( const ORe return *this; } + namespace dbaui { -//------------------------------------------------------------------------- bool operator==(const ORelationTableConnectionData& lhs, const ORelationTableConnectionData& rhs) { bool bEqual = (lhs.m_nUpdateRules == rhs.m_nUpdateRules) @@ -270,12 +254,12 @@ bool operator==(const ORelationTableConnectionData& lhs, const ORelationTableCon } return bEqual; } + } -//------------------------------------------------------------------------ + sal_Bool ORelationTableConnectionData::Update() { ::osl::MutexGuard aGuard( m_aMutex ); - //////////////////////////////////////////////////////////// // Alte Relation loeschen { DropRelation(); @@ -289,7 +273,6 @@ sal_Bool ORelationTableConnectionData::Update() if ( !xKeys.is() ) return sal_False; - //////////////////////////////////////////////////////////// // Neue Relation erzeugen Reference<XDataDescriptorFactory> xKeyFactory(xKeys,UNO_QUERY); OSL_ENSURE(xKeyFactory.is(),"No XDataDescriptorFactory Interface!"); @@ -444,12 +427,10 @@ xKey.clear(); } // NOTE : the caller is responsible for updating any other objects referencing the old LineDatas (for instance a ConnLine) - //////////////////////////////////////////////////////////// // Kardinalitaet bestimmen SetCardinality(); return sal_True; } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index 1555fa909a5a..2cd7d52d8e40 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -64,7 +64,6 @@ #include <osl/thread.hxx> #include <osl/mutex.hxx> - #define MAX_THREADS 10 extern "C" void SAL_CALL createRegistryInfo_ORelationControl() @@ -72,7 +71,6 @@ extern "C" void SAL_CALL createRegistryInfo_ORelationControl() static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::ORelationController > aAutoRegistration; } - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::io; using namespace ::com::sun::star::beans; @@ -89,36 +87,34 @@ using namespace ::dbaui; using namespace ::comphelper; using namespace ::osl; -//------------------------------------------------------------------------------ OUString SAL_CALL ORelationController::getImplementationName() throw( RuntimeException ) { return getImplementationName_Static(); } -//------------------------------------------------------------------------------ OUString ORelationController::getImplementationName_Static() throw( RuntimeException ) { return OUString("org.openoffice.comp.dbu.ORelationDesign"); } -//------------------------------------------------------------------------------ + Sequence< OUString> ORelationController::getSupportedServiceNames_Static(void) throw( RuntimeException ) { Sequence< OUString> aSupported(1); aSupported.getArray()[0] = OUString("com.sun.star.sdb.RelationDesign"); return aSupported; } -//------------------------------------------------------------------------- + Sequence< OUString> SAL_CALL ORelationController::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL ORelationController::Create(const Reference<XMultiServiceFactory >& _rxFactory) { return *(new ORelationController(comphelper::getComponentContext(_rxFactory))); } + DBG_NAME(ORelationController); -// ----------------------------------------------------------------------------- ORelationController::ORelationController(const Reference< XComponentContext >& _rM) : OJoinController(_rM) ,m_nThreadEvent(0) @@ -127,12 +123,12 @@ ORelationController::ORelationController(const Reference< XComponentContext >& _ DBG_CTOR(ORelationController,NULL); InvalidateAll(); } -// ----------------------------------------------------------------------------- + ORelationController::~ORelationController() { DBG_DTOR(ORelationController,NULL); } -// ----------------------------------------------------------------------------- + FeatureState ORelationController::GetState(sal_uInt16 _nId) const { FeatureState aReturn; @@ -152,7 +148,7 @@ FeatureState ORelationController::GetState(sal_uInt16 _nId) const } return aReturn; } -// ----------------------------------------------------------------------------- + void ORelationController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& aArgs) { switch(_nId) @@ -195,7 +191,7 @@ void ORelationController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue } InvalidateFeature(_nId); } -// ----------------------------------------------------------------------------- + void ORelationController::impl_initialize() { OJoinController::impl_initialize(); @@ -239,20 +235,20 @@ void ORelationController::impl_initialize() } } -// ----------------------------------------------------------------------------- + OUString ORelationController::getPrivateTitle( ) const { OUString sName = getDataSourceName(); return ::dbaui::getStrippedDatabaseName(getDataSource(),sName); } -// ----------------------------------------------------------------------------- + sal_Bool ORelationController::Construct(Window* pParent) { setView( * new ORelationDesignView( pParent, *this, getORB() ) ); OJoinController::Construct(pParent); return sal_True; } -// ----------------------------------------------------------------------------- + short ORelationController::saveModified() { short nSaved = RET_YES; @@ -265,12 +261,13 @@ short ORelationController::saveModified() } return nSaved; } -// ----------------------------------------------------------------------------- + void ORelationController::describeSupportedFeatures() { OJoinController::describeSupportedFeatures(); implDescribeSupportedFeature( ".uno:DBAddRelation", SID_RELATION_ADD_RELATION, CommandGroup::EDIT ); } + namespace { class RelationLoader : public ::osl::Thread @@ -380,7 +377,7 @@ namespace { OUString sReferencedTable; xKey->getPropertyValue(PROPERTY_REFERENCEDTABLE) >>= sReferencedTable; - ////////////////////////////////////////////////////////////////////// + // insert windows TTableDataHelper::iterator aRefFind = m_aTableData.find(sReferencedTable); if ( aRefFind == m_aTableData.end() ) @@ -398,11 +395,9 @@ namespace OUString sKeyName; xKey->getPropertyValue(PROPERTY_NAME) >>= sKeyName; - ////////////////////////////////////////////////////////////////////// // insert connection ORelationTableConnectionData* pTabConnData = new ORelationTableConnectionData( pReferencingTable, pReferencedTable, sKeyName ); m_vTableConnectionData.push_back(TTableConnectionData::value_type(pTabConnData)); - ////////////////////////////////////////////////////////////////////// // insert columns const Reference<XColumnsSupplier> xColsSup(xKey,UNO_QUERY); OSL_ENSURE(xColsSup.is(),"Key is no XColumnsSupplier!"); @@ -422,7 +417,6 @@ namespace } pTabConnData->SetConnLine( j, sColumnName, sRelatedName ); } - ////////////////////////////////////////////////////////////////////// // Update/Del-Flags setzen sal_Int32 nUpdateRule = 0; sal_Int32 nDeleteRule = 0; @@ -432,7 +426,6 @@ namespace pTabConnData->SetUpdateRules( nUpdateRule ); pTabConnData->SetDeleteRules( nDeleteRule ); - ////////////////////////////////////////////////////////////////////// // Kardinalitaet setzen pTabConnData->SetCardinality(); } @@ -469,7 +462,7 @@ void ORelationController::mergeData(const TTableConnectionData& _aConnectionData Application::PostUserEvent(LINK(this, ORelationController, OnThreadFinished)); } } -// ----------------------------------------------------------------------------- + IMPL_LINK( ORelationController, OnThreadFinished, void*, /*NOTINTERESTEDIN*/ ) { ::SolarMutexGuard aSolarGuard; @@ -491,7 +484,7 @@ IMPL_LINK( ORelationController, OnThreadFinished, void*, /*NOTINTERESTEDIN*/ ) m_pWaitObject.reset(); return 0L; } -// ----------------------------------------------------------------------------- + void ORelationController::loadData() { m_pWaitObject.reset( new WaitObject(getView()) ); @@ -536,7 +529,7 @@ void ORelationController::loadData() DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + TTableWindowData::value_type ORelationController::existsTable(const OUString& _rComposedTableName,sal_Bool _bCase) const { ::comphelper::UStringMixEqual bCase(_bCase); @@ -549,7 +542,7 @@ TTableWindowData::value_type ORelationController::existsTable(const OUString& _r } return ( aIter != aEnd) ? *aIter : TTableWindowData::value_type(); } -// ----------------------------------------------------------------------------- + void ORelationController::loadLayoutInformation() { try @@ -569,7 +562,7 @@ void ORelationController::loadLayoutInformation() { } } -// ----------------------------------------------------------------------------- + void ORelationController::reset() { loadLayoutInformation(); @@ -582,19 +575,14 @@ void ORelationController::reset() } } -// ----------------------------------------------------------------------------- bool ORelationController::allowViews() const { return false; } -// ----------------------------------------------------------------------------- bool ORelationController::allowQueries() const { return false; } -// ----------------------------------------------------------------------------- - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/relationdesign/RelationDesignView.cxx b/dbaccess/source/ui/relationdesign/RelationDesignView.cxx index 602b79323d89..9f72313c1a98 100644 --- a/dbaccess/source/ui/relationdesign/RelationDesignView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationDesignView.cxx @@ -51,18 +51,18 @@ ORelationDesignView::ORelationDesignView(Window* _pParent, ORelationController& { DBG_CTOR(ORelationDesignView,NULL); } -// ----------------------------------------------------------------------------- + ORelationDesignView::~ORelationDesignView() { DBG_DTOR(ORelationDesignView,NULL); } -// ------------------------------------------------------------------------- + void ORelationDesignView::Construct() { m_pTableView = new ORelationTableView(m_pScrollWindow,this); OJoinDesignView::Construct(); } -// ----------------------------------------------------------------------------- + void ORelationDesignView::initialize() { m_pTableView->clearLayoutInformation(); @@ -70,7 +70,7 @@ void ORelationDesignView::initialize() OJoinDesignView::initialize(); } -// ----------------------------------------------------------------------------- + long ORelationDesignView::PreNotify( NotifyEvent& rNEvt ) { long nDone = 0L; @@ -86,19 +86,12 @@ long ORelationDesignView::PreNotify( NotifyEvent& rNEvt ) nDone = OJoinDesignView::PreNotify(rNEvt); return nDone; } -// ----------------------------------------------------------------------------- + void ORelationDesignView::GetFocus() { OJoinDesignView::GetFocus(); if ( m_pTableView && m_pTableView->IsVisible() && !m_pTableView->GetTabWinMap()->empty() ) m_pTableView->GrabTabWinFocus(); } -// ----------------------------------------------------------------------------- - - - - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index f6a0ac614298..a3d870a10c38 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -60,11 +60,8 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::accessibility; -//================================================================== // class ORelationTableView -//================================================================== DBG_NAME(ORelationTableView) -//------------------------------------------------------------------------ ORelationTableView::ORelationTableView( Window* pParent, ORelationDesignView* pView ) :OJoinTableView( pParent, pView ) , ::comphelper::OContainerListener(m_aMutex) @@ -76,7 +73,6 @@ ORelationTableView::ORelationTableView( Window* pParent, ORelationDesignView* pV SetHelpId(HID_CTL_RELATIONTAB); } -//------------------------------------------------------------------------ ORelationTableView::~ORelationTableView() { DBG_DTOR(ORelationTableView,NULL); @@ -84,7 +80,6 @@ ORelationTableView::~ORelationTableView() m_pContainerListener->dispose(); } -//------------------------------------------------------------------------ void ORelationTableView::ReSync() { DBG_CHKTHIS(ORelationTableView,NULL); @@ -102,7 +97,6 @@ void ORelationTableView::ReSync() // gehen, und alle solchen TabWinDatas oder darauf bezogenen ConnDatas muss ich dann loeschen. ::std::vector< OUString> arrInvalidTables; - ////////////////////////////////////////////////////////////////////// // create and insert windows TTableWindowData* pTabWinDataList = m_pView->getController().getTableWindowData(); TTableWindowData::reverse_iterator aIter = pTabWinDataList->rbegin(); @@ -159,14 +153,14 @@ void ORelationTableView::ReSync() if ( !GetTabWinMap()->empty() ) GetTabWinMap()->begin()->second->GrabFocus(); } -//------------------------------------------------------------------------------ + sal_Bool ORelationTableView::IsAddAllowed() { DBG_CHKTHIS(ORelationTableView,NULL); return !m_pView->getController().isReadOnly(); } -//------------------------------------------------------------------------ + void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJoinExchangeData& jxdDest) { DBG_CHKTHIS(ORelationTableView,NULL); @@ -208,11 +202,9 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const { try { - ////////////////////////////////////////////////////////////////////// // Daten der Datenbank uebergeben if( pTabConnData->Update() ) { - ////////////////////////////////////////////////////////////////////// // UI-Object in ConnListe eintragen addConnection( new ORelationTableConnection( this, pTabConnData ) ); } @@ -228,8 +220,6 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const } } - -//------------------------------------------------------------------------ void ORelationTableView::ConnDoubleClicked( OTableConnection* pConnection ) { DBG_CHKTHIS(ORelationTableView,NULL); @@ -257,7 +247,6 @@ void ORelationTableView::ConnDoubleClicked( OTableConnection* pConnection ) Invalidate(INVALIDATE_NOCHILDREN); } -//------------------------------------------------------------------------------ void ORelationTableView::AddNewRelation() { DBG_CHKTHIS(ORelationTableView,NULL); @@ -274,7 +263,6 @@ void ORelationTableView::AddNewRelation() } } -//------------------------------------------------------------------------------ bool ORelationTableView::RemoveConnection( OTableConnection* pConn ,sal_Bool /*_bDelete*/) { DBG_CHKTHIS(ORelationTableView,NULL); @@ -295,7 +283,6 @@ bool ORelationTableView::RemoveConnection( OTableConnection* pConn ,sal_Bool /*_ return false; } -//------------------------------------------------------------------------------ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUString& rWinName, sal_Bool /*bNewTable*/) { DBG_CHKTHIS(ORelationTableView,NULL); @@ -311,12 +298,10 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin return; } - ////////////////////////////////////////////////////////////////// // Neue Datenstruktur in DocShell eintragen TTableWindowData::value_type pNewTabWinData(createTableWindowData( _rComposedName, rWinName,rWinName )); pNewTabWinData->ShowAll(sal_False); - ////////////////////////////////////////////////////////////////// // Neues Fenster in Fensterliste eintragen OTableWindow* pNewTabWin = createWindow( pNewTabWinData ); if(pNewTabWin->Init()) @@ -341,7 +326,7 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin delete pNewTabWin; } } -// ----------------------------------------------------------------------------- + void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin ) { OSQLWarningBox aDlg( this, ModuleRes( STR_QUERY_REL_DELETE_WINDOW ), WB_YES_NO | WB_DEF_YES ); @@ -392,22 +377,21 @@ void ORelationTableView::lookForUiActivities() } } -// ----------------------------------------------------------------------------- OTableWindow* ORelationTableView::createWindow(const TTableWindowData::value_type& _pData) { return new ORelationTableWindow(this,_pData); } -// ----------------------------------------------------------------------------- + bool ORelationTableView::allowQueries() const { return false; } -// ----------------------------------------------------------------------------- + void ORelationTableView::_elementInserted( const container::ContainerEvent& /*_rEvent*/ ) throw(::com::sun::star::uno::RuntimeException) { } -// ----------------------------------------------------------------------------- + void ORelationTableView::_elementRemoved( const container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException) { m_bInRemove = true; @@ -427,7 +411,7 @@ void ORelationTableView::_elementRemoved( const container::ContainerEvent& _rEve } m_bInRemove = false; } -// ----------------------------------------------------------------------------- + void ORelationTableView::_elementReplaced( const container::ContainerEvent& /*_rEvent*/ ) throw(::com::sun::star::uno::RuntimeException) { } diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx index cbbf61bf0a21..1450bd743001 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx +++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx @@ -26,13 +26,9 @@ #include "TEditControl.hxx" using namespace dbaui; -//================================================================== // class OFieldDescGenWin -//================================================================== DBG_NAME(OFieldDescGenWin) -//================================================================== -//------------------------------------------------------------------------------ OFieldDescGenWin::OFieldDescGenWin( Window* pParent, OTableDesignHelpBar* pHelp ) : TabPage( pParent, WB_3DLOOK | WB_DIALOGCONTROL ) { @@ -41,55 +37,54 @@ OFieldDescGenWin::OFieldDescGenWin( Window* pParent, OTableDesignHelpBar* pHelp m_pFieldControl->SetHelpId(HID_TAB_DESIGN_FIELDCONTROL); m_pFieldControl->Show(); } -//------------------------------------------------------------------------------ + OFieldDescGenWin::~OFieldDescGenWin() { DBG_DTOR(OFieldDescGenWin,NULL); ::std::auto_ptr<Window> aTemp(m_pFieldControl); m_pFieldControl = NULL; } -//------------------------------------------------------------------------------ + void OFieldDescGenWin::Init() { OSL_ENSURE(GetEditorCtrl() != NULL, "OFieldDescGenWin::Init : have no editor control !"); m_pFieldControl->Init(); } -//------------------------------------------------------------------------------ + void OFieldDescGenWin::Resize() { m_pFieldControl->SetPosSizePixel(Point(0,0),GetSizePixel()); m_pFieldControl->Resize(); } -//------------------------------------------------------------------------------ + void OFieldDescGenWin::SetReadOnly( sal_Bool bReadOnly ) { DBG_CHKTHIS(OFieldDescGenWin,NULL); m_pFieldControl->SetReadOnly(bReadOnly); } -//------------------------------------------------------------------------------ + String OFieldDescGenWin::GetControlText( sal_uInt16 nControlId ) { DBG_CHKTHIS(OFieldDescGenWin,NULL); return m_pFieldControl->GetControlText(nControlId); } -//------------------------------------------------------------------------------ + void OFieldDescGenWin::SetControlText( sal_uInt16 nControlId, const String& rText ) { DBG_CHKTHIS(OFieldDescGenWin,NULL); - ////////////////////////////////////////////////////////////////////// // Texte der Controls setzen m_pFieldControl->SetControlText(nControlId,rText); } -//------------------------------------------------------------------------------ + void OFieldDescGenWin::DisplayData( OFieldDescription* pFieldDescr ) { DBG_CHKTHIS(OFieldDescGenWin,NULL); m_pFieldControl->DisplayData(pFieldDescr); } -//------------------------------------------------------------------------------ + #if OSL_DEBUG_LEVEL > 0 OTableEditorCtrl* OFieldDescGenWin::GetEditorCtrl() { @@ -97,75 +92,72 @@ OTableEditorCtrl* OFieldDescGenWin::GetEditorCtrl() OTableDesignView* pDesignWin = static_cast<OTableDesignView*>(GetParent()->GetParent()->GetParent()); return pDesignWin->GetEditorCtrl(); } + #endif -//------------------------------------------------------------------------------ void OFieldDescGenWin::SaveData( OFieldDescription* pFieldDescr ) { DBG_CHKTHIS(OFieldDescGenWin,NULL); m_pFieldControl->SaveData(pFieldDescr); } -//------------------------------------------------------------------------------ + void OFieldDescGenWin::GetFocus() { DBG_CHKTHIS(OFieldDescGenWin,NULL); - ////////////////////////////////////////////////////////////////////// // Setzt den Focus auf das zuletzt aktive Control TabPage::GetFocus(); if(m_pFieldControl) m_pFieldControl->GetFocus(); } -//------------------------------------------------------------------------------ + void OFieldDescGenWin::LoseFocus() { DBG_CHKTHIS(OFieldDescGenWin,NULL); m_pFieldControl->LoseFocus(); TabPage::LoseFocus(); } -//------------------------------------------------------------------ + String OFieldDescGenWin::BoolStringPersistent(const String& rUIString) const { return m_pFieldControl->BoolStringPersistent(rUIString); } -//------------------------------------------------------------------ String OFieldDescGenWin::BoolStringUI(const String& rPersistentString) const { return m_pFieldControl->BoolStringUI(rPersistentString); } -// ----------------------------------------------------------------------------- + sal_Bool OFieldDescGenWin::isCopyAllowed() { return (m_pFieldControl && m_pFieldControl->isCutAllowed()); } -// ----------------------------------------------------------------------------- + sal_Bool OFieldDescGenWin::isCutAllowed() { return (m_pFieldControl && m_pFieldControl->isCutAllowed()); } -// ----------------------------------------------------------------------------- + sal_Bool OFieldDescGenWin::isPasteAllowed() { return (m_pFieldControl && m_pFieldControl->isPasteAllowed()); } -// ----------------------------------------------------------------------------- + void OFieldDescGenWin::cut() { if(m_pFieldControl) m_pFieldControl->cut(); } -// ----------------------------------------------------------------------------- + void OFieldDescGenWin::copy() { if(m_pFieldControl) m_pFieldControl->copy(); } -// ----------------------------------------------------------------------------- + void OFieldDescGenWin::paste() { if(m_pFieldControl) m_pFieldControl->paste(); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx index e77ba06ad233..59dd95785029 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx +++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx @@ -28,7 +28,6 @@ namespace dbaui class OFieldDescription; class OTableFieldControl; class OTableEditorCtrl; - //================================================================== class OFieldDescGenWin : public TabPage ,public IClipboardTest { diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx index f1c6606cca48..1eb193aaf79a 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx +++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx @@ -33,18 +33,14 @@ #define DEFAULT_NUMERIC_PRECSION 5 #define DEFAULT_NUMERIC_SCALE 0 - using namespace dbaui; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::util; -//======================================================================== // class OFieldDescription -//======================================================================== DBG_NAME(OFieldDescription) -//------------------------------------------------------------------------------ OFieldDescription::OFieldDescription() :m_pType() ,m_nType(DataType::VARCHAR) @@ -60,7 +56,7 @@ OFieldDescription::OFieldDescription() { DBG_CTOR(OFieldDescription,NULL); } -//------------------------------------------------------------------------------ + OFieldDescription::OFieldDescription( const OFieldDescription& rDescr ) :m_aDefaultValue(rDescr.m_aDefaultValue) ,m_aControlDefault(rDescr.m_aControlDefault) @@ -87,12 +83,11 @@ OFieldDescription::OFieldDescription( const OFieldDescription& rDescr ) DBG_CTOR(OFieldDescription,NULL); } -//------------------------------------------------------------------------------ OFieldDescription::~OFieldDescription() { DBG_DTOR(OFieldDescription,NULL); } -//------------------------------------------------------------------------------ + OFieldDescription::OFieldDescription(const Reference< XPropertySet >& xAffectedCol,sal_Bool _bUseAsDest) :m_pType() ,m_nType(DataType::VARCHAR) @@ -176,7 +171,7 @@ OFieldDescription::OFieldDescription(const Reference< XPropertySet >& xAffectedC } } } -// ----------------------------------------------------------------------------- + void OFieldDescription::FillFromTypeInfo(const TOTypeInfoSP& _pType,sal_Bool _bForce,sal_Bool _bReset) { TOTypeInfoSP pOldType = getTypeInfo(); @@ -245,7 +240,7 @@ void OFieldDescription::FillFromTypeInfo(const TOTypeInfoSP& _pType,sal_Bool _bF SetTypeName(_pType->aTypeName); } } -// ----------------------------------------------------------------------------- + void OFieldDescription::SetName(const OUString& _rName) { try @@ -260,7 +255,7 @@ void OFieldDescription::SetName(const OUString& _rName) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OFieldDescription::SetHelpText(const OUString& _sHelpText) { try @@ -275,7 +270,7 @@ void OFieldDescription::SetHelpText(const OUString& _sHelpText) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OFieldDescription::SetDescription(const OUString& _rDescription) { try @@ -290,7 +285,7 @@ void OFieldDescription::SetDescription(const OUString& _rDescription) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OFieldDescription::SetDefaultValue(const Any& _rDefaultValue) { try @@ -305,7 +300,7 @@ void OFieldDescription::SetDefaultValue(const Any& _rDefaultValue) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OFieldDescription::SetControlDefault(const Any& _rControlDefault) { try @@ -320,7 +315,7 @@ void OFieldDescription::SetControlDefault(const Any& _rControlDefault) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OFieldDescription::SetAutoIncrementValue(const OUString& _sAutoIncValue) { try @@ -335,7 +330,7 @@ void OFieldDescription::SetAutoIncrementValue(const OUString& _sAutoIncValue) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OFieldDescription::SetType(TOTypeInfoSP _pType) { m_pType = _pType; @@ -354,7 +349,7 @@ void OFieldDescription::SetType(TOTypeInfoSP _pType) } } } -// ----------------------------------------------------------------------------- + void OFieldDescription::SetTypeValue(sal_Int32 _nType) { try @@ -372,7 +367,7 @@ void OFieldDescription::SetTypeValue(sal_Int32 _nType) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OFieldDescription::SetPrecision(const sal_Int32& _rPrecision) { try @@ -387,7 +382,7 @@ void OFieldDescription::SetPrecision(const sal_Int32& _rPrecision) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OFieldDescription::SetScale(const sal_Int32& _rScale) { try @@ -402,7 +397,7 @@ void OFieldDescription::SetScale(const sal_Int32& _rScale) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OFieldDescription::SetIsNullable(const sal_Int32& _rIsNullable) { try @@ -417,7 +412,7 @@ void OFieldDescription::SetIsNullable(const sal_Int32& _rIsNullable) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OFieldDescription::SetFormatKey(const sal_Int32& _rFormatKey) { try @@ -432,7 +427,7 @@ void OFieldDescription::SetFormatKey(const sal_Int32& _rFormatKey) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OFieldDescription::SetHorJustify(const SvxCellHorJustify& _rHorJustify) { try @@ -447,7 +442,7 @@ void OFieldDescription::SetHorJustify(const SvxCellHorJustify& _rHorJustify) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OFieldDescription::SetAutoIncrement(sal_Bool _bAuto) { try @@ -462,19 +457,18 @@ void OFieldDescription::SetAutoIncrement(sal_Bool _bAuto) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OFieldDescription::SetPrimaryKey(sal_Bool _bPKey) { m_bIsPrimaryKey = _bPKey; if ( _bPKey ) SetIsNullable(::com::sun::star::sdbc::ColumnValue::NO_NULLS); } -// ----------------------------------------------------------------------------- + void OFieldDescription::SetCurrency(sal_Bool _bIsCurrency) { m_bIsCurrency = _bIsCurrency; } -// ----------------------------------------------------------------------------- OUString OFieldDescription::GetName() const { @@ -483,7 +477,7 @@ OUString OFieldDescription::GetName() const else return m_sName; } -// ----------------------------------------------------------------------------- + OUString OFieldDescription::GetDescription() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_DESCRIPTION) ) @@ -491,7 +485,7 @@ OUString OFieldDescription::GetDescription() const else return m_sDescription; } -// ----------------------------------------------------------------------------- + OUString OFieldDescription::GetHelpText() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_HELPTEXT) ) @@ -499,7 +493,7 @@ OUString OFieldDescription::GetHelpText() const else return m_sHelpText; } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Any OFieldDescription::GetControlDefault() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_CONTROLDEFAULT) ) @@ -507,7 +501,7 @@ OUString OFieldDescription::GetHelpText() const else return m_aControlDefault; } -// ----------------------------------------------------------------------------- + OUString OFieldDescription::GetAutoIncrementValue() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_AUTOINCREMENTCREATION) ) @@ -515,7 +509,7 @@ OUString OFieldDescription::GetAutoIncrementValue() const else return m_sAutoIncrementValue; } -// ----------------------------------------------------------------------------- + sal_Int32 OFieldDescription::GetType() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_TYPE) ) @@ -523,7 +517,7 @@ sal_Int32 OFieldDescription::GetType() const else return m_pType.get() ? m_pType->nType : m_nType; } -// ----------------------------------------------------------------------------- + OUString OFieldDescription::GetTypeName() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_TYPENAME) ) @@ -531,7 +525,7 @@ OUString OFieldDescription::GetTypeName() const else return m_pType.get() ? m_pType->aTypeName : m_sTypeName; } -// ----------------------------------------------------------------------------- + sal_Int32 OFieldDescription::GetPrecision() const { sal_Int32 nPrec = m_nPrecision; @@ -555,7 +549,7 @@ sal_Int32 OFieldDescription::GetPrecision() const return nPrec; } -// ----------------------------------------------------------------------------- + sal_Int32 OFieldDescription::GetScale() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_SCALE) ) @@ -563,7 +557,7 @@ sal_Int32 OFieldDescription::GetScale() const else return m_nScale; } -// ----------------------------------------------------------------------------- + sal_Int32 OFieldDescription::GetIsNullable() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ISNULLABLE) ) @@ -571,7 +565,7 @@ sal_Int32 OFieldDescription::GetIsNullable() const else return m_nIsNullable; } -// ----------------------------------------------------------------------------- + sal_Int32 OFieldDescription::GetFormatKey() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_FORMATKEY) ) @@ -579,7 +573,7 @@ sal_Int32 OFieldDescription::GetFormatKey() const else return m_nFormatKey; } -// ----------------------------------------------------------------------------- + SvxCellHorJustify OFieldDescription::GetHorJustify() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ALIGN) ) @@ -587,12 +581,12 @@ SvxCellHorJustify OFieldDescription::GetHorJustify() const else return m_eHorJustify; } -// ----------------------------------------------------------------------------- + TOTypeInfoSP OFieldDescription::getTypeInfo() const { return m_pType; } -// ----------------------------------------------------------------------------- + TOTypeInfoSP OFieldDescription::getSpecialTypeInfo() const { TOTypeInfoSP pSpecialType( new OTypeInfo() ); @@ -602,7 +596,7 @@ TOTypeInfoSP OFieldDescription::getSpecialTypeInfo() const pSpecialType->bAutoIncrement = IsAutoIncrement(); // http://dba.openoffice.org/issues/show_bug.cgi?id=115398 fixed by ludob return pSpecialType; } -// ----------------------------------------------------------------------------- + sal_Bool OFieldDescription::IsAutoIncrement() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ISAUTOINCREMENT) ) @@ -610,17 +604,17 @@ sal_Bool OFieldDescription::IsAutoIncrement() const else return m_bIsAutoIncrement; } -// ----------------------------------------------------------------------------- + sal_Bool OFieldDescription::IsPrimaryKey() const { return m_bIsPrimaryKey; } -// ----------------------------------------------------------------------------- + sal_Bool OFieldDescription::IsCurrency() const { return m_bIsCurrency; } -// ----------------------------------------------------------------------------- + sal_Bool OFieldDescription::IsNullable() const { if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_ISNULLABLE) ) @@ -628,7 +622,7 @@ sal_Bool OFieldDescription::IsNullable() const else return m_nIsNullable == ::com::sun::star::sdbc::ColumnValue::NULLABLE; } -// ----------------------------------------------------------------------------- + void OFieldDescription::SetTypeName(const OUString& _sTypeName) { try @@ -643,7 +637,7 @@ void OFieldDescription::SetTypeName(const OUString& _sTypeName) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OFieldDescription::copyColumnSettingsTo(const Reference< XPropertySet >& _rxColumn) { if ( _rxColumn.is() ) @@ -667,6 +661,5 @@ void OFieldDescription::copyColumnSettingsTo(const Reference< XPropertySet >& _r _rxColumn->setPropertyValue(PROPERTY_HIDDEN,makeAny(m_bHidden)); } } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 6786a3814918..af425a1eb98c 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -65,13 +65,10 @@ namespace dbaui { extern String GetTypeString( sal_uInt16 nType ); } -//============================================================================== // TYPEINIT1(OTableEditorCtrl, DBView); DBG_NAME(OTableEditorCtrl) -//============================================================================== - #define HANDLE_ID 0 // default field widths @@ -82,9 +79,7 @@ DBG_NAME(OTableEditorCtrl) // Maximum length in description field #define MAX_DESCR_LEN 256 -//================================================================== DBG_NAME(ClipboardInvalidator) -//------------------------------------------------------------------ OTableEditorCtrl::ClipboardInvalidator::ClipboardInvalidator(sal_uLong nTimeout,OTableEditorCtrl* _pOwner) : m_pOwner(_pOwner) { @@ -95,7 +90,6 @@ OTableEditorCtrl::ClipboardInvalidator::ClipboardInvalidator(sal_uLong nTimeout, m_aInvalidateTimer.Start(); } -//------------------------------------------------------------------ OTableEditorCtrl::ClipboardInvalidator::~ClipboardInvalidator() { m_aInvalidateTimer.Stop(); @@ -103,7 +97,6 @@ OTableEditorCtrl::ClipboardInvalidator::~ClipboardInvalidator() DBG_DTOR(ClipboardInvalidator,NULL); } -//------------------------------------------------------------------ IMPL_LINK_NOARG(OTableEditorCtrl::ClipboardInvalidator, OnInvalidate) { m_pOwner->GetView()->getController().InvalidateFeature(SID_CUT); @@ -112,19 +105,16 @@ IMPL_LINK_NOARG(OTableEditorCtrl::ClipboardInvalidator, OnInvalidate) return 0L; } -//================================================================== void OTableEditorCtrl::Init() { DBG_CHKTHIS(OTableEditorCtrl,NULL); OTableRowView::Init(); - ////////////////////////////////////////////////////////////////////// // Should it be opened ReadOnly ? sal_Bool bRead(GetView()->getController().isReadOnly()); SetReadOnly( bRead ); - ////////////////////////////////////////////////////////////////////// // Insert the columns String aColumnName( ModuleRes(STR_TAB_FIELD_COLUMN_NAME) ); InsertDataColumn( FIELD_NAME, aColumnName, FIELDNAME_WIDTH ); @@ -145,12 +135,10 @@ void OTableEditorCtrl::Init() InitCellController(); - ////////////////////////////////////////////////////////////////////// // Insert the rows RowInserted(0, m_pRowList->size(), sal_True); } -//================================================================== void OTableEditorCtrl::UpdateAll() { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -160,7 +148,7 @@ void OTableEditorCtrl::UpdateAll() InvalidateFeatures(); Invalidate(); } -//================================================================== + OTableEditorCtrl::OTableEditorCtrl(Window* pWindow) :OTableRowView(pWindow) ,pNameCell(NULL) @@ -189,20 +177,17 @@ OTableEditorCtrl::OTableEditorCtrl(Window* pWindow) m_nDataPos = 0; } -//------------------------------------------------------------------------------ SfxUndoManager& OTableEditorCtrl::GetUndoManager() const { return GetView()->getController().GetUndoManager(); } -//------------------------------------------------------------------------------ sal_Bool OTableEditorCtrl::IsReadOnly() { DBG_CHKTHIS(OTableEditorCtrl,NULL); return bReadOnly; } -//------------------------------------------------------------------------------ void OTableEditorCtrl::SetReadOnly( sal_Bool bRead ) { // nothing to do? @@ -214,13 +199,11 @@ void OTableEditorCtrl::SetReadOnly( sal_Bool bRead ) DBG_CHKTHIS(OTableEditorCtrl,NULL); bReadOnly = bRead; - ////////////////////////////////////////////////////////////////////// // Disable active cells long nRow(GetCurRow()); sal_uInt16 nCol(GetCurColumnId()); DeactivateCell(); - ////////////////////////////////////////////////////////////////////// // Select the correct Browsers cursor BrowserMode nMode(BROWSER_COLUMNSELECTION | BROWSER_MULTISELECTION | BROWSER_KEEPSELECTION | BROWSER_HLINESFULL | BROWSER_VLINESFULL|BROWSER_AUTOSIZE_LASTCOL); @@ -232,11 +215,9 @@ void OTableEditorCtrl::SetReadOnly( sal_Bool bRead ) ActivateCell( nRow, nCol ); } -//------------------------------------------------------------------------------ void OTableEditorCtrl::InitCellController() { DBG_CHKTHIS(OTableEditorCtrl,NULL); - ////////////////////////////////////////////////////////////////////// // Cell Field name xub_StrLen nMaxTextLen = EDIT_NOLIMIT; OUString sExtraNameChars; @@ -262,13 +243,10 @@ void OTableEditorCtrl::InitCellController() pNameCell->SetMaxTextLen( nMaxTextLen ); pNameCell->setCheck( isSQL92CheckEnabled(xCon) ); - - ////////////////////////////////////////////////////////////////////// // Cell type pTypeCell = new ListBoxControl( &GetDataWindow() ); pTypeCell->SetDropDownLineCount( 15 ); - ////////////////////////////////////////////////////////////////////// // Cell description pDescrCell = new Edit( &GetDataWindow(), WB_LEFT ); pDescrCell->SetMaxTextLen( MAX_DESCR_LEN ); @@ -294,7 +272,6 @@ void OTableEditorCtrl::InitCellController() ClearModified(); } -//------------------------------------------------------------------------------ void OTableEditorCtrl::ClearModified() { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -304,15 +281,12 @@ void OTableEditorCtrl::ClearModified() pTypeCell->SaveValue(); } -//------------------------------------------------------------------------------ OTableEditorCtrl::~OTableEditorCtrl() { DBG_DTOR(OTableEditorCtrl,NULL); - ////////////////////////////////////////////////////////////////////// // Reset the Undo-Manager GetUndoManager().Clear(); - ////////////////////////////////////////////////////////////////////// // Take possible Events from the queue if( nCutEvent ) Application::RemoveUserEvent( nCutEvent ); @@ -325,7 +299,6 @@ OTableEditorCtrl::~OTableEditorCtrl() if( nInvalidateTypeEvent ) Application::RemoveUserEvent( nInvalidateTypeEvent ); - ////////////////////////////////////////////////////////////////////// // Delete the control types delete pNameCell; delete pTypeCell; @@ -333,7 +306,6 @@ OTableEditorCtrl::~OTableEditorCtrl() delete pHelpTextCell; } -//------------------------------------------------------------------------------ sal_Bool OTableEditorCtrl::SetDataPtr( long nRow ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -347,7 +319,6 @@ sal_Bool OTableEditorCtrl::SetDataPtr( long nRow ) return pActRow != 0; } -//------------------------------------------------------------------------------ sal_Bool OTableEditorCtrl::SeekRow(long _nRow) { // Call the Base class to remember which row must be repainted @@ -358,7 +329,6 @@ sal_Bool OTableEditorCtrl::SeekRow(long _nRow) return SetDataPtr(_nRow); } -//------------------------------------------------------------------------------ void OTableEditorCtrl::PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const { @@ -371,11 +341,9 @@ void OTableEditorCtrl::PaintCell(OutputDevice& rDev, const Rectangle& rRect, rDev.Pop(); } -//------------------------------------------------------------------------------ CellController* OTableEditorCtrl::GetController(long nRow, sal_uInt16 nColumnId) { DBG_CHKTHIS(OTableEditorCtrl,NULL); - ////////////////////////////////////////////////////////////////////// // If EditorCtrl is ReadOnly, editing is forbidden Reference<XPropertySet> xTable = GetView()->getController().getTable(); if (IsReadOnly() || ( xTable.is() && @@ -383,7 +351,6 @@ CellController* OTableEditorCtrl::GetController(long nRow, sal_uInt16 nColumnId) ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == OUString("VIEW"))) return NULL; - ////////////////////////////////////////////////////////////////////// // If the row is ReadOnly, editing is forbidden SetDataPtr( nRow ); if( pActRow->IsReadOnly() ) @@ -413,7 +380,6 @@ CellController* OTableEditorCtrl::GetController(long nRow, sal_uInt16 nColumnId) } } -//------------------------------------------------------------------------------ void OTableEditorCtrl::InitController(CellControllerRef&, long nRow, sal_uInt16 nColumnId) { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -434,7 +400,6 @@ void OTableEditorCtrl::InitController(CellControllerRef&, long nRow, sal_uInt16 if ( pActFieldDescr && pActFieldDescr->getTypeInfo() ) aInitString = pActFieldDescr->getTypeInfo()->aUIName; - ////////////////////////////////////////////////////////////// // Set the ComboBox contents pTypeCell->Clear(); if( !pActFieldDescr ) @@ -465,7 +430,6 @@ void OTableEditorCtrl::InitController(CellControllerRef&, long nRow, sal_uInt16 } } -//------------------------------------------------------------------------------ EditBrowseBox::RowStatus OTableEditorCtrl::GetRowStatus(long nRow) const { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -486,7 +450,6 @@ EditBrowseBox::RowStatus OTableEditorCtrl::GetRowStatus(long nRow) const } } -//------------------------------------------------------------------------------ sal_Bool OTableEditorCtrl::SaveCurRow() { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -501,7 +464,6 @@ sal_Bool OTableEditorCtrl::SaveCurRow() return sal_True; } -//------------------------------------------------------------------------------ void OTableEditorCtrl::DisplayData(long nRow, sal_Bool bGrabFocus) { // go to the correct cell @@ -529,11 +491,9 @@ void OTableEditorCtrl::DisplayData(long nRow, sal_Bool bGrabFocus) ActivateCell(nRow, GetCurColumnId(), bGrabFocus); } -//------------------------------------------------------------------------------ void OTableEditorCtrl::CursorMoved() { DBG_CHKTHIS(OTableEditorCtrl,NULL); - ////////////////////////////////////////////////////////////////////// // New line ? m_nDataPos = GetCurRow(); if( m_nDataPos != nOldDataPos && m_nDataPos != -1) @@ -548,7 +508,6 @@ void OTableEditorCtrl::CursorMoved() OTableRowView::CursorMoved(); } -//------------------------------------------------------------------------------ sal_Int32 OTableEditorCtrl::HasFieldName( const String& rFieldName ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -570,28 +529,24 @@ sal_Int32 OTableEditorCtrl::HasFieldName( const String& rFieldName ) } return nCount; } -// -------------------------------------------------------------------------------------- + sal_Bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId) { DBG_CHKTHIS(OTableEditorCtrl,NULL); - ////////////////////////////////////////////////////////////// // Store the cell content SetDataPtr( nRow == -1 ? GetCurRow() : nRow); OFieldDescription* pActFieldDescr = pActRow->GetActFieldDescr(); switch( nColId) { - ////////////////////////////////////////////////////////////// // Store NameCell case FIELD_NAME: { - ////////////////////////////////////////////////////////////// // If there is no name, do nothing String aName(pNameCell->GetText()); if( !aName.Len() ) { - ////////////////////////////////////////////////////////////// // If FieldDescr exists, the field is deleted and the old content restored if (pActFieldDescr) { @@ -609,16 +564,13 @@ sal_Bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId) break; } - ////////////////////////////////////////////////////////////// // Store the field type case FIELD_TYPE: break; - ////////////////////////////////////////////////////////////// // Store DescrCell case HELP_TEXT: { - ////////////////////////////////////////////////////////////// // Wenn aktuelle Feldbeschreibung NULL, Default setzen if( !pActFieldDescr ) { @@ -631,7 +583,6 @@ sal_Bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId) } case COLUMN_DESCRIPTION: { - ////////////////////////////////////////////////////////////// // Set the default if the field description is null if( !pActFieldDescr ) { @@ -667,7 +618,6 @@ sal_Bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId) return sal_True; } -//------------------------------------------------------------------------------ sal_Bool OTableEditorCtrl::SaveModified() { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -675,11 +625,9 @@ sal_Bool OTableEditorCtrl::SaveModified() switch( nColId ) { - ////////////////////////////////////////////////////////////// // Fieled type case FIELD_TYPE: { - ////////////////////////////////////////////////////////////////////// // Reset the type resetType(); } break; @@ -688,7 +636,6 @@ sal_Bool OTableEditorCtrl::SaveModified() return sal_True; } -//------------------------------------------------------------------------------ sal_Bool OTableEditorCtrl::CursorMoving(long nNewRow, sal_uInt16 nNewCol) { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -696,22 +643,18 @@ sal_Bool OTableEditorCtrl::CursorMoving(long nNewRow, sal_uInt16 nNewCol) if (!EditBrowseBox::CursorMoving(nNewRow, nNewCol)) return sal_False; - ////////////////////////////////////////////////////////////////////// // Called after SaveModified(), current row is still the old one m_nDataPos = nNewRow; nOldDataPos = GetCurRow(); - ////////////////////////////////////////////////////////////////////// // Reset the markers InvalidateStatusCell( nOldDataPos ); InvalidateStatusCell( m_nDataPos ); - ////////////////////////////////////////////////////////////////////// // Store the data from the Property window if( SetDataPtr(nOldDataPos) && pDescrWin) pDescrWin->SaveData( pActRow->GetActFieldDescr() ); - ////////////////////////////////////////////////////////////////////// // Show new data in the Property window if( SetDataPtr(m_nDataPos) && pDescrWin) pDescrWin->DisplayData( pActRow->GetActFieldDescr() ); @@ -719,7 +662,6 @@ sal_Bool OTableEditorCtrl::CursorMoving(long nNewRow, sal_uInt16 nNewCol) return sal_True; } -//------------------------------------------------------------------------------ IMPL_LINK( OTableEditorCtrl, InvalidateFieldType, void*, /*EMPTYTAG*/ ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -729,12 +671,10 @@ IMPL_LINK( OTableEditorCtrl, InvalidateFieldType, void*, /*EMPTYTAG*/ ) return 0; } -//------------------------------------------------------------------------------ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); - ////////////////////////////////////////////////////////////// // If the description is null, use the default if(nRow == -1) nRow = GetCurRow(); @@ -787,12 +727,11 @@ void OTableEditorCtrl::CellModified( long nRow, sal_uInt16 nColId ) if(xController.Is()) xController->SetModified(); - ////////////////////////////////////////////////////////////////////// // Set the Modify flag GetView()->getController().setModified( sal_True ); InvalidateFeatures(); } -// ----------------------------------------------------------------------------- + void OTableEditorCtrl::resetType() { sal_uInt16 nPos = pTypeCell->GetSelectEntryPos(); @@ -801,43 +740,40 @@ void OTableEditorCtrl::resetType() else SwitchType(TOTypeInfoSP()); } -//------------------------------------------------------------------------------ + void OTableEditorCtrl::CellModified() { DBG_CHKTHIS(OTableEditorCtrl,NULL); CellModified( GetCurRow(), GetCurColumnId() ); } -// ----------------------------------------------------------------------------- + void OTableEditorCtrl::InvalidateFeatures() { GetView()->getController().InvalidateFeature(SID_UNDO); GetView()->getController().InvalidateFeature(SID_REDO); GetView()->getController().InvalidateFeature(SID_SAVEDOC); } -//------------------------------------------------------------------------------ + void OTableEditorCtrl::Undo() { DBG_CHKTHIS(OTableEditorCtrl,NULL); InvalidateFeatures(); } -//------------------------------------------------------------------------------ + void OTableEditorCtrl::Redo() { DBG_CHKTHIS(OTableEditorCtrl,NULL); InvalidateFeatures(); } -//------------------------------------------------------------------------------ void OTableEditorCtrl::CopyRows() { DBG_CHKTHIS(OTableEditorCtrl,NULL); - ////////////////////////////////////////////////////////////////////// // set to the right row and save it if( SetDataPtr(m_nDataPos) ) pDescrWin->SaveData( pActRow->GetActFieldDescr() ); - ////////////////////////////////////////////////////////////////////// // Copy selected rows to the ClipboardList ::boost::shared_ptr<OTableRow> pClipboardRow; ::boost::shared_ptr<OTableRow> pRow; @@ -862,11 +798,9 @@ void OTableEditorCtrl::CopyRows() } } -//------------------------------------------------------------------------------ String OTableEditorCtrl::GenerateName( const String& rName ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); - ////////////////////////////////////////////////////////////////////// // Create a base name for appending numbers to String aBaseName; Reference<XConnection> xCon = GetView()->getController().getConnection(); @@ -879,7 +813,6 @@ String OTableEditorCtrl::GenerateName( const String& rName ) else aBaseName = rName; - ////////////////////////////////////////////////////////////////////// // append a sequential number to the base name (up to 99) String aFieldName( rName); sal_Int32 i=1; @@ -892,13 +825,11 @@ String OTableEditorCtrl::GenerateName( const String& rName ) return aFieldName; } -//------------------------------------------------------------------------------ void OTableEditorCtrl::InsertRows( long nRow ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); ::std::vector< ::boost::shared_ptr<OTableRow> > vInsertedUndoRedoRows; // need for undo/redo handling - ////////////////////////////////////////////////////////////////////// // get rows from clipboard TransferableDataHelper aTransferData(TransferableDataHelper::CreateFromSystemClipboard(GetParent())); if(aTransferData.HasFormat(SOT_FORMATSTR_ID_SBA_TABED)) @@ -923,7 +854,6 @@ void OTableEditorCtrl::InsertRows( long nRow ) sal_Int32 nType = pRow->GetActFieldDescr()->GetType(); if ( pRow->GetActFieldDescr() ) pRow->GetActFieldDescr()->SetType(GetView()->getController().getTypeInfoByType(nType)); - ////////////////////////////////////////////////////////////////////// // Adjust the field names aFieldName = GenerateName( pRow->GetActFieldDescr()->GetName() ); pRow->GetActFieldDescr()->SetName( aFieldName ); @@ -934,31 +864,25 @@ void OTableEditorCtrl::InsertRows( long nRow ) } } } - ////////////////////////////////////////////////////////////////////// // RowInserted calls CursorMoved. // The UI data should not be stored here. bSaveOnMove = sal_False; RowInserted( nRow,vInsertedUndoRedoRows.size(),sal_True ); bSaveOnMove = sal_True; - ////////////////////////////////////////////////////////////////////// // Create the Undo-Action GetUndoManager().AddUndoAction( new OTableEditorInsUndoAct(this, nRow,vInsertedUndoRedoRows) ); GetView()->getController().setModified( sal_True ); InvalidateFeatures(); } -//------------------------------------------------------------------------------ void OTableEditorCtrl::DeleteRows() { DBG_CHKTHIS(OTableEditorCtrl,NULL); OSL_ENSURE(GetView()->getController().isDropAllowed(),"Call of DeleteRows not valid here. Please check isDropAllowed!"); - ////////////////////////////////////////////////////////////////////// // Create the Undo-Action GetUndoManager().AddUndoAction( new OTableEditorDelUndoAct(this) ); - - ////////////////////////////////////////////////////////////////////// // Delete all marked rows long nIndex = FirstSelectedRow(); nOldDataPos = nIndex; @@ -966,12 +890,10 @@ void OTableEditorCtrl::DeleteRows() while( nIndex >= 0 && nIndex < static_cast<long>(m_pRowList->size()) ) { - ////////////////////////////////////////////////////////////////////// // Remove rows m_pRowList->erase( m_pRowList->begin()+nIndex ); RowRemoved( nIndex, 1, sal_True ); - ////////////////////////////////////////////////////////////////////// // Insert the empty row at the end m_pRowList->push_back( ::boost::shared_ptr<OTableRow>(new OTableRow())); RowInserted( GetRowCount()-1, 1, sal_True ); @@ -981,7 +903,6 @@ void OTableEditorCtrl::DeleteRows() bSaveOnMove = sal_True; - ////////////////////////////////////////////////////////////////////// // Force the current record to be displayed m_nDataPos = GetCurRow(); InvalidateStatusCell( nOldDataPos ); @@ -993,18 +914,15 @@ void OTableEditorCtrl::DeleteRows() InvalidateFeatures(); } -//------------------------------------------------------------------------------ void OTableEditorCtrl::InsertNewRows( long nRow ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); OSL_ENSURE(GetView()->getController().isAddAllowed(),"Call of InsertNewRows not valid here. Please check isAppendAllowed!"); - ////////////////////////////////////////////////////////////////////// // Create Undo-Action long nInsertRows = GetSelectRowCount(); if( !nInsertRows ) nInsertRows = 1; GetUndoManager().AddUndoAction( new OTableEditorInsNewUndoAct(this, nRow, nInsertRows) ); - ////////////////////////////////////////////////////////////////////// // Insert the number of of selected rows for( long i=nRow; i<(nRow+nInsertRows); i++ ) m_pRowList->insert( m_pRowList->begin()+i ,::boost::shared_ptr<OTableRow>(new OTableRow())); @@ -1014,11 +932,9 @@ void OTableEditorCtrl::InsertNewRows( long nRow ) InvalidateFeatures(); } -//------------------------------------------------------------------------------ String OTableEditorCtrl::GetControlText( long nRow, sal_uInt16 nColId ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); - ////////////////////////////////////////////////////////////////////// // Read the Browser Controls if( nColId < FIELD_FIRST_VIRTUAL_COLUMN ) { @@ -1031,17 +947,14 @@ String OTableEditorCtrl::GetControlText( long nRow, sal_uInt16 nColId ) return GetCellText(nRow,nColId); } - ////////////////////////////////////////////////////////////////////// // Read the Controls on the Tabpage else return pDescrWin->GetControlText( nColId ); } -//------------------------------------------------------------------------------ void OTableEditorCtrl::SetControlText( long nRow, sal_uInt16 nColId, const String& rText ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); - ////////////////////////////////////////////////////////////////////// // Set the Browser Controls if( nColId < FIELD_FIRST_VIRTUAL_COLUMN ) { @@ -1054,18 +967,16 @@ void OTableEditorCtrl::SetControlText( long nRow, sal_uInt16 nColId, const Strin RowModified(nRow,nColId); } - ////////////////////////////////////////////////////////////////////// // Set the Tabpage controls else { pDescrWin->SetControlText( nColId, rText ); } } -//------------------------------------------------------------------------------ + void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); - ////////////////////////////////////////////////////////////////////// // Relocate the current pointer if( nRow == -1 ) nRow = GetCurRow(); @@ -1073,7 +984,6 @@ void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const TOTypeIn if( !pFieldDescr && nColId != FIELD_TYPE) return; - ////////////////////////////////////////////////////////////////////// // Set individual fields switch( nColId ) { @@ -1085,11 +995,10 @@ void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const TOTypeIn } SetControlText(nRow,nColId,_pTypeInfo.get() ? _pTypeInfo->aUIName : OUString()); } -//------------------------------------------------------------------------------ + void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const ::com::sun::star::uno::Any& _rNewData ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); - ////////////////////////////////////////////////////////////////////// // Relocate the current pointer if( nRow == -1 ) nRow = GetCurRow(); @@ -1098,7 +1007,6 @@ void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const ::com::s return; String sValue; - ////////////////////////////////////////////////////////////////////// // Set indvidual fields switch( nColId ) { @@ -1169,7 +1077,6 @@ void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const ::com::s SetControlText(nRow,nColId,sValue); } -//------------------------------------------------------------------------------ Any OTableEditorCtrl::GetCellData( long nRow, sal_uInt16 nColId ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -1177,7 +1084,6 @@ Any OTableEditorCtrl::GetCellData( long nRow, sal_uInt16 nColId ) if( !pFieldDescr ) return Any(); - ////////////////////////////////////////////////////////////////////// // Relocate the current pointer if( nRow==-1 ) nRow = GetCurRow(); @@ -1186,7 +1092,6 @@ Any OTableEditorCtrl::GetCellData( long nRow, sal_uInt16 nColId ) static const String strYes(ModuleRes(STR_VALUE_YES)); static const String strNo(ModuleRes(STR_VALUE_NO)); OUString sValue; - ////////////////////////////////////////////////////////////////////// // Read out the fields switch( nColId ) { @@ -1242,7 +1147,6 @@ Any OTableEditorCtrl::GetCellData( long nRow, sal_uInt16 nColId ) return makeAny(sValue); } -//------------------------------------------------------------------------------ OUString OTableEditorCtrl::GetCellText( long nRow, sal_uInt16 nColId ) const { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -1251,14 +1155,12 @@ OUString OTableEditorCtrl::GetCellText( long nRow, sal_uInt16 nColId ) const return sCellText; } -//------------------------------------------------------------------------------ sal_uInt32 OTableEditorCtrl::GetTotalCellWidth(long nRow, sal_uInt16 nColId) { DBG_CHKTHIS(OTableEditorCtrl,NULL); return GetTextWidth(GetCellText(nRow, nColId)) + 2 * GetTextWidth(OUString('0')); } -//------------------------------------------------------------------------------ OFieldDescription* OTableEditorCtrl::GetFieldDescr( long nRow ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -1275,7 +1177,6 @@ OFieldDescription* OTableEditorCtrl::GetFieldDescr( long nRow ) return pRow->GetActFieldDescr(); } -//------------------------------------------------------------------------------ sal_Bool OTableEditorCtrl::IsCutAllowed( long nRow ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -1307,7 +1208,6 @@ sal_Bool OTableEditorCtrl::IsCutAllowed( long nRow ) return bIsCutAllowed; } -//------------------------------------------------------------------------------ sal_Bool OTableEditorCtrl::IsCopyAllowed( long /*nRow*/ ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -1324,7 +1224,6 @@ sal_Bool OTableEditorCtrl::IsCopyAllowed( long /*nRow*/ ) if( !GetSelectRowCount() || (xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == "VIEW")) return sal_False; - ////////////////////////////////////////////////////////////////////// // If one of the selected rows is empty, Copy is not possible ::boost::shared_ptr<OTableRow> pRow; long nIndex = FirstSelectedRow(); @@ -1343,7 +1242,6 @@ sal_Bool OTableEditorCtrl::IsCopyAllowed( long /*nRow*/ ) return bIsCopyAllowed; } -//------------------------------------------------------------------------------ sal_Bool OTableEditorCtrl::IsPasteAllowed( long /*nRow*/ ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -1361,7 +1259,6 @@ sal_Bool OTableEditorCtrl::IsPasteAllowed( long /*nRow*/ ) return bAllowed; } -//------------------------------------------------------------------------------ void OTableEditorCtrl::cut() { if(m_eChildFocus == NAME) @@ -1399,7 +1296,6 @@ void OTableEditorCtrl::cut() } } -//------------------------------------------------------------------------------ void OTableEditorCtrl::copy() { if(GetSelectRowCount()) @@ -1412,7 +1308,6 @@ void OTableEditorCtrl::copy() pDescrCell->Copy(); } -//------------------------------------------------------------------------------ void OTableEditorCtrl::paste() { TransferableDataHelper aTransferData(TransferableDataHelper::CreateFromSystemClipboard(GetParent())); @@ -1448,7 +1343,6 @@ void OTableEditorCtrl::paste() } } -//------------------------------------------------------------------------------ sal_Bool OTableEditorCtrl::IsDeleteAllowed( long /*nRow*/ ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -1456,13 +1350,11 @@ sal_Bool OTableEditorCtrl::IsDeleteAllowed( long /*nRow*/ ) return GetSelectRowCount() != 0 && GetView()->getController().isDropAllowed(); } -//------------------------------------------------------------------------------ sal_Bool OTableEditorCtrl::IsInsertNewAllowed( long nRow ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); sal_Bool bInsertNewAllowed = GetView()->getController().isAddAllowed(); - ////////////////////////////////////////////////////////////// // If fields can be added, Paste in the new fields if (bInsertNewAllowed && !GetView()->getController().isDropAllowed()) { @@ -1474,7 +1366,6 @@ sal_Bool OTableEditorCtrl::IsInsertNewAllowed( long nRow ) return bInsertNewAllowed; } -//------------------------------------------------------------------------------ sal_Bool OTableEditorCtrl::IsPrimaryKeyAllowed( long /*nRow*/ ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -1486,13 +1377,11 @@ sal_Bool OTableEditorCtrl::IsPrimaryKeyAllowed( long /*nRow*/ ) return sal_False; Reference<XPropertySet> xTable = rController.getTable(); - ////////////////////////////////////////////////////////////// // Key must not be changed // This applies only if the table is not new and not a ::com::sun::star::sdbcx::View. Otherwise no DROP is executed if(xTable.is() && ::comphelper::getString(xTable->getPropertyValue(PROPERTY_TYPE)) == "VIEW") return sal_False; - ////////////////////////////////////////////////////////////// // If there is an empty field, no primary key // The entry is only permitted if // - there are no empty entries in the selection @@ -1508,7 +1397,6 @@ sal_Bool OTableEditorCtrl::IsPrimaryKeyAllowed( long /*nRow*/ ) return sal_False; else { - ////////////////////////////////////////////////////////////// // Memo and Image fields cannot be primary keys // or if the columne cannot be dropped and the Required flag is not set // or if a ::com::sun::star::sdbcx::View is avalable and the Required flag is not set @@ -1525,7 +1413,6 @@ sal_Bool OTableEditorCtrl::IsPrimaryKeyAllowed( long /*nRow*/ ) return sal_True; } -//------------------------------------------------------------------------------ void OTableEditorCtrl::Command(const CommandEvent& rEvt) { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -1558,7 +1445,6 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) } } - ////////////////////////////////////////////////////////////// // Show the Context menu if( !IsReadOnly() ) { @@ -1604,7 +1490,6 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) if( SetDataPtr(m_nDataPos) ) pDescrWin->SaveData( pActRow->GetActFieldDescr() ); - ////////////////////////////////////////////////////////////// // All actions which change the number of rows must be run asynchronously // otherwise there may be problems between the Context menu and the Browser m_nDataPos = GetCurRow(); @@ -1645,7 +1530,6 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) } -//------------------------------------------------------------------------------ IMPL_LINK( OTableEditorCtrl, DelayedCut, void*, /*EMPTYTAG*/ ) { nCutEvent = 0; @@ -1653,7 +1537,6 @@ IMPL_LINK( OTableEditorCtrl, DelayedCut, void*, /*EMPTYTAG*/ ) return 0; } -//------------------------------------------------------------------------------ IMPL_LINK( OTableEditorCtrl, DelayedPaste, void*, /*EMPTYTAG*/ ) { nPasteEvent = 0; @@ -1682,7 +1565,6 @@ IMPL_LINK( OTableEditorCtrl, DelayedPaste, void*, /*EMPTYTAG*/ ) return 0; } -//------------------------------------------------------------------------------ IMPL_LINK( OTableEditorCtrl, DelayedDelete, void*, /*EMPTYTAG*/ ) { nDeleteEvent = 0; @@ -1690,7 +1572,6 @@ IMPL_LINK( OTableEditorCtrl, DelayedDelete, void*, /*EMPTYTAG*/ ) return 0; } -//------------------------------------------------------------------------------ IMPL_LINK( OTableEditorCtrl, DelayedInsNewRows, void*, /*EMPTYTAG*/ ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); @@ -1705,7 +1586,7 @@ IMPL_LINK( OTableEditorCtrl, DelayedInsNewRows, void*, /*EMPTYTAG*/ ) return 0; } -// ----------------------------------------------------------------------------- + void OTableEditorCtrl::AdjustFieldDescription(OFieldDescription* _pFieldDesc, MultiSelection& _rMultiSel, sal_Int32 _nPos, @@ -1726,18 +1607,16 @@ void OTableEditorCtrl::AdjustFieldDescription(OFieldDescription* _pFieldDesc, _pFieldDesc->SetAutoIncrement(false); } } - ////////////////////////////////////////////////////////////////////// // update field description pDescrWin->DisplayData(_pFieldDesc); _rMultiSel.Insert( _nPos ); _rMultiSel.Select( _nPos ); } -//------------------------------------------------------------------------------ + void OTableEditorCtrl::SetPrimaryKey( sal_Bool bSet ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); - ////////////////////////////////////////////////////////////////////// // Delete any existing Primary Keys MultiSelection aDeletedPrimKeys; aDeletedPrimKeys.SetTotalRange( Range(0,GetRowCount()) ); @@ -1753,7 +1632,6 @@ void OTableEditorCtrl::SetPrimaryKey( sal_Bool bSet ) } } - ////////////////////////////////////////////////////////////////////// // Set the primary keys of the marked rows MultiSelection aInsertedPrimKeys; aInsertedPrimKeys.SetTotalRange( Range(0,GetRowCount()) ); @@ -1762,7 +1640,6 @@ void OTableEditorCtrl::SetPrimaryKey( sal_Bool bSet ) long nIndex = FirstSelectedRow(); while( nIndex >= 0 && nIndex < static_cast<long>(m_pRowList->size()) ) { - ////////////////////////////////////////////////////////////////////// // Set the key ::boost::shared_ptr<OTableRow> pRow = (*m_pRowList)[nIndex]; OFieldDescription* pFieldDescr = pRow->GetActFieldDescr(); @@ -1775,22 +1652,17 @@ void OTableEditorCtrl::SetPrimaryKey( sal_Bool bSet ) GetUndoManager().AddUndoAction( new OPrimKeyUndoAct(this, aDeletedPrimKeys, aInsertedPrimKeys) ); - ////////////////////////////////////////////////////////////////////// // Invalidate the handle-columns InvalidateHandleColumn(); - - ////////////////////////////////////////////////////////////////////// // Set the TableDocSh's ModifyFlag GetView()->getController().setModified( sal_True ); InvalidateFeatures(); } -//------------------------------------------------------------------------------ sal_Bool OTableEditorCtrl::IsPrimaryKey() { DBG_CHKTHIS(OTableEditorCtrl,NULL); - ////////////////////////////////////////////////////////////////////// // Are all marked fields part of the Primary Key ? long nPrimaryKeys = 0; ::std::vector< ::boost::shared_ptr<OTableRow> >::const_iterator aIter = m_pRowList->begin(); @@ -1803,27 +1675,22 @@ sal_Bool OTableEditorCtrl::IsPrimaryKey() ++nPrimaryKeys; } - ////////////////////////////////////////////////////////////////////// // Are there any unselected fields that are part of the Key ? return GetSelectRowCount() == nPrimaryKeys; } -//------------------------------------------------------------------------------ void OTableEditorCtrl::SwitchType( const TOTypeInfoSP& _pType ) { DBG_CHKTHIS(OTableEditorCtrl,NULL); - ////////////////////////////////////////////////////////////////////// // if there is no assigned field name long nRow(GetCurRow()); OFieldDescription* pActFieldDescr = GetFieldDescr( nRow ); if( pActFieldDescr ) - ////////////////////////////////////////////////////////////////////// // Store the old description pDescrWin->SaveData( pActFieldDescr ); if ( nRow < 0 || nRow > static_cast<long>(m_pRowList->size()) ) return; - ////////////////////////////////////////////////////////////////////// // Show the new description ::boost::shared_ptr<OTableRow> pRow = (*m_pRowList)[nRow]; pRow->SetFieldType( _pType, sal_True ); @@ -1863,12 +1730,12 @@ void OTableEditorCtrl::SwitchType( const TOTypeInfoSP& _pType ) pDescrWin->DisplayData( pActFieldDescr ); } -// ----------------------------------------------------------------------------- + OTableDesignView* OTableEditorCtrl::GetView() const { return static_cast<OTableDesignView*>(GetParent()->GetParent()); } -// ----------------------------------------------------------------------------- + void OTableEditorCtrl::DeactivateCell(sal_Bool bUpdate) { OTableRowView::DeactivateCell(bUpdate); @@ -1877,7 +1744,7 @@ void OTableEditorCtrl::DeactivateCell(sal_Bool bUpdate) if (pDescrWin) pDescrWin->SetReadOnly(bReadOnly || !SetDataPtr(nRow) || GetActRow()->IsReadOnly()); } -//------------------------------------------------------------------------------ + long OTableEditorCtrl::PreNotify( NotifyEvent& rNEvt ) { if (rNEvt.GetType() == EVENT_GETFOCUS) @@ -1894,9 +1761,5 @@ long OTableEditorCtrl::PreNotify( NotifyEvent& rNEvt ) return OTableRowView::PreNotify(rNEvt); } -// ----------------------------------------------------------------------------- - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx index 92394940b9e0..5f55f4281139 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.hxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx @@ -66,7 +66,6 @@ namespace dbaui sal_Bool bSaveOnMove; sal_Bool bReadOnly; - //------------------------------------------------------------------ // Hilfsklasse class ClipboardInvalidator { @@ -206,6 +205,4 @@ namespace dbaui } #endif // DBAUI_TABLEEDITORCONTROL_HXX - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index 2b53bef2d5d7..db9a5ca5da3d 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "FieldDescriptions.hxx" #include "TEditControl.hxx" #include "TableController.hxx" @@ -111,7 +110,6 @@ namespace xNameCont->dropByName(_sTableName); } } - //------------------------------------------------------------------------------ struct OTableRowCompare : public ::std::binary_function< ::boost::shared_ptr<OTableRow> , OUString, bool> { bool operator() (const ::boost::shared_ptr<OTableRow> lhs, const OUString& rhs) const @@ -123,37 +121,34 @@ namespace } -//------------------------------------------------------------------------------ OUString SAL_CALL OTableController::getImplementationName() throw( RuntimeException ) { return getImplementationName_Static(); } -//------------------------------------------------------------------------------ OUString OTableController::getImplementationName_Static() throw( RuntimeException ) { return OUString("org.openoffice.comp.dbu.OTableDesign"); } -//------------------------------------------------------------------------------ + Sequence< OUString> OTableController::getSupportedServiceNames_Static(void) throw( RuntimeException ) { Sequence< OUString> aSupported(1); aSupported.getArray()[0] = OUString("com.sun.star.sdb.TableDesign"); return aSupported; } -//------------------------------------------------------------------------- + Sequence< OUString> SAL_CALL OTableController::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL OTableController::Create(const Reference<XMultiServiceFactory >& _rxFactory) { return *(new OTableController(comphelper::getComponentContext(_rxFactory))); } DBG_NAME(OTableController) -// ----------------------------------------------------------------------------- OTableController::OTableController(const Reference< XComponentContext >& _rM) : OTableController_BASE(_rM) ,m_sTypeNames(ModuleRes(STR_TABLEDESIGN_DBFIELDTYPES)) ,m_pTypeInfo() @@ -166,7 +161,7 @@ OTableController::OTableController(const Reference< XComponentContext >& _rM) : m_pTypeInfo = TOTypeInfoSP(new OTypeInfo()); m_pTypeInfo->aUIName = m_sTypeNames.GetToken(TYPE_OTHER); } -// ----------------------------------------------------------------------------- + OTableController::~OTableController() { m_aTypeInfoIndex.clear(); @@ -175,7 +170,6 @@ OTableController::~OTableController() DBG_DTOR(OTableController,NULL); } -// ----------------------------------------------------------------------------- void OTableController::startTableListening() { Reference< XComponent > xComponent(m_xTable, UNO_QUERY); @@ -183,7 +177,6 @@ void OTableController::startTableListening() xComponent->addEventListener(static_cast<XModifyListener*>(this)); } -// ----------------------------------------------------------------------------- void OTableController::stopTableListening() { Reference< XComponent > xComponent(m_xTable, UNO_QUERY); @@ -191,7 +184,6 @@ void OTableController::stopTableListening() xComponent->removeEventListener(static_cast<XModifyListener*>(this)); } -// ----------------------------------------------------------------------------- void OTableController::disposing() { OTableController_BASE::disposing(); @@ -199,7 +191,7 @@ void OTableController::disposing() m_vRowList.clear(); } -// ----------------------------------------------------------------------------- + FeatureState OTableController::GetState(sal_uInt16 _nId) const { FeatureState aReturn; @@ -261,7 +253,7 @@ FeatureState OTableController::GetState(sal_uInt16 _nId) const } return aReturn; } -// ----------------------------------------------------------------------------- + void OTableController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& aArgs) { switch(_nId) @@ -297,7 +289,6 @@ void OTableController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >& InvalidateFeature(_nId); } -// ----------------------------------------------------------------------------- sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs) { if (!isConnected()) @@ -464,7 +455,6 @@ sal_Bool OTableController::doSaveDoc(sal_Bool _bSaveAs) return ! (aInfo.isValid() || bError); } -// ----------------------------------------------------------------------------- void OTableController::doEditIndexes() { // table needs to be saved before editing indexes @@ -519,7 +509,6 @@ void OTableController::doEditIndexes() } -// ----------------------------------------------------------------------------- void OTableController::impl_initialize() { try @@ -561,14 +550,14 @@ void OTableController::impl_initialize() DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + sal_Bool OTableController::Construct(Window* pParent) { setView( * new OTableDesignView( pParent, getORB(), *this ) ); OTableController_BASE::Construct(pParent); return sal_True; } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( RuntimeException ) { if ( getBroadcastHelper().bInDispose || getBroadcastHelper().bDisposed ) @@ -631,7 +620,7 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti return bCheck; } -// ----------------------------------------------------------------------------- + void OTableController::describeSupportedFeatures() { OSingleDocumentController::describeSupportedFeatures(); @@ -645,13 +634,13 @@ void OTableController::describeSupportedFeatures() implDescribeSupportedFeature( ".uno:DBIndexDesign", SID_INDEXDESIGN, CommandGroup::APPLICATION ); implDescribeSupportedFeature( ".uno:EditDoc", ID_BROWSER_EDITDOC, CommandGroup::EDIT ); } -// ----------------------------------------------------------------------------- + void OTableController::impl_onModifyChanged() { OSingleDocumentController::impl_onModifyChanged(); InvalidateFeature( SID_INDEXDESIGN ); } -// ----------------------------------------------------------------------------- + void SAL_CALL OTableController::disposing( const EventObject& _rSource ) throw(RuntimeException) { if ( _rSource.Source == m_xTable ) @@ -664,19 +653,18 @@ void SAL_CALL OTableController::disposing( const EventObject& _rSource ) throw(R else OTableController_BASE::disposing( _rSource ); } -// ----------------------------------------------------------------------------- + void OTableController::Save(const Reference< XObjectOutputStream>& _rxOut) { OStreamSection aSection(_rxOut.get()); } -// ----------------------------------------------------------------------------- + void OTableController::Load(const Reference< XObjectInputStream>& _rxIn) { OStreamSection aSection(_rxIn.get()); } -// ----------------------------------------------------------------------------- void OTableController::losingConnection( ) { // let the base class do it's reconnect @@ -699,12 +687,12 @@ void OTableController::losingConnection( ) } InvalidateAll(); } -// ----------------------------------------------------------------------------- + TOTypeInfoSP OTableController::getTypeInfoByType(sal_Int32 _nDataType) const { return queryTypeInfoByType(_nDataType,m_aTypeInfo); } -// ----------------------------------------------------------------------------- + void OTableController::appendColumns(Reference<XColumnsSupplier>& _rxColSup,sal_Bool _bNew,sal_Bool _bKeyColumns) { try @@ -765,7 +753,7 @@ void OTableController::appendColumns(Reference<XColumnsSupplier>& _rxColSup,sal_ DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + void OTableController::appendPrimaryKey(Reference<XKeysSupplier>& _rxSup,sal_Bool _bNew) { if(!_rxSup.is()) @@ -807,16 +795,14 @@ void OTableController::appendPrimaryKey(Reference<XKeysSupplier>& _rxSup,sal_Boo xAppend->appendByDescriptor(xKey); } } -// ----------------------------------------------------------------------------- + void OTableController::loadData() { - ////////////////////////////////////////////////////////////////////// // Wenn Datenstruktur bereits vorhanden, Struktur leeren m_vRowList.clear(); ::boost::shared_ptr<OTableRow> pTabEdRow; Reference< XDatabaseMetaData> xMetaData = getMetaData( ); - ////////////////////////////////////////////////////////////////////// // Datenstruktur mit Daten aus DatenDefinitionsObjekt fuellen if(m_xTable.is() && xMetaData.is()) { @@ -824,7 +810,6 @@ void OTableController::loadData() OSL_ENSURE(xColSup.is(),"No XColumnsSupplier!"); Reference<XNameAccess> xColumns = xColSup->getColumns(); OFieldDescription* pActFieldDescr = NULL; - ////////////////////////////////////////////////////////////////////// // ReadOnly-Flag // Bei Drop darf keine Zeile editierbar sein. // Bei Add duerfen nur die leeren Zeilen editierbar sein. @@ -893,7 +878,6 @@ void OTableController::loadData() pActFieldDescr->SetHorJustify(dbaui::mapTextJustify(nAlign)); pActFieldDescr->SetCurrency(bIsCurrency); - ////////////////////////////////////////////////////////////////////// // Spezielle Daten pActFieldDescr->SetIsNullable(nNullable); pActFieldDescr->SetControlDefault(aControlDefault); @@ -926,7 +910,6 @@ void OTableController::loadData() } } - ////////////////////////////////////////////////////////////////////// // Leere Zeilen fuellen OTypeInfoMap::iterator aTypeIter = m_aTypeInfo.find(DataType::VARCHAR); @@ -943,12 +926,12 @@ void OTableController::loadData() m_vRowList.push_back( pTabEdRow); } } -// ----------------------------------------------------------------------------- + Reference<XNameAccess> OTableController::getKeyColumns() const { return getPrimaryKeyColumns_throw(m_xTable); } -// ----------------------------------------------------------------------------- + sal_Bool OTableController::checkColumns(sal_Bool _bNew) throw(::com::sun::star::sdbc::SQLException) { sal_Bool bOk = sal_True; @@ -1016,7 +999,7 @@ sal_Bool OTableController::checkColumns(sal_Bool _bNew) throw(::com::sun::star:: } return bOk; } -// ----------------------------------------------------------------------------- + void OTableController::alterColumns() { Reference<XColumnsSupplier> xColSup(m_xTable,UNO_QUERY_THROW); @@ -1141,7 +1124,6 @@ void OTableController::alterColumns() bReload = sal_True; } - } else if(xColumnFactory.is() && xAlter.is() && nPos < nColumnCount) { // we can't find the column so we could try it with the index before we drop and append a new column @@ -1302,7 +1284,6 @@ void OTableController::alterColumns() } } - // check if we have to do something with the primary key sal_Bool bNeedDropKey = sal_False; sal_Bool bNeedAppendKey = sal_False; @@ -1351,7 +1332,7 @@ void OTableController::alterColumns() if ( bReload ) reload(); } -// ----------------------------------------------------------------------------- + void OTableController::dropPrimaryKey() { SQLExceptionInfo aInfo; @@ -1398,7 +1379,7 @@ void OTableController::dropPrimaryKey() showError(aInfo); } -// ----------------------------------------------------------------------------- + void OTableController::assignTable() { // get the table @@ -1431,7 +1412,7 @@ void OTableController::assignTable() } } } -// ----------------------------------------------------------------------------- + sal_Bool OTableController::isAddAllowed() const { Reference<XColumnsSupplier> xColsSup(m_xTable,UNO_QUERY); @@ -1452,7 +1433,7 @@ sal_Bool OTableController::isAddAllowed() const return bAddAllowed; } -// ----------------------------------------------------------------------------- + sal_Bool OTableController::isDropAllowed() const { Reference<XColumnsSupplier> xColsSup(m_xTable,UNO_QUERY); @@ -1468,13 +1449,13 @@ sal_Bool OTableController::isDropAllowed() const return bDropAllowed; } -// ----------------------------------------------------------------------------- + sal_Bool OTableController::isAlterAllowed() const { sal_Bool bAllowed(!m_xTable.is() || Reference<XAlterTable>(m_xTable,UNO_QUERY).is()); return bAllowed; } -// ----------------------------------------------------------------------------- + void OTableController::reSyncRows() { sal_Bool bAlterAllowed = isAlterAllowed(); @@ -1496,7 +1477,7 @@ void OTableController::reSyncRows() ClearUndoManager(); setModified(sal_False); // and we are not modified yet } -// ----------------------------------------------------------------------------- + OUString OTableController::createUniqueName(const OUString& _rName) { OUString sName = _rName; @@ -1517,7 +1498,7 @@ OUString OTableController::createUniqueName(const OUString& _rName) } return sName; } -// ----------------------------------------------------------------------------- + OUString OTableController::getPrivateTitle() const { OUString sTitle; @@ -1544,7 +1525,7 @@ OUString OTableController::getPrivateTitle() const } return sTitle; } -// ----------------------------------------------------------------------------- + void OTableController::reload() { loadData(); // fill the column information form the table @@ -1553,7 +1534,7 @@ void OTableController::reload() setModified(sal_False); // and we are not modified yet static_cast<OTableDesignView*>(getView())->Invalidate(); } -// ----------------------------------------------------------------------------- + sal_Int32 OTableController::getFirstEmptyRowPosition() { sal_Int32 nRet = -1; @@ -1577,11 +1558,10 @@ sal_Int32 OTableController::getFirstEmptyRowPosition() } return nRet; } -// ----------------------------------------------------------------------------- + bool OTableController::isAutoIncrementPrimaryKey() const { return getSdbMetaData().isAutoIncrementPrimaryKey(); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx index ca2bea139c21..54b068834f4d 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "TableDesignControl.hxx" #include "dbu_tbl.hrc" #include "TableDesignView.hxx" @@ -36,7 +35,6 @@ using namespace ::com::sun::star::util; #define HANDLE_ID 0 DBG_NAME(OTableRowView) -//------------------------------------------------------------------------ OTableRowView::OTableRowView(Window* pParent) :EditBrowseBox(pParent, ModuleRes(RID_DB_TAB_EDITOR),EBBF_NONE, BROWSER_COLUMNSELECTION | BROWSER_MULTISELECTION | BROWSER_AUTOSIZE_LASTCOL | @@ -52,14 +50,12 @@ OTableRowView::OTableRowView(Window* pParent) } -//------------------------------------------------------------------------ OTableRowView::~OTableRowView() { DBG_DTOR(OTableRowView,NULL); } -//------------------------------------------------------------------------ void OTableRowView::Init() { EditBrowseBox::Init(); @@ -84,7 +80,6 @@ void OTableRowView::Init() SetMode(nMode); } -//------------------------------------------------------------------------ void OTableRowView::KeyInput( const KeyEvent& rEvt ) { if (IsDeleteAllowed(0)) @@ -106,14 +101,12 @@ void OTableRowView::KeyInput( const KeyEvent& rEvt ) EditBrowseBox::KeyInput(rEvt); } -//------------------------------------------------------------------------ void OTableRowView::SetUpdatable( sal_Bool bUpdate ) { m_bUpdatable = bUpdate; } -//------------------------------------------------------------------------ void OTableRowView::Command(const CommandEvent& rEvt) { @@ -174,32 +167,27 @@ void OTableRowView::Command(const CommandEvent& rEvt) } -//------------------------------------------------------------------------------ void OTableRowView::cut() { CopyRows(); DeleteRows(); } -//------------------------------------------------------------------------------ void OTableRowView::copy() { CopyRows(); } -//------------------------------------------------------------------------------ void OTableRowView::paste() { OSL_FAIL("OTableRowView::Paste : (pseudo-) abstract method called !"); } -//------------------------------------------------------------------------------ void OTableRowView::Paste( long nRow ) { InsertRows( nRow ); } -//------------------------------------------------------------------------------ EditBrowseBox::RowStatus OTableRowView::GetRowStatus(long nRow) const { if (nRow >= 0 && m_nDataPos == nRow) @@ -208,6 +196,4 @@ EditBrowseBox::RowStatus OTableRowView::GetRowStatus(long nRow) const return CLEAN; } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx index bb3d91675cc8..bf949420c901 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignHelpBar.cxx @@ -24,11 +24,8 @@ #include <memory> using namespace dbaui; #define STANDARD_MARGIN 6 -//================================================================== // class OTableDesignHelpBar -//================================================================== DBG_NAME(OTableDesignHelpBar) -//------------------------------------------------------------------------------ OTableDesignHelpBar::OTableDesignHelpBar( Window* pParent ) : TabPage( pParent, WB_3DLOOK ) { @@ -40,7 +37,6 @@ OTableDesignHelpBar::OTableDesignHelpBar( Window* pParent ) : m_pTextWin->Show(); } -//------------------------------------------------------------------------------ OTableDesignHelpBar::~OTableDesignHelpBar() { DBG_DTOR(OTableDesignHelpBar,NULL); @@ -48,7 +44,6 @@ OTableDesignHelpBar::~OTableDesignHelpBar() m_pTextWin = NULL; } -//------------------------------------------------------------------------------ void OTableDesignHelpBar::SetHelpText( const String& rText ) { DBG_CHKTHIS(OTableDesignHelpBar,NULL); @@ -57,15 +52,12 @@ void OTableDesignHelpBar::SetHelpText( const String& rText ) Invalidate(); } -//------------------------------------------------------------------------------ void OTableDesignHelpBar::Resize() { DBG_CHKTHIS(OTableDesignHelpBar,NULL); - ////////////////////////////////////////////////////////////////////// // Abmessungen parent window Size aOutputSize( GetOutputSizePixel() ); - ////////////////////////////////////////////////////////////////////// // TextWin anpassen if(m_pTextWin) m_pTextWin->SetPosSizePixel( Point(STANDARD_MARGIN+1, STANDARD_MARGIN+1), @@ -74,39 +66,38 @@ void OTableDesignHelpBar::Resize() } -//------------------------------------------------------------------------------ long OTableDesignHelpBar::PreNotify( NotifyEvent& rNEvt ) { if (rNEvt.GetType() == EVENT_LOSEFOCUS) SetHelpText(String()); return TabPage::PreNotify(rNEvt); } -// ----------------------------------------------------------------------------- + sal_Bool OTableDesignHelpBar::isCopyAllowed() { return m_pTextWin && !m_pTextWin->GetSelected().isEmpty(); } -// ----------------------------------------------------------------------------- + sal_Bool OTableDesignHelpBar::isCutAllowed() { return sal_False; } -// ----------------------------------------------------------------------------- + sal_Bool OTableDesignHelpBar::isPasteAllowed() { return sal_False; } -// ----------------------------------------------------------------------------- + void OTableDesignHelpBar::cut() { } -// ----------------------------------------------------------------------------- + void OTableDesignHelpBar::copy() { if ( m_pTextWin ) m_pTextWin->Copy(); } -// ----------------------------------------------------------------------------- + void OTableDesignHelpBar::paste() { } diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx index a82ae839d9cc..29c8c5554b67 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx @@ -31,7 +31,6 @@ #include <unotools/syslocale.hxx> #include "UITools.hxx" - using namespace ::dbaui; using namespace ::utl; using namespace ::com::sun::star::uno; @@ -39,17 +38,14 @@ using namespace ::com::sun::star::datatransfer::clipboard; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; -//================================================================== // class OTableBorderWindow DBG_NAME(OTableBorderWindow) -//================================================================== OTableBorderWindow::OTableBorderWindow(Window* pParent) : Window(pParent,WB_BORDER) ,m_aHorzSplitter( this ) { DBG_CTOR(OTableBorderWindow,NULL); ImplInitSettings( sal_True, sal_True, sal_True ); - ////////////////////////////////////////////////////////////////////// // Children erzeugen m_pEditorCtrl = new OTableEditorCtrl( this); m_pFieldDescWin = new OTableFieldDescWin( this ); @@ -59,15 +55,13 @@ OTableBorderWindow::OTableBorderWindow(Window* pParent) : Window(pParent,WB_BORD // set depending windows and controls m_pEditorCtrl->SetDescrWin(m_pFieldDescWin); - ////////////////////////////////////////////////////////////////////// // Splitter einrichten m_aHorzSplitter.SetSplitHdl( LINK(this, OTableBorderWindow, SplitHdl) ); m_aHorzSplitter.Show(); } -// ----------------------------------------------------------------------------- + OTableBorderWindow::~OTableBorderWindow() { - ////////////////////////////////////////////////////////////////////// // Children zerstoeren // ::dbaui::notifySystemWindow(this,m_pFieldDescWin,::comphelper::mem_fun(&TaskPaneList::RemoveWindow)); m_pEditorCtrl->Hide(); @@ -88,19 +82,17 @@ OTableBorderWindow::~OTableBorderWindow() DBG_DTOR(OTableBorderWindow,NULL); } -// ----------------------------------------------------------------------------- + void OTableBorderWindow::Resize() { const long nSplitterHeight(3); - ////////////////////////////////////////////////////////////////////// // Abmessungen parent window Size aOutputSize( GetOutputSize() ); long nOutputWidth = aOutputSize.Width(); long nOutputHeight = aOutputSize.Height(); long nSplitPos = m_aHorzSplitter.GetSplitPosPixel(); - ////////////////////////////////////////////////////////////////////// // Verschiebebereich Splitter mittleres Drittel des Outputs long nDragPosY = nOutputHeight/3; long nDragSizeHeight = nOutputHeight/3; @@ -108,19 +100,17 @@ void OTableBorderWindow::Resize() if( (nSplitPos < nDragPosY) || (nSplitPos > (nDragPosY+nDragSizeHeight)) ) nSplitPos = nDragPosY+nDragSizeHeight-5; - ////////////////////////////////////////////////////////////////////// // Splitter setzen m_aHorzSplitter.SetPosSizePixel( Point( 0, nSplitPos ), Size(nOutputWidth, nSplitterHeight)); m_aHorzSplitter.SetSplitPosPixel( nSplitPos ); - ////////////////////////////////////////////////////////////////////// // Fenster setzen m_pEditorCtrl->SetPosSizePixel( Point(0, 0), Size(nOutputWidth , nSplitPos) ); m_pFieldDescWin->SetPosSizePixel( Point(0, nSplitPos+nSplitterHeight), Size(nOutputWidth, nOutputHeight-nSplitPos-nSplitterHeight) ); } -//------------------------------------------------------------------------------ + IMPL_LINK( OTableBorderWindow, SplitHdl, Splitter*, pSplit ) { if(pSplit == &m_aHorzSplitter) @@ -130,7 +120,7 @@ IMPL_LINK( OTableBorderWindow, SplitHdl, Splitter*, pSplit ) } return 0; } -// ----------------------------------------------------------------------------- + void OTableBorderWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -159,7 +149,7 @@ void OTableBorderWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, SetBackground( rStyleSettings.GetFaceColor() ); } } -// ----------------------------------------------------------------------- + void OTableBorderWindow::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); @@ -171,7 +161,7 @@ void OTableBorderWindow::DataChanged( const DataChangedEvent& rDCEvt ) Invalidate(); } } -// ----------------------------------------------------------------------------- + void OTableBorderWindow::GetFocus() { Window::GetFocus(); @@ -181,11 +171,8 @@ void OTableBorderWindow::GetFocus() m_pEditorCtrl->GrabFocus(); } -//================================================================== // class OTableDesignView -//================================================================== DBG_NAME(OTableDesignView); -//------------------------------------------------------------------------------ OTableDesignView::OTableDesignView( Window* pParent, const Reference< XComponentContext >& _rxOrb, OTableController& _rController @@ -208,7 +195,6 @@ OTableDesignView::OTableDesignView( Window* pParent, m_pWin->Show(); } -//------------------------------------------------------------------------------ OTableDesignView::~OTableDesignView() { DBG_DTOR(OTableDesignView,NULL); @@ -222,7 +208,6 @@ OTableDesignView::~OTableDesignView() } } -// ----------------------------------------------------------------------------- void OTableDesignView::initialize() { GetEditorCtrl()->Init(); @@ -234,9 +219,7 @@ void OTableDesignView::initialize() GetEditorCtrl()->DisplayData(0); } -//------------------------------------------------------------------------------ -//------------------------------------------------------------------------------ void OTableDesignView::resizeDocumentView(Rectangle& _rPlayground) { m_pWin->SetPosSizePixel( _rPlayground.TopLeft(), _rPlayground.GetSize() ); @@ -246,7 +229,6 @@ void OTableDesignView::resizeDocumentView(Rectangle& _rPlayground) _rPlayground.SetSize( Size( 0, 0 ) ); } -//------------------------------------------------------------------------------ long OTableDesignView::PreNotify( NotifyEvent& rNEvt ) { sal_Bool bHandled = sal_False; @@ -264,7 +246,7 @@ long OTableDesignView::PreNotify( NotifyEvent& rNEvt ) return bHandled ? 1L : ODataView::PreNotify(rNEvt); } -// ----------------------------------------------------------------------------- + IClipboardTest* OTableDesignView::getActiveChild() const { IClipboardTest* pTest = NULL; @@ -281,53 +263,53 @@ IClipboardTest* OTableDesignView::getActiveChild() const } return pTest; } -// ----------------------------------------------------------------------------- + sal_Bool OTableDesignView::isCopyAllowed() { IClipboardTest* pTest = getActiveChild(); return pTest && pTest->isCopyAllowed(); } -// ----------------------------------------------------------------------------- + sal_Bool OTableDesignView::isCutAllowed() { IClipboardTest* pTest = getActiveChild(); return pTest && pTest->isCutAllowed(); } -// ----------------------------------------------------------------------------- + sal_Bool OTableDesignView::isPasteAllowed() { IClipboardTest* pTest = getActiveChild(); return pTest && pTest->isPasteAllowed(); } -// ----------------------------------------------------------------------------- + void OTableDesignView::copy() { IClipboardTest* pTest = getActiveChild(); if ( pTest ) pTest->copy(); } -// ----------------------------------------------------------------------------- + void OTableDesignView::cut() { IClipboardTest* pTest = getActiveChild(); if ( pTest ) pTest->cut(); } -// ----------------------------------------------------------------------------- + void OTableDesignView::paste() { IClipboardTest* pTest = getActiveChild(); if ( pTest ) pTest->paste(); } -// ----------------------------------------------------------------------------- + // set the view readonly or not void OTableDesignView::setReadOnly(sal_Bool _bReadOnly) { GetDescWin()->SetReadOnly(_bReadOnly); GetEditorCtrl()->SetReadOnly(_bReadOnly); } -// ----------------------------------------------------------------------------- + void OTableDesignView::reSync() { GetEditorCtrl()->DeactivateCell(); @@ -336,12 +318,11 @@ void OTableDesignView::reSync() if ( pFieldDescr ) GetDescWin()->DisplayData(pFieldDescr); } -// ----------------------------------------------------------------------------- + void OTableDesignView::GetFocus() { if ( GetEditorCtrl() ) GetEditorCtrl()->GrabFocus(); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx index df118795d9b6..cbca9cbab371 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldControl.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldControl.cxx @@ -37,19 +37,19 @@ using namespace dbaui; OTableFieldControl::OTableFieldControl( Window* pParent, OTableDesignHelpBar* pHelpBar) :OFieldDescControl(pParent,pHelpBar) { } -//------------------------------------------------------------------ + void OTableFieldControl::CellModified(long nRow, sal_uInt16 nColId ) { GetCtrl()->CellModified(nRow,nColId); } -//------------------------------------------------------------------ + OTableEditorCtrl* OTableFieldControl::GetCtrl() const { OTableDesignView* pDesignWin = static_cast<OTableDesignView*>(GetParent()->GetParent()->GetParent()->GetParent()); OSL_ENSURE(pDesignWin,"no view!"); return pDesignWin->GetEditorCtrl(); } -//------------------------------------------------------------------ + sal_Bool OTableFieldControl::IsReadOnly() { sal_Bool bRead(GetCtrl()->IsReadOnly()); @@ -68,7 +68,7 @@ sal_Bool OTableFieldControl::IsReadOnly() } return bRead; } -//------------------------------------------------------------------ + void OTableFieldControl::ActivateAggregate( EControlType eType ) { switch(eType) @@ -80,7 +80,7 @@ void OTableFieldControl::ActivateAggregate( EControlType eType ) OFieldDescControl::ActivateAggregate(eType); } } -//------------------------------------------------------------------ + void OTableFieldControl::DeactivateAggregate( EControlType eType ) { switch(eType) @@ -92,17 +92,17 @@ void OTableFieldControl::DeactivateAggregate( EControlType eType ) OFieldDescControl::DeactivateAggregate(eType); } } -// ----------------------------------------------------------------------------- + void OTableFieldControl::SetModified(sal_Bool bModified) { GetCtrl()->GetView()->getController().setModified(bModified); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> OTableFieldControl::getConnection() { return GetCtrl()->GetView()->getController().getConnection(); } -// ----------------------------------------------------------------------------- + ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData> OTableFieldControl::getMetaData() { Reference<XConnection> xCon = GetCtrl()->GetView()->getController().getConnection(); @@ -110,36 +110,35 @@ void OTableFieldControl::SetModified(sal_Bool bModified) return NULL; return xCon->getMetaData(); } -// ----------------------------------------------------------------------------- + Reference< XNumberFormatter > OTableFieldControl::GetFormatter() const { return GetCtrl()->GetView()->getController().getNumberFormatter(); } -// ----------------------------------------------------------------------------- + TOTypeInfoSP OTableFieldControl::getTypeInfo(sal_Int32 _nPos) { return GetCtrl()->GetView()->getController().getTypeInfo(_nPos); } -// ----------------------------------------------------------------------------- + const OTypeInfoMap* OTableFieldControl::getTypeInfo() const { return const_cast<OTableFieldControl*>(this)->GetCtrl()->GetView()->getController().getTypeInfo(); } -// ----------------------------------------------------------------------------- + Locale OTableFieldControl::GetLocale() const { return const_cast<OTableFieldControl*>(this)->GetCtrl()->GetView()->getLocale(); } -// ----------------------------------------------------------------------------- + sal_Bool OTableFieldControl::isAutoIncrementValueEnabled() const { return const_cast<OTableFieldControl*>(this)->GetCtrl()->GetView()->getController().isAutoIncrementValueEnabled(); } -// ----------------------------------------------------------------------------- + OUString OTableFieldControl::getAutoIncrementValue() const { return const_cast<OTableFieldControl*>(this)->GetCtrl()->GetView()->getController().getAutoIncrementValue(); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx index e95b5f36c74c..9ff9886eea6a 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldControl.hxx +++ b/dbaccess/source/ui/tabledesign/TableFieldControl.hxx @@ -25,9 +25,7 @@ namespace dbaui { class OTableEditorCtrl; class OTableDesignHelpBar; - //================================================================== // OTableFieldControl - //================================================================== class OTableFieldControl : public OFieldDescControl { OTableEditorCtrl* GetCtrl() const; @@ -59,5 +57,4 @@ namespace dbaui } #endif // DBAUI_TABLEFIELDCONTROL_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx index 36b53f5e69b4..69ef284025c8 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "TableFieldDescWin.hxx" #include <osl/diagnose.h> #include "FieldDescriptions.hxx" @@ -43,24 +42,18 @@ #define DETAILS_MIN_HELP_HEIGHT 50 #define DETAILS_OPT_HELP_HEIGHT 100 - using namespace dbaui; -//================================================================== // class OTableFieldDescWin -//================================================================== DBG_NAME(OTableFieldDescWin) -//------------------------------------------------------------------------------ OTableFieldDescWin::OTableFieldDescWin( Window* pParent) :TabPage(pParent, WB_3DLOOK) { DBG_CTOR(OTableFieldDescWin,NULL); - ////////////////////////////////////////////////////////////////////// // Header m_pHeader = new FixedText( this, WB_CENTER | WB_INFO ); // | WB_3DLOOK m_pHeader->SetText( String(ModuleRes(STR_TAB_PROPERTIES)) ); m_pHeader->Show(); - ////////////////////////////////////////////////////////////////////// // HelpBar m_pHelpBar = new OTableDesignHelpBar( this ); m_pHelpBar->SetHelpId(HID_TAB_DESIGN_HELP_TEXT_FRAME); @@ -71,11 +64,9 @@ OTableFieldDescWin::OTableFieldDescWin( Window* pParent) getGenPage()->Show(); } -//------------------------------------------------------------------------------ OTableFieldDescWin::~OTableFieldDescWin() { DBG_DTOR(OTableFieldDescWin,NULL); - ////////////////////////////////////////////////////////////////////// // Children zerstoeren m_pHelpBar->Hide(); getGenPage()->Hide(); @@ -101,57 +92,48 @@ OTableFieldDescWin::~OTableFieldDescWin() } } -//------------------------------------------------------------------------------ void OTableFieldDescWin::Init() { OSL_ENSURE(getGenPage() != NULL, "OTableFieldDescWin::Init : ups ... no GenericPage ... this will crash ..."); getGenPage()->Init(); } -//------------------------------------------------------------------------------ void OTableFieldDescWin::SetReadOnly( sal_Bool bRead ) { DBG_CHKTHIS(OTableFieldDescWin,NULL); getGenPage()->SetReadOnly( bRead ); } -//------------------------------------------------------------------------------ void OTableFieldDescWin::DisplayData( OFieldDescription* pFieldDescr ) { DBG_CHKTHIS(OTableFieldDescWin,NULL); getGenPage()->DisplayData( pFieldDescr ); } -//------------------------------------------------------------------------------ void OTableFieldDescWin::SaveData( OFieldDescription* pFieldDescr ) { DBG_CHKTHIS(OTableFieldDescWin,NULL); getGenPage()->SaveData( pFieldDescr ); } -//------------------------------------------------------------------------------ void OTableFieldDescWin::Paint( const Rectangle& /*rRect*/ ) { DBG_CHKTHIS(OTableFieldDescWin,NULL); - ////////////////////////////////////////////////////////////////////// // 3D-Linie am oberen Fensterrand const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); SetLineColor( rStyleSettings.GetLightColor() ); DrawLine( Point(0,0), Point(GetSizePixel().Width(),0) ); - ////////////////////////////////////////////////////////////////////// // 3D-Linie zum Abtrennen des Headers DrawLine( Point(3, DETAILS_HEADER_HEIGHT), Point(GetSizePixel().Width()-6, DETAILS_HEADER_HEIGHT) ); SetLineColor( rStyleSettings.GetShadowColor() ); DrawLine( Point(3, DETAILS_HEADER_HEIGHT-1), Point(GetSizePixel().Width()-6, DETAILS_HEADER_HEIGHT-1) ); } -//------------------------------------------------------------------------------ void OTableFieldDescWin::Resize() { DBG_CHKTHIS(OTableFieldDescWin,NULL); - ////////////////////////////////////////////////////////////////////// // Abmessungen parent window Size aOutputSize( GetOutputSizePixel() ); long nOutputWidth = aOutputSize.Width(); @@ -233,7 +215,7 @@ void OTableFieldDescWin::Resize() } Invalidate(); } -// ----------------------------------------------------------------------------- + IClipboardTest* OTableFieldDescWin::getActiveChild() const { IClipboardTest* pTest = NULL; @@ -248,52 +230,52 @@ IClipboardTest* OTableFieldDescWin::getActiveChild() const } return pTest; } -// ----------------------------------------------------------------------------- + sal_Bool OTableFieldDescWin::isCopyAllowed() { return getActiveChild() && getActiveChild()->isCopyAllowed(); } -// ----------------------------------------------------------------------------- + sal_Bool OTableFieldDescWin::isCutAllowed() { return (getGenPage() && getGenPage()->HasChildPathFocus() && getGenPage()->isCutAllowed()); } -// ----------------------------------------------------------------------------- + sal_Bool OTableFieldDescWin::isPasteAllowed() { return (getGenPage() && getGenPage()->HasChildPathFocus() && getGenPage()->isPasteAllowed()); } -// ----------------------------------------------------------------------------- + void OTableFieldDescWin::cut() { if ( getGenPage() && getGenPage()->HasChildPathFocus() ) getGenPage()->cut(); } -// ----------------------------------------------------------------------------- + void OTableFieldDescWin::copy() { if ( getActiveChild() ) getActiveChild()->copy(); } -// ----------------------------------------------------------------------------- + void OTableFieldDescWin::paste() { if ( getGenPage() && getGenPage()->HasChildPathFocus() ) getGenPage()->paste(); } -// ----------------------------------------------------------------------------- + void OTableFieldDescWin::GetFocus() { if ( getGenPage() ) getGenPage()->GetFocus(); } -// ----------------------------------------------------------------------------- + void OTableFieldDescWin::LoseFocus() { if ( getGenPage() ) getGenPage()->LoseFocus(); } -// ----------------------------------------------------------------------------- + long OTableFieldDescWin::PreNotify( NotifyEvent& rNEvt ) { sal_Bool bHandled = sal_False; diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx index b1ef635e04af..ce03198fea23 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx @@ -29,7 +29,6 @@ namespace dbaui class OFieldDescGenWin; class OTableDesignHelpBar; class OFieldDescription; - //================================================================== // Ableitung von TabPage ist ein Trick von TH, // um Aenderungen der Systemfarben zu bemerken class OTableFieldDescWin : public TabPage @@ -96,7 +95,4 @@ namespace dbaui } #endif // DBAUI_TABLEFIELDDESCRIPTION_HXX - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/tabledesign/TableRow.cxx b/dbaccess/source/ui/tabledesign/TableRow.cxx index fc2ee354d1f5..9546e7b0ed3b 100644 --- a/dbaccess/source/ui/tabledesign/TableRow.cxx +++ b/dbaccess/source/ui/tabledesign/TableRow.cxx @@ -29,11 +29,8 @@ using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; -//======================================================================== // class OTableRow -//======================================================================== DBG_NAME(OTableRow) -//------------------------------------------------------------------------------ OTableRow::OTableRow() :m_pActFieldDescr( NULL ) ,m_nPos( -1 ) @@ -42,7 +39,7 @@ OTableRow::OTableRow() { DBG_CTOR(OTableRow,NULL); } -//------------------------------------------------------------------------------ + OTableRow::OTableRow(const Reference< XPropertySet >& xAffectedCol) :m_pActFieldDescr( NULL ) ,m_nPos( -1 ) @@ -52,7 +49,7 @@ OTableRow::OTableRow(const Reference< XPropertySet >& xAffectedCol) DBG_CTOR(OTableRow,NULL); m_pActFieldDescr = new OFieldDescription(xAffectedCol); } -//------------------------------------------------------------------------------ + OTableRow::OTableRow( const OTableRow& rRow, long nPosition ) :m_pActFieldDescr(NULL) ,m_nPos( nPosition ) @@ -69,7 +66,6 @@ OTableRow::OTableRow( const OTableRow& rRow, long nPosition ) } } -//------------------------------------------------------------------------------ OTableRow::~OTableRow() { DBG_DTOR(OTableRow,NULL); @@ -77,20 +73,19 @@ OTableRow::~OTableRow() delete m_pActFieldDescr; } -//------------------------------------------------------------------------------ void OTableRow::SetPrimaryKey( sal_Bool bSet ) { DBG_CHKTHIS(OTableRow,NULL); if(m_pActFieldDescr) m_pActFieldDescr->SetPrimaryKey(bSet); } -// ----------------------------------------------------------------------------- + sal_Bool OTableRow::IsPrimaryKey() const { DBG_CHKTHIS(OTableRow,NULL); return m_pActFieldDescr && m_pActFieldDescr->IsPrimaryKey(); } -// ----------------------------------------------------------------------------- + void OTableRow::SetFieldType( const TOTypeInfoSP& _pType, sal_Bool _bForce ) { DBG_CHKTHIS(OTableRow,NULL); @@ -109,10 +104,9 @@ void OTableRow::SetFieldType( const TOTypeInfoSP& _pType, sal_Bool _bForce ) m_pActFieldDescr = NULL; } } -// ----------------------------------------------------------------------------- + namespace dbaui { - // ----------------------------------------------------------------------------- SvStream& operator<<( SvStream& _rStr, const OTableRow& _rRow ) { _rStr << _rRow.m_nPos; @@ -151,7 +145,6 @@ namespace dbaui _rStr << (sal_Int32)0; return _rStr; } - // ----------------------------------------------------------------------------- SvStream& operator>>( SvStream& _rStr, OTableRow& _rRow ) { _rStr >> _rRow.m_nPos; @@ -188,7 +181,6 @@ namespace dbaui pFieldDesc->SetControlDefault(aControlDefault); - _rStr >> nValue; pFieldDesc->SetTypeValue(nValue); @@ -212,7 +204,6 @@ namespace dbaui } return _rStr; } - // ----------------------------------------------------------------------------- } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx index 810ae3283a83..3a14971d7dc3 100644 --- a/dbaccess/source/ui/tabledesign/TableRowExchange.cxx +++ b/dbaccess/source/ui/tabledesign/TableRowExchange.cxx @@ -30,7 +30,6 @@ namespace dbaui : m_vTableRow(_rvTableRow) { } - // ----------------------------------------------------------------------------- sal_Bool OTableRowExchange::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& /*rFlavor*/ ) { if(nUserObjectId == SOT_FORMATSTR_ID_SBA_TABED) @@ -48,13 +47,11 @@ namespace dbaui } return sal_False; } - // ----------------------------------------------------------------------------- void OTableRowExchange::AddSupportedFormats() { if ( !m_vTableRow.empty() ) AddFormat(SOT_FORMATSTR_ID_SBA_TABED); } - // ----------------------------------------------------------------------------- sal_Bool OTableRowExchange::GetData( const ::com::sun::star::datatransfer::DataFlavor& rFlavor ) { sal_uLong nFormat = SotExchange::GetFormat(rFlavor); @@ -62,12 +59,10 @@ namespace dbaui return SetObject(&m_vTableRow,SOT_FORMATSTR_ID_SBA_TABED,rFlavor); return sal_False; } - // ----------------------------------------------------------------------------- void OTableRowExchange::ObjectReleased() { m_vTableRow.clear(); } - // ----------------------------------------------------------------------------- } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx index 68d97e3deaa0..5445f1c6ff9d 100644 --- a/dbaccess/source/ui/tabledesign/TableUndo.cxx +++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx @@ -40,9 +40,7 @@ TYPEINIT1( OTableEditorInsUndoAct, OTableEditorUndoAct ); TYPEINIT1( OTableEditorInsNewUndoAct, OTableEditorUndoAct ); TYPEINIT1( OPrimKeyUndoAct, OTableEditorUndoAct ); -//============================================================================== // class OTableDesignUndoAct -//============================================================================== DBG_NAME(OTableDesignUndoAct); OTableDesignUndoAct::OTableDesignUndoAct( OTableRowView* pOwner,sal_uInt16 nCommentID ) : OCommentUndoAction(nCommentID) ,m_pTabDgnCtrl( pOwner ) @@ -51,18 +49,15 @@ OTableDesignUndoAct::OTableDesignUndoAct( OTableRowView* pOwner,sal_uInt16 nComm m_pTabDgnCtrl->m_nCurUndoActId++; } -//------------------------------------------------------------------------- OTableDesignUndoAct::~OTableDesignUndoAct() { DBG_DTOR(OTableDesignUndoAct,NULL); } -//------------------------------------------------------------------------- void OTableDesignUndoAct::Undo() { m_pTabDgnCtrl->m_nCurUndoActId--; - ////////////////////////////////////////////////////////////////////// // doc has not been modified if first undo was reverted if( m_pTabDgnCtrl->m_nCurUndoActId == 0 ) { @@ -71,12 +66,10 @@ void OTableDesignUndoAct::Undo() } } -//------------------------------------------------------------------------- void OTableDesignUndoAct::Redo() { m_pTabDgnCtrl->m_nCurUndoActId++; - ////////////////////////////////////////////////////////////////////// // restore Modifed-flag after Redo of first Undo-action if( m_pTabDgnCtrl->m_nCurUndoActId > 0 ) { @@ -84,9 +77,8 @@ void OTableDesignUndoAct::Redo() m_pTabDgnCtrl->GetView()->getController().InvalidateFeature(SID_SAVEDOC); } } -//============================================================================== + // class OTableDesignCellUndoAct -//============================================================================== DBG_NAME(OTableDesignCellUndoAct); OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, long nRowID, sal_uInt16 nColumn ) : OTableDesignUndoAct( pOwner ,STR_TABED_UNDO_CELLMODIFIED) @@ -94,26 +86,21 @@ OTableDesignCellUndoAct::OTableDesignCellUndoAct( OTableRowView* pOwner, long nR ,m_nRow( nRowID ) { DBG_CTOR(OTableDesignCellUndoAct,NULL); - ////////////////////////////////////////////////////////////////////// // read text at position (m_nRow, m_nCol) m_sOldText = m_pTabDgnCtrl->GetCellData( m_nRow, m_nCol ); } -//------------------------------------------------------------------------- OTableDesignCellUndoAct::~OTableDesignCellUndoAct() { DBG_DTOR(OTableDesignCellUndoAct,NULL); } -//------------------------------------------------------------------------- void OTableDesignCellUndoAct::Undo() { - ////////////////////////////////////////////////////////////////////// // store text at old line and restore the old one m_pTabDgnCtrl->ActivateCell( m_nRow, m_nCol ); m_sNewText = m_pTabDgnCtrl->GetCellData( m_nRow, m_nCol ); m_pTabDgnCtrl->SetCellData( m_nRow, m_nCol, m_sOldText ); - ////////////////////////////////////////////////////////////////////// // line has not been modified if the first Undo was reverted if (m_pTabDgnCtrl->GetCurUndoActId() == 1) { @@ -127,10 +114,8 @@ void OTableDesignCellUndoAct::Undo() OTableDesignUndoAct::Undo(); } -//------------------------------------------------------------------------- void OTableDesignCellUndoAct::Redo() { - ////////////////////////////////////////////////////////////////////// // restore new text m_pTabDgnCtrl->ActivateCell( m_nRow, m_nCol ); m_pTabDgnCtrl->SetCellData( m_nRow, m_nCol, m_sNewText ); @@ -138,9 +123,7 @@ void OTableDesignCellUndoAct::Redo() OTableDesignUndoAct::Redo(); } -//============================================================================== // class OTableEditorUndoAct -//============================================================================== DBG_NAME(OTableEditorUndoAct); OTableEditorUndoAct::OTableEditorUndoAct( OTableEditorCtrl* pOwner,sal_uInt16 _nCommentID ) : OTableDesignUndoAct( pOwner ,_nCommentID) @@ -149,15 +132,12 @@ OTableEditorUndoAct::OTableEditorUndoAct( OTableEditorCtrl* pOwner,sal_uInt16 _n DBG_CTOR(OTableEditorUndoAct,NULL); } -//------------------------------------------------------------------------- OTableEditorUndoAct::~OTableEditorUndoAct() { DBG_DTOR(OTableEditorUndoAct,NULL); } -//============================================================================== // class OTableEditorTypeSelUndoAct -//============================================================================== DBG_NAME(OTableEditorTypeSelUndoAct); OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner, long nRowID, sal_uInt16 nColumn, const TOTypeInfoSP& _pOldType ) :OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_TYPE_CHANGED) @@ -168,16 +148,13 @@ OTableEditorTypeSelUndoAct::OTableEditorTypeSelUndoAct( OTableEditorCtrl* pOwner DBG_CTOR(OTableEditorTypeSelUndoAct,NULL); } -//------------------------------------------------------------------------- OTableEditorTypeSelUndoAct::~OTableEditorTypeSelUndoAct() { DBG_DTOR(OTableEditorTypeSelUndoAct,NULL); } -//------------------------------------------------------------------------- void OTableEditorTypeSelUndoAct::Undo() { - ////////////////////////////////////////////////////////////////////// // restore type OFieldDescription* pFieldDesc = pTabEdCtrl->GetFieldDescr(m_nRow); if(pFieldDesc) @@ -190,10 +167,8 @@ void OTableEditorTypeSelUndoAct::Undo() OTableEditorUndoAct::Undo(); } -//------------------------------------------------------------------------- void OTableEditorTypeSelUndoAct::Redo() { - ////////////////////////////////////////////////////////////////////// // new type pTabEdCtrl->GoToRowColumnId( m_nRow ,m_nCol); pTabEdCtrl->SetCellData(m_nRow,m_nCol,m_pNewType); @@ -201,15 +176,12 @@ void OTableEditorTypeSelUndoAct::Redo() OTableEditorUndoAct::Redo(); } -//============================================================================== // class OTableEditorDelUndoAct -//============================================================================== DBG_NAME(OTableEditorDelUndoAct); OTableEditorDelUndoAct::OTableEditorDelUndoAct( OTableEditorCtrl* pOwner) : OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_ROWDELETED) { DBG_CTOR(OTableEditorDelUndoAct,NULL); - ////////////////////////////////////////////////////////////////////// // fill DeletedRowList ::std::vector< ::boost::shared_ptr<OTableRow> >* pOriginalRows = pOwner->GetRowList(); long nIndex = pOwner->FirstSelectedRow(); @@ -226,17 +198,14 @@ OTableEditorDelUndoAct::OTableEditorDelUndoAct( OTableEditorCtrl* pOwner) : } } -//------------------------------------------------------------------------- OTableEditorDelUndoAct::~OTableEditorDelUndoAct() { DBG_DTOR(OTableEditorDelUndoAct,NULL); m_aDeletedRows.clear(); } -//------------------------------------------------------------------------- void OTableEditorDelUndoAct::Undo() { - ////////////////////////////////////////////////////////////////////// // Insert the deleted line sal_uLong nPos; ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = m_aDeletedRows.begin(); @@ -257,10 +226,8 @@ void OTableEditorDelUndoAct::Undo() OTableEditorUndoAct::Undo(); } -//------------------------------------------------------------------------- void OTableEditorDelUndoAct::Redo() { - ////////////////////////////////////////////////////////////////////// // delete line again sal_uLong nPos; ::std::vector< ::boost::shared_ptr<OTableRow> >::iterator aIter = m_aDeletedRows.begin(); @@ -278,10 +245,7 @@ void OTableEditorDelUndoAct::Redo() OTableEditorUndoAct::Redo(); } -//------------------------------------------------------------------------- -//============================================================================== // class OTableEditorInsUndoAct -//============================================================================== DBG_NAME(OTableEditorInsUndoAct); OTableEditorInsUndoAct::OTableEditorInsUndoAct( OTableEditorCtrl* pOwner, long nInsertPosition , @@ -293,17 +257,14 @@ OTableEditorInsUndoAct::OTableEditorInsUndoAct( OTableEditorCtrl* pOwner, DBG_CTOR(OTableEditorInsUndoAct,NULL); } -//------------------------------------------------------------------------- OTableEditorInsUndoAct::~OTableEditorInsUndoAct() { DBG_DTOR(OTableEditorInsUndoAct,NULL); m_vInsertedRows.clear(); } -//------------------------------------------------------------------------- void OTableEditorInsUndoAct::Undo() { - ////////////////////////////////////////////////////////////////////// // delete lines again ::std::vector< ::boost::shared_ptr<OTableRow> >* pOriginalRows = pTabEdCtrl->GetRowList(); for( long i=(m_nInsPos+m_vInsertedRows.size()-1); i>(m_nInsPos-1); i-- ) @@ -317,10 +278,8 @@ void OTableEditorInsUndoAct::Undo() OTableEditorUndoAct::Undo(); } -//------------------------------------------------------------------------- void OTableEditorInsUndoAct::Redo() { - ////////////////////////////////////////////////////////////////////// // insert lines again long nInsertRow = m_nInsPos; ::boost::shared_ptr<OTableRow> pRow; @@ -340,9 +299,7 @@ void OTableEditorInsUndoAct::Redo() OTableEditorUndoAct::Redo(); } -//============================================================================== // class OTableEditorInsNewUndoAct -//============================================================================== DBG_NAME(OTableEditorInsNewUndoAct); OTableEditorInsNewUndoAct::OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, long nInsertPosition, long nInsertedRows ) : OTableEditorUndoAct( pOwner ,STR_TABED_UNDO_NEWROWINSERTED) @@ -352,16 +309,13 @@ OTableEditorInsNewUndoAct::OTableEditorInsNewUndoAct( OTableEditorCtrl* pOwner, DBG_CTOR(OTableEditorInsNewUndoAct,NULL); } -//------------------------------------------------------------------------- OTableEditorInsNewUndoAct::~OTableEditorInsNewUndoAct() { DBG_DTOR(OTableEditorInsNewUndoAct,NULL); } -//------------------------------------------------------------------------- void OTableEditorInsNewUndoAct::Undo() { - ////////////////////////////////////////////////////////////////////// // delete inserted lines ::std::vector< ::boost::shared_ptr<OTableRow> >* pOriginalRows = pTabEdCtrl->GetRowList(); @@ -376,10 +330,8 @@ void OTableEditorInsNewUndoAct::Undo() OTableEditorUndoAct::Undo(); } -//------------------------------------------------------------------------- void OTableEditorInsNewUndoAct::Redo() { - ////////////////////////////////////////////////////////////////////// // insert lines again ::std::vector< ::boost::shared_ptr<OTableRow> >* pRowList = pTabEdCtrl->GetRowList(); @@ -392,12 +344,8 @@ void OTableEditorInsNewUndoAct::Redo() OTableEditorUndoAct::Redo(); } -//------------------------------------------------------------------------- -//======================================================================== // class OPrimKeyUndoAct -//======================================================================== DBG_NAME(OPrimKeyUndoAct); -//------------------------------------------------------------------------- OPrimKeyUndoAct::OPrimKeyUndoAct( OTableEditorCtrl* pOwner, MultiSelection aDeletedKeys, MultiSelection aInsertedKeys) : OTableEditorUndoAct( pOwner ,STR_TABLEDESIGN_UNDO_PRIMKEY) ,m_aDelKeys( aDeletedKeys ) @@ -407,20 +355,17 @@ OPrimKeyUndoAct::OPrimKeyUndoAct( OTableEditorCtrl* pOwner, MultiSelection aDele DBG_CTOR(OPrimKeyUndoAct,NULL); } -//------------------------------------------------------------------------- OPrimKeyUndoAct::~OPrimKeyUndoAct() { DBG_DTOR(OPrimKeyUndoAct,NULL); } -//------------------------------------------------------------------------- void OPrimKeyUndoAct::Undo() { ::std::vector< ::boost::shared_ptr<OTableRow> >* pRowList = pTabEdCtrl->GetRowList(); ::boost::shared_ptr<OTableRow> pRow; long nIndex; - ////////////////////////////////////////////////////////////////////// // delete inserted keys for( nIndex = m_aInsKeys.FirstSelected(); nIndex != (long)SFX_ENDOFSELECTION; nIndex=m_aInsKeys.NextSelected() ) { @@ -429,7 +374,6 @@ void OPrimKeyUndoAct::Undo() pRow->SetPrimaryKey( sal_False ); } - ////////////////////////////////////////////////////////////////////// // restore deleted keys for( nIndex = m_aDelKeys.FirstSelected(); nIndex != (long)SFX_ENDOFSELECTION; nIndex=m_aDelKeys.NextSelected() ) { @@ -442,18 +386,15 @@ void OPrimKeyUndoAct::Undo() OTableEditorUndoAct::Undo(); } -//------------------------------------------------------------------------- void OPrimKeyUndoAct::Redo() { ::std::vector< ::boost::shared_ptr<OTableRow> >* pRowList = pTabEdCtrl->GetRowList(); long nIndex; - ////////////////////////////////////////////////////////////////////// // delete the deleted keys for( nIndex = m_aDelKeys.FirstSelected(); nIndex != (long)SFX_ENDOFSELECTION; nIndex=m_aDelKeys.NextSelected() ) (*pRowList)[nIndex]->SetPrimaryKey( sal_False ); - ////////////////////////////////////////////////////////////////////// // restore the inserted keys for( nIndex = m_aInsKeys.FirstSelected(); nIndex != (long)SFX_ENDOFSELECTION; nIndex=m_aInsKeys.NextSelected() ) (*pRowList)[nIndex]->SetPrimaryKey( sal_True ); diff --git a/dbaccess/source/ui/tabledesign/TableUndo.hxx b/dbaccess/source/ui/tabledesign/TableUndo.hxx index 71911d9085e2..41fa42ebc2fb 100644 --- a/dbaccess/source/ui/tabledesign/TableUndo.hxx +++ b/dbaccess/source/ui/tabledesign/TableUndo.hxx @@ -29,7 +29,6 @@ namespace dbaui { - //======================================================================== class OTableRowView; class OTableRow; class OTableDesignUndoAct : public OCommentUndoAction @@ -45,7 +44,6 @@ namespace dbaui virtual ~OTableDesignUndoAct(); }; - //======================================================================== class OTableEditorCtrl; class OTableEditorUndoAct : public OTableDesignUndoAct { @@ -58,8 +56,6 @@ namespace dbaui virtual ~OTableEditorUndoAct(); }; - - //======================================================================== class OTableDesignCellUndoAct : public OTableDesignUndoAct { protected: @@ -76,7 +72,6 @@ namespace dbaui virtual ~OTableDesignCellUndoAct(); }; - //======================================================================== class OTableEditorTypeSelUndoAct : public OTableEditorUndoAct { protected: @@ -93,7 +88,6 @@ namespace dbaui virtual ~OTableEditorTypeSelUndoAct(); }; - //======================================================================== class OTableEditorDelUndoAct : public OTableEditorUndoAct { protected: @@ -107,7 +101,6 @@ namespace dbaui virtual ~OTableEditorDelUndoAct(); }; - //======================================================================== class OTableEditorInsUndoAct : public OTableEditorUndoAct { protected: @@ -124,7 +117,6 @@ namespace dbaui virtual ~OTableEditorInsUndoAct(); }; - //======================================================================== class OTableEditorInsNewUndoAct : public OTableEditorUndoAct { protected: @@ -139,7 +131,6 @@ namespace dbaui virtual ~OTableEditorInsNewUndoAct(); }; - //======================================================================== class OPrimKeyUndoAct : public OTableEditorUndoAct { protected: @@ -158,5 +149,4 @@ namespace dbaui } #endif // DBAUI_TABLEUNDO_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx index 2cf9086778fb..b9d1cabf86e3 100644 --- a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx +++ b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx @@ -17,24 +17,19 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "unoadmin.hxx" #include "dbu_reghelper.hxx" #include "advancedsettingsdlg.hxx" #include <comphelper/processfactory.hxx> -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; - //========================================================================= - //= OAdvancedSettingsDialog - //========================================================================= + // OAdvancedSettingsDialog class OAdvancedSettingsDialog :public ODatabaseAdministrationDialog ,public ::comphelper::OPropertyArrayUsageHelper< OAdvancedSettingsDialog > @@ -68,44 +63,36 @@ namespace dbaui virtual Dialog* createDialog(Window* _pParent); }; - //========================================================================= - //------------------------------------------------------------------------- OAdvancedSettingsDialog::OAdvancedSettingsDialog(const Reference< XComponentContext >& _rxORB) :ODatabaseAdministrationDialog(_rxORB) { } - //------------------------------------------------------------------------- Sequence<sal_Int8> SAL_CALL OAdvancedSettingsDialog::getImplementationId( ) throw(RuntimeException) { static ::cppu::OImplementationId aId; return aId.getImplementationId(); } - //------------------------------------------------------------------------- Reference< XInterface > SAL_CALL OAdvancedSettingsDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory) { return *(new OAdvancedSettingsDialog( comphelper::getComponentContext(_rxFactory) )); } - //------------------------------------------------------------------------- OUString SAL_CALL OAdvancedSettingsDialog::getImplementationName() throw(RuntimeException) { return getImplementationName_Static(); } - //------------------------------------------------------------------------- OUString OAdvancedSettingsDialog::getImplementationName_Static() throw(RuntimeException) { return OUString("org.openoffice.comp.dbu.OAdvancedSettingsDialog"); } - //------------------------------------------------------------------------- ::comphelper::StringSequence SAL_CALL OAdvancedSettingsDialog::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); } - //------------------------------------------------------------------------- ::comphelper::StringSequence OAdvancedSettingsDialog::getSupportedServiceNames_Static() throw(RuntimeException) { ::comphelper::StringSequence aSupported(1); @@ -113,36 +100,30 @@ namespace dbaui return aSupported; } - //------------------------------------------------------------------------- Reference<XPropertySetInfo> SAL_CALL OAdvancedSettingsDialog::getPropertySetInfo() throw(RuntimeException) { Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) ); return xInfo; } - //------------------------------------------------------------------------- ::cppu::IPropertyArrayHelper& OAdvancedSettingsDialog::getInfoHelper() { return *const_cast<OAdvancedSettingsDialog*>(this)->getArrayHelper(); } - //------------------------------------------------------------------------------ ::cppu::IPropertyArrayHelper* OAdvancedSettingsDialog::createArrayHelper( ) const { Sequence< Property > aProps; describeProperties(aProps); return new ::cppu::OPropertyArrayHelper(aProps); } - //------------------------------------------------------------------------------ Dialog* OAdvancedSettingsDialog::createDialog(Window* _pParent) { AdvancedSettingsDialog* pDlg = new AdvancedSettingsDialog(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection); return pDlg; } -//......................................................................... } // namespace dbaui -//......................................................................... extern "C" void SAL_CALL createRegistryInfo_OAdvancedSettingsDialog() { diff --git a/dbaccess/source/ui/uno/ColumnControl.cxx b/dbaccess/source/ui/uno/ColumnControl.cxx index 183c3f228d75..9f1da55ec47c 100644 --- a/dbaccess/source/ui/uno/ColumnControl.cxx +++ b/dbaccess/source/ui/uno/ColumnControl.cxx @@ -29,10 +29,9 @@ extern "C" void SAL_CALL createRegistryInfo_OColumnControl() { static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OColumnControl> aAutoRegistration; } -//......................................................................... + namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::awt; using namespace ::com::sun::star::beans; @@ -43,7 +42,7 @@ OColumnControl::OColumnControl(const Reference<XComponentContext>& rxContext) :UnoControl(), m_xContext(rxContext) { } -// ----------------------------------------------------------------------------- + IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(OColumnControl, SERVICE_CONTROLDEFAULT) IMPLEMENT_SERVICE_INFO_SUPPORTS(OColumnControl) IMPLEMENT_SERVICE_INFO_GETSUPPORTED2_STATIC(OColumnControl, "com.sun.star.awt.UnoControl","com.sun.star.sdb.ColumnDescriptorControl") @@ -52,12 +51,12 @@ Reference< XInterface > SAL_CALL OColumnControl::Create(const Reference< XMultiS { return static_cast< XServiceInfo* >(new OColumnControl(comphelper::getComponentContext(_rxORB))); } -// ----------------------------------------------------------------------------- + OUString OColumnControl::GetComponentServiceName() { return OUString("com.sun.star.sdb.ColumnDescriptorControl"); } -// ----------------------------------------------------------------------------- + void SAL_CALL OColumnControl::createPeer(const Reference< XToolkit >& /*rToolkit*/, const Reference< XWindowPeer >& rParentPeer) throw( RuntimeException ) { ::osl::ClearableMutexGuard aGuard( GetMutex() ); @@ -132,8 +131,7 @@ void SAL_CALL OColumnControl::createPeer(const Reference< XToolkit >& /*rToolkit mbCreatingPeer = sal_False; } } -//......................................................................... + } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/ColumnControl.hxx b/dbaccess/source/ui/uno/ColumnControl.hxx index 2a2e6dafef54..c66fd9e07866 100644 --- a/dbaccess/source/ui/uno/ColumnControl.hxx +++ b/dbaccess/source/ui/uno/ColumnControl.hxx @@ -40,9 +40,7 @@ namespace dbaui // ::com::sun::star::awt::XControl virtual void SAL_CALL createPeer(const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& _rToolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent) throw(::com::sun::star::uno::RuntimeException); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // DBAUI_COLUMNCONTROL_HXX diff --git a/dbaccess/source/ui/uno/ColumnModel.cxx b/dbaccess/source/ui/uno/ColumnModel.cxx index 4d8caec6901c..9b4615cd4b01 100644 --- a/dbaccess/source/ui/uno/ColumnModel.cxx +++ b/dbaccess/source/ui/uno/ColumnModel.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "ColumnModel.hxx" #include <com/sun/star/awt/FontRelief.hpp> #include <com/sun/star/awt/FontEmphasisMark.hpp> @@ -35,10 +34,8 @@ extern "C" void SAL_CALL createRegistryInfo_OColumnControlModel() static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::OColumnControlModel> aAutoRegistration; } -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -48,9 +45,7 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::util; - DBG_NAME(OColumnControlModel) -//------------------------------------------------------------------ OColumnControlModel::OColumnControlModel(const Reference<XMultiServiceFactory>& _rxFactory) :OPropertyContainer(m_aBHelper) ,OColumnControlModel_BASE(m_aMutex) @@ -63,7 +58,7 @@ OColumnControlModel::OColumnControlModel(const Reference<XMultiServiceFactory>& DBG_CTOR(OColumnControlModel,NULL); registerProperties(); } -// ----------------------------------------------------------------------------- + OColumnControlModel::OColumnControlModel(const OColumnControlModel* _pSource,const Reference<XMultiServiceFactory>& _rxFactory) :OPropertyContainer(m_aBHelper) ,OColumnControlModel_BASE(m_aMutex) @@ -77,7 +72,7 @@ OColumnControlModel::OColumnControlModel(const OColumnControlModel* _pSource,con DBG_CTOR(OColumnControlModel,NULL); registerProperties(); } -// ----------------------------------------------------------------------------- + OColumnControlModel::~OColumnControlModel() { DBG_DTOR(OColumnControlModel,NULL); @@ -87,7 +82,7 @@ OColumnControlModel::~OColumnControlModel() dispose(); } } -// ----------------------------------------------------------------------------- + void OColumnControlModel::registerProperties() { registerProperty( PROPERTY_ACTIVE_CONNECTION, PROPERTY_ID_ACTIVE_CONNECTION, PropertyAttribute::TRANSIENT | PropertyAttribute::BOUND, @@ -108,23 +103,22 @@ void OColumnControlModel::registerProperties() registerProperty( PROPERTY_EDIT_WIDTH, PROPERTY_ID_EDIT_WIDTH, PropertyAttribute::BOUND, &m_nWidth, ::getCppuType( &m_nWidth ) ); } + // XCloneable -//------------------------------------------------------------------------------ Reference< XCloneable > SAL_CALL OColumnControlModel::createClone( ) throw (RuntimeException) { return new OColumnControlModel( this, getORB() ); } -//------------------------------------------------------------------------------ + IMPLEMENT_TYPEPROVIDER2(OColumnControlModel,OColumnControlModel_BASE,comphelper::OPropertyContainer) IMPLEMENT_PROPERTYCONTAINER_DEFAULTS(OColumnControlModel) IMPLEMENT_SERVICE_INFO2_STATIC(OColumnControlModel,"com.sun.star.comp.dbu.OColumnControlModel","com.sun.star.awt.UnoControlModel","com.sun.star.sdb.ColumnDescriptorControlModel") IMPLEMENT_FORWARD_REFCOUNT( OColumnControlModel, OColumnControlModel_BASE ) -//------------------------------------------------------------------------------ Any SAL_CALL OColumnControlModel::queryInterface( const Type& _rType ) throw (RuntimeException) { return OColumnControlModel_BASE::queryInterface( _rType ); } -// ----------------------------------------------------------------------------- + // com::sun::star::XAggregation Any SAL_CALL OColumnControlModel::queryAggregation( const Type& rType ) throw(RuntimeException) { @@ -133,25 +127,22 @@ Any SAL_CALL OColumnControlModel::queryAggregation( const Type& rType ) throw(Ru aRet = comphelper::OPropertyContainer::queryInterface(rType); return aRet; } -//------------------------------------------------------------------------------ + OUString SAL_CALL OColumnControlModel::getServiceName() throw ( RuntimeException) { return OUString(); } -//------------------------------------------------------------------------------ + void OColumnControlModel::write(const Reference<XObjectOutputStream>& /*_rxOutStream*/) throw ( ::com::sun::star::io::IOException, RuntimeException) { // TODO } -//------------------------------------------------------------------------------ void OColumnControlModel::read(const Reference<XObjectInputStream>& /*_rxInStream*/) throw ( ::com::sun::star::io::IOException, RuntimeException) { // TODO } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/ColumnModel.hxx b/dbaccess/source/ui/uno/ColumnModel.hxx index 385284094e33..9601f47776ff 100644 --- a/dbaccess/source/ui/uno/ColumnModel.hxx +++ b/dbaccess/source/ui/uno/ColumnModel.hxx @@ -31,14 +31,10 @@ #include <cppuhelper/compbase4.hxx> #include "apitools.hxx" -//......................................................................... namespace dbaui { -//......................................................................... -//================================================================== // OColumnControlModel -//================================================================== typedef ::cppu::WeakAggComponentImplHelper4 < ::com::sun::star::awt::XControlModel , ::com::sun::star::lang::XServiceInfo , ::com::sun::star::util::XCloneable @@ -91,16 +87,13 @@ public: virtual void SAL_CALL write(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL read(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream>& _rxInStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - // OPropertyArrayUsageHelper DECLARE_PROPERTYCONTAINER_DEFAULTS( ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // DBAUI_COLUMNMODEL_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/ColumnPeer.cxx b/dbaccess/source/ui/uno/ColumnPeer.cxx index 62e90f78a822..7bc6f7c443c4 100644 --- a/dbaccess/source/ui/uno/ColumnPeer.cxx +++ b/dbaccess/source/ui/uno/ColumnPeer.cxx @@ -23,10 +23,8 @@ #include "dbustrings.hrc" #include "FieldDescriptions.hxx" -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::awt; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -44,7 +42,7 @@ OColumnPeer::OColumnPeer(Window* _pParent,const Reference<XComponentContext>& _r } osl_atomic_decrement( &m_refCount ); } -// ----------------------------------------------------------------------------- + void OColumnPeer::setEditWidth(sal_Int32 _nWidth) { SolarMutexGuard aGuard; @@ -55,7 +53,7 @@ void OColumnPeer::setEditWidth(sal_Int32 _nWidth) pFieldControl->setEditWidth(_nWidth); } } -// ----------------------------------------------------------------------------- + void OColumnPeer::setColumn(const Reference< XPropertySet>& _xColumn) { SolarMutexGuard aGuard; @@ -103,7 +101,7 @@ void OColumnPeer::setColumn(const Reference< XPropertySet>& _xColumn) pFieldControl->DisplayData(m_pActFieldDescr); } } -// ----------------------------------------------------------------------------- + void OColumnPeer::setConnection(const Reference< XConnection>& _xCon) { SolarMutexGuard aGuard; @@ -111,7 +109,7 @@ void OColumnPeer::setConnection(const Reference< XConnection>& _xCon) if ( pFieldControl ) pFieldControl->setConnection(_xCon); } -//------------------------------------------------------------------------------ + void OColumnPeer::setProperty( const OUString& _rPropertyName, const Any& Value) throw( RuntimeException ) { SolarMutexGuard aGuard; @@ -129,7 +127,7 @@ void OColumnPeer::setProperty( const OUString& _rPropertyName, const Any& Value) else VCLXWindow::setProperty(_rPropertyName,Value); } -// ----------------------------------------------------------------------------- + Any OColumnPeer::getProperty( const OUString& _rPropertyName ) throw( RuntimeException ) { Any aProp; @@ -146,8 +144,7 @@ Any OColumnPeer::getProperty( const OUString& _rPropertyName ) throw( RuntimeExc aProp = VCLXWindow::getProperty(_rPropertyName); return aProp; } -//......................................................................... + } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/ColumnPeer.hxx b/dbaccess/source/ui/uno/ColumnPeer.hxx index 45e78ec5ad91..529bff711973 100644 --- a/dbaccess/source/ui/uno/ColumnPeer.hxx +++ b/dbaccess/source/ui/uno/ColumnPeer.hxx @@ -24,10 +24,8 @@ #include <com/sun/star/sdbc/XConnection.hpp> #include <com/sun/star/uno/XComponentContext.hpp> -//......................................................................... namespace dbaui { -//......................................................................... class OFieldDescription; class OColumnPeer : public VCLXWindow { @@ -45,10 +43,7 @@ namespace dbaui virtual void SAL_CALL setProperty( const OUString& PropertyName, const ::com::sun::star::uno::Any& Value ) throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Any SAL_CALL getProperty( const OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif //DBAUI_COLUMNPEER_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx index 540f335ab4d6..0e65b1b81e5b 100644 --- a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx +++ b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbu_reghelper.hxx" #include "DBTypeWizDlg.hxx" #include "dbwiz.hxx" @@ -30,53 +29,44 @@ extern "C" void SAL_CALL createRegistryInfo_ODBTypeWizDialog() static OMultiInstanceAutoRegistration< ODBTypeWizDialog > aAutoRegistration; } -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; -//========================================================================= -//------------------------------------------------------------------------- ODBTypeWizDialog::ODBTypeWizDialog(const Reference< XComponentContext >& _rxORB) :ODatabaseAdministrationDialog(_rxORB) { } -//------------------------------------------------------------------------- + Sequence<sal_Int8> SAL_CALL ODBTypeWizDialog::getImplementationId( ) throw(RuntimeException) { static ::cppu::OImplementationId aId; return aId.getImplementationId(); } -//------------------------------------------------------------------------- Reference< XInterface > SAL_CALL ODBTypeWizDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory) { return *(new ODBTypeWizDialog( comphelper::getComponentContext(_rxFactory) )); } -//------------------------------------------------------------------------- OUString SAL_CALL ODBTypeWizDialog::getImplementationName() throw(RuntimeException) { return getImplementationName_Static(); } -//------------------------------------------------------------------------- OUString ODBTypeWizDialog::getImplementationName_Static() throw(RuntimeException) { return OUString("org.openoffice.comp.dbu.ODBTypeWizDialog"); } -//------------------------------------------------------------------------- ::comphelper::StringSequence SAL_CALL ODBTypeWizDialog::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); } -//------------------------------------------------------------------------- ::comphelper::StringSequence ODBTypeWizDialog::getSupportedServiceNames_Static() throw(RuntimeException) { ::comphelper::StringSequence aSupported(1); @@ -84,35 +74,30 @@ OUString ODBTypeWizDialog::getImplementationName_Static() throw(RuntimeException return aSupported; } -//------------------------------------------------------------------------- Reference<XPropertySetInfo> SAL_CALL ODBTypeWizDialog::getPropertySetInfo() throw(RuntimeException) { Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) ); return xInfo; } -//------------------------------------------------------------------------- ::cppu::IPropertyArrayHelper& ODBTypeWizDialog::getInfoHelper() { return *const_cast<ODBTypeWizDialog*>(this)->getArrayHelper(); } -//------------------------------------------------------------------------------ ::cppu::IPropertyArrayHelper* ODBTypeWizDialog::createArrayHelper( ) const { Sequence< Property > aProps; describeProperties(aProps); return new ::cppu::OPropertyArrayHelper(aProps); } -//------------------------------------------------------------------------------ + Dialog* ODBTypeWizDialog::createDialog(Window* _pParent) { ODbTypeWizDialog* pDlg = new ODbTypeWizDialog(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection); return pDlg; } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/DBTypeWizDlg.hxx b/dbaccess/source/ui/uno/DBTypeWizDlg.hxx index 1fe6bb65f393..f9bf52ed23b0 100644 --- a/dbaccess/source/ui/uno/DBTypeWizDlg.hxx +++ b/dbaccess/source/ui/uno/DBTypeWizDlg.hxx @@ -24,13 +24,9 @@ #include "unoadmin.hxx" #endif -//......................................................................... namespace dbaui { -//......................................................................... -//========================================================================= -//= ODBTypeWizDialog -//========================================================================= +// ODBTypeWizDialog class ODBTypeWizDialog :public ODatabaseAdministrationDialog ,public ::comphelper::OPropertyArrayUsageHelper< ODBTypeWizDialog > @@ -64,9 +60,7 @@ protected: virtual Dialog* createDialog(Window* _pParent); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // DBAUI_DBTYPEWIZDLG_HXX diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx index d3bec7582215..ac1281bedd79 100644 --- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx +++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbu_reghelper.hxx" #include <com/sun/star/document/XEventListener.hpp> #include <com/sun/star/container/XSet.hpp> @@ -35,10 +34,8 @@ extern "C" void SAL_CALL createRegistryInfo_ODBTypeWizDialogSetup() static OMultiInstanceAutoRegistration< ODBTypeWizDialogSetup > aAutoRegistration; } -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -46,8 +43,6 @@ namespace dbaui using namespace ::com::sun::star::sdb; using namespace ::com::sun::star::sdbc; -//========================================================================= -//------------------------------------------------------------------------- ODBTypeWizDialogSetup::ODBTypeWizDialogSetup(const Reference< XComponentContext >& _rxORB) :ODatabaseAdministrationDialog(_rxORB) ,m_bOpenDatabase(sal_True) @@ -59,39 +54,34 @@ ODBTypeWizDialogSetup::ODBTypeWizDialogSetup(const Reference< XComponentContext registerProperty(OUString("StartTableWizard"), 4, PropertyAttribute::TRANSIENT, &m_bStartTableWizard, getBooleanCppuType()); } -//------------------------------------------------------------------------- + Sequence<sal_Int8> SAL_CALL ODBTypeWizDialogSetup::getImplementationId( ) throw(RuntimeException) { static ::cppu::OImplementationId aId; return aId.getImplementationId(); } -//------------------------------------------------------------------------- Reference< XInterface > SAL_CALL ODBTypeWizDialogSetup::Create(const Reference< XMultiServiceFactory >& _rxFactory) { Reference < XInterface > xDBWizard = *(new ODBTypeWizDialogSetup( comphelper::getComponentContext(_rxFactory) )); return xDBWizard; } -//------------------------------------------------------------------------- OUString SAL_CALL ODBTypeWizDialogSetup::getImplementationName() throw(RuntimeException) { return getImplementationName_Static(); } -//------------------------------------------------------------------------- OUString ODBTypeWizDialogSetup::getImplementationName_Static() throw(RuntimeException) { return OUString("org.openoffice.comp.dbu.ODBTypeWizDialogSetup"); } -//------------------------------------------------------------------------- ::comphelper::StringSequence SAL_CALL ODBTypeWizDialogSetup::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); } -//------------------------------------------------------------------------- ::comphelper::StringSequence ODBTypeWizDialogSetup::getSupportedServiceNames_Static() throw(RuntimeException) { ::comphelper::StringSequence aSupported(1); @@ -99,31 +89,28 @@ OUString ODBTypeWizDialogSetup::getImplementationName_Static() throw(RuntimeExce return aSupported; } -//------------------------------------------------------------------------- Reference<XPropertySetInfo> SAL_CALL ODBTypeWizDialogSetup::getPropertySetInfo() throw(RuntimeException) { return createPropertySetInfo( getInfoHelper() ); } -//------------------------------------------------------------------------- ::cppu::IPropertyArrayHelper& ODBTypeWizDialogSetup::getInfoHelper() { return *const_cast<ODBTypeWizDialogSetup*>(this)->getArrayHelper(); } -//------------------------------------------------------------------------------ ::cppu::IPropertyArrayHelper* ODBTypeWizDialogSetup::createArrayHelper( ) const { Sequence< Property > aProps; describeProperties(aProps); return new ::cppu::OPropertyArrayHelper(aProps); } -//------------------------------------------------------------------------------ + Dialog* ODBTypeWizDialogSetup::createDialog(Window* _pParent) { return new ODbTypeWizDialogSetup(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection); } -// ----------------------------------------------------------------------------- + void ODBTypeWizDialogSetup::executedDialog(sal_Int16 _nExecutionResult) { if ( _nExecutionResult == RET_OK ) @@ -134,8 +121,6 @@ void ODBTypeWizDialogSetup::executedDialog(sal_Int16 _nExecutionResult) } } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx index afce6e0a2b7c..4fbaad0c6c5c 100644 --- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx +++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx @@ -24,13 +24,9 @@ #include "unoadmin.hxx" #endif -//......................................................................... namespace dbaui { -//......................................................................... -//========================================================================= -//= ODBTypeWizDialogSetup -//========================================================================= +// ODBTypeWizDialogSetup class ODBTypeWizDialogSetup :public ODatabaseAdministrationDialog ,public ::comphelper::OPropertyArrayUsageHelper< ODBTypeWizDialogSetup > @@ -68,9 +64,7 @@ protected: virtual void executedDialog(sal_Int16 _nExecutionResult); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // DBAUI_DBTYPEWIZDLG_HXX diff --git a/dbaccess/source/ui/uno/TableFilterDlg.cxx b/dbaccess/source/ui/uno/TableFilterDlg.cxx index c24a1b31f1f9..846c81f8d77d 100644 --- a/dbaccess/source/ui/uno/TableFilterDlg.cxx +++ b/dbaccess/source/ui/uno/TableFilterDlg.cxx @@ -17,13 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbu_reghelper.hxx" #include "TableFilterDlg.hxx" #include "TablesSingleDlg.hxx" #include <comphelper/processfactory.hxx> - using namespace dbaui; extern "C" void SAL_CALL createRegistryInfo_OTableFilterDialog() @@ -31,53 +29,44 @@ extern "C" void SAL_CALL createRegistryInfo_OTableFilterDialog() static OMultiInstanceAutoRegistration< OTableFilterDialog > aAutoRegistration; } -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; -//========================================================================= -//------------------------------------------------------------------------- OTableFilterDialog::OTableFilterDialog(const Reference< XComponentContext >& _rxORB) :ODatabaseAdministrationDialog(_rxORB) { } -//------------------------------------------------------------------------- + Sequence<sal_Int8> SAL_CALL OTableFilterDialog::getImplementationId( ) throw(RuntimeException) { static ::cppu::OImplementationId aId; return aId.getImplementationId(); } -//------------------------------------------------------------------------- Reference< XInterface > SAL_CALL OTableFilterDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory) { return *(new OTableFilterDialog( comphelper::getComponentContext(_rxFactory) )); } -//------------------------------------------------------------------------- OUString SAL_CALL OTableFilterDialog::getImplementationName() throw(RuntimeException) { return getImplementationName_Static(); } -//------------------------------------------------------------------------- OUString OTableFilterDialog::getImplementationName_Static() throw(RuntimeException) { return OUString("org.openoffice.comp.dbu.OTableFilterDialog"); } -//------------------------------------------------------------------------- ::comphelper::StringSequence SAL_CALL OTableFilterDialog::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); } -//------------------------------------------------------------------------- ::comphelper::StringSequence OTableFilterDialog::getSupportedServiceNames_Static() throw(RuntimeException) { ::comphelper::StringSequence aSupported(1); @@ -85,35 +74,30 @@ OUString OTableFilterDialog::getImplementationName_Static() throw(RuntimeExcepti return aSupported; } -//------------------------------------------------------------------------- Reference<XPropertySetInfo> SAL_CALL OTableFilterDialog::getPropertySetInfo() throw(RuntimeException) { Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) ); return xInfo; } -//------------------------------------------------------------------------- ::cppu::IPropertyArrayHelper& OTableFilterDialog::getInfoHelper() { return *const_cast<OTableFilterDialog*>(this)->getArrayHelper(); } -//------------------------------------------------------------------------------ ::cppu::IPropertyArrayHelper* OTableFilterDialog::createArrayHelper( ) const { Sequence< Property > aProps; describeProperties(aProps); return new ::cppu::OPropertyArrayHelper(aProps); } -//------------------------------------------------------------------------------ + Dialog* OTableFilterDialog::createDialog(Window* _pParent) { OTableSubscriptionDialog* pDlg = new OTableSubscriptionDialog(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection); return pDlg; } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/TableFilterDlg.hxx b/dbaccess/source/ui/uno/TableFilterDlg.hxx index 0e9dd004148b..aca42953941b 100644 --- a/dbaccess/source/ui/uno/TableFilterDlg.hxx +++ b/dbaccess/source/ui/uno/TableFilterDlg.hxx @@ -24,13 +24,9 @@ #include "unoadmin.hxx" #endif -//......................................................................... namespace dbaui { -//......................................................................... -//========================================================================= -//= OTableFilterDialog -//========================================================================= +// OTableFilterDialog class OTableFilterDialog :public ODatabaseAdministrationDialog ,public ::comphelper::OPropertyArrayUsageHelper< OTableFilterDialog > @@ -64,9 +60,7 @@ protected: virtual Dialog* createDialog(Window* _pParent); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_TABLEFILTERDLG_HXX diff --git a/dbaccess/source/ui/uno/UserSettingsDlg.cxx b/dbaccess/source/ui/uno/UserSettingsDlg.cxx index 3bef400319a5..9cae4effd0f5 100644 --- a/dbaccess/source/ui/uno/UserSettingsDlg.cxx +++ b/dbaccess/source/ui/uno/UserSettingsDlg.cxx @@ -17,13 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbu_reghelper.hxx" #include "UserSettingsDlg.hxx" #include "UserAdminDlg.hxx" #include <comphelper/processfactory.hxx> - using namespace dbaui; extern "C" void SAL_CALL createRegistryInfo_OUserSettingsDialog() @@ -31,53 +29,44 @@ extern "C" void SAL_CALL createRegistryInfo_OUserSettingsDialog() static OMultiInstanceAutoRegistration< OUserSettingsDialog > aAutoRegistration; } -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; -//========================================================================= -//------------------------------------------------------------------------- OUserSettingsDialog::OUserSettingsDialog(const Reference< XComponentContext >& _rxORB) :ODatabaseAdministrationDialog(_rxORB) { } -//------------------------------------------------------------------------- + Sequence<sal_Int8> SAL_CALL OUserSettingsDialog::getImplementationId( ) throw(RuntimeException) { static ::cppu::OImplementationId aId; return aId.getImplementationId(); } -//------------------------------------------------------------------------- Reference< XInterface > SAL_CALL OUserSettingsDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory) { return *(new OUserSettingsDialog( comphelper::getComponentContext(_rxFactory) )); } -//------------------------------------------------------------------------- OUString SAL_CALL OUserSettingsDialog::getImplementationName() throw(RuntimeException) { return getImplementationName_Static(); } -//------------------------------------------------------------------------- OUString OUserSettingsDialog::getImplementationName_Static() throw(RuntimeException) { return OUString("org.openoffice.comp.dbu.OUserSettingsDialog"); } -//------------------------------------------------------------------------- ::comphelper::StringSequence SAL_CALL OUserSettingsDialog::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); } -//------------------------------------------------------------------------- ::comphelper::StringSequence OUserSettingsDialog::getSupportedServiceNames_Static() throw(RuntimeException) { ::comphelper::StringSequence aSupported(1); @@ -85,35 +74,30 @@ OUString OUserSettingsDialog::getImplementationName_Static() throw(RuntimeExcept return aSupported; } -//------------------------------------------------------------------------- Reference<XPropertySetInfo> SAL_CALL OUserSettingsDialog::getPropertySetInfo() throw(RuntimeException) { Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) ); return xInfo; } -//------------------------------------------------------------------------- ::cppu::IPropertyArrayHelper& OUserSettingsDialog::getInfoHelper() { return *const_cast<OUserSettingsDialog*>(this)->getArrayHelper(); } -//------------------------------------------------------------------------------ ::cppu::IPropertyArrayHelper* OUserSettingsDialog::createArrayHelper( ) const { Sequence< Property > aProps; describeProperties(aProps); return new ::cppu::OPropertyArrayHelper(aProps); } -//------------------------------------------------------------------------------ + Dialog* OUserSettingsDialog::createDialog(Window* _pParent) { OUserAdminDlg* pDlg = new OUserAdminDlg(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection, m_xActiveConnection); return pDlg; } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/UserSettingsDlg.hxx b/dbaccess/source/ui/uno/UserSettingsDlg.hxx index da3e82882931..090b13df240f 100644 --- a/dbaccess/source/ui/uno/UserSettingsDlg.hxx +++ b/dbaccess/source/ui/uno/UserSettingsDlg.hxx @@ -24,13 +24,9 @@ #include "unoadmin.hxx" #endif -//......................................................................... namespace dbaui { -//......................................................................... -//========================================================================= -//= OUserSettingsDialog -//========================================================================= +// OUserSettingsDialog class OUserSettingsDialog :public ODatabaseAdministrationDialog ,public ::comphelper::OPropertyArrayUsageHelper< OUserSettingsDialog > @@ -64,9 +60,7 @@ protected: virtual Dialog* createDialog(Window* _pParent); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_USERSETTINGSDLG_HXX diff --git a/dbaccess/source/ui/uno/admindlg.cxx b/dbaccess/source/ui/uno/admindlg.cxx index b370e3352994..10b1f7252b55 100644 --- a/dbaccess/source/ui/uno/admindlg.cxx +++ b/dbaccess/source/ui/uno/admindlg.cxx @@ -17,13 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbu_reghelper.hxx" #include "admindlg.hxx" #include "dbadmin.hxx" #include <comphelper/processfactory.hxx> - using namespace dbaui; extern "C" void SAL_CALL createRegistryInfo_ODataSourcePropertyDialog() @@ -31,53 +29,44 @@ extern "C" void SAL_CALL createRegistryInfo_ODataSourcePropertyDialog() static OMultiInstanceAutoRegistration< ODataSourcePropertyDialog > aAutoRegistration; } -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; -//========================================================================= -//------------------------------------------------------------------------- ODataSourcePropertyDialog::ODataSourcePropertyDialog(const Reference< XComponentContext >& _rxORB) :ODatabaseAdministrationDialog(_rxORB) { } -//------------------------------------------------------------------------- + Sequence<sal_Int8> SAL_CALL ODataSourcePropertyDialog::getImplementationId( ) throw(RuntimeException) { static ::cppu::OImplementationId aId; return aId.getImplementationId(); } -//------------------------------------------------------------------------- Reference< XInterface > SAL_CALL ODataSourcePropertyDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory) { return *(new ODataSourcePropertyDialog( comphelper::getComponentContext(_rxFactory) )); } -//------------------------------------------------------------------------- OUString SAL_CALL ODataSourcePropertyDialog::getImplementationName() throw(RuntimeException) { return getImplementationName_Static(); } -//------------------------------------------------------------------------- OUString ODataSourcePropertyDialog::getImplementationName_Static() throw(RuntimeException) { return OUString("org.openoffice.comp.dbu.ODatasourceAdministrationDialog"); } -//------------------------------------------------------------------------- ::comphelper::StringSequence SAL_CALL ODataSourcePropertyDialog::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); } -//------------------------------------------------------------------------- ::comphelper::StringSequence ODataSourcePropertyDialog::getSupportedServiceNames_Static() throw(RuntimeException) { ::comphelper::StringSequence aSupported(1); @@ -85,27 +74,24 @@ OUString ODataSourcePropertyDialog::getImplementationName_Static() throw(Runtime return aSupported; } -//------------------------------------------------------------------------- Reference<XPropertySetInfo> SAL_CALL ODataSourcePropertyDialog::getPropertySetInfo() throw(RuntimeException) { Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) ); return xInfo; } -//------------------------------------------------------------------------- ::cppu::IPropertyArrayHelper& ODataSourcePropertyDialog::getInfoHelper() { return *const_cast<ODataSourcePropertyDialog*>(this)->getArrayHelper(); } -//------------------------------------------------------------------------------ ::cppu::IPropertyArrayHelper* ODataSourcePropertyDialog::createArrayHelper( ) const { Sequence< Property > aProps; describeProperties(aProps); return new ::cppu::OPropertyArrayHelper(aProps); } -//------------------------------------------------------------------------------ + Dialog* ODataSourcePropertyDialog::createDialog(Window* _pParent) { @@ -118,8 +104,6 @@ Dialog* ODataSourcePropertyDialog::createDialog(Window* _pParent) return pDialog; } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/admindlg.hxx b/dbaccess/source/ui/uno/admindlg.hxx index 6d7a6d0375a5..dd200c72ba13 100644 --- a/dbaccess/source/ui/uno/admindlg.hxx +++ b/dbaccess/source/ui/uno/admindlg.hxx @@ -24,13 +24,9 @@ #include "unoadmin.hxx" #endif -//......................................................................... namespace dbaui { -//......................................................................... -//========================================================================= -//= ODataSourcePropertyDialog -//========================================================================= +// ODataSourcePropertyDialog class ODataSourcePropertyDialog :public ODatabaseAdministrationDialog ,public ::comphelper::OPropertyArrayUsageHelper< ODataSourcePropertyDialog > @@ -64,9 +60,7 @@ protected: virtual Dialog* createDialog(Window* _pParent); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_ADMINDLG_HXX diff --git a/dbaccess/source/ui/uno/composerdialogs.cxx b/dbaccess/source/ui/uno/composerdialogs.cxx index 1b3190605e8d..04d21bd18374 100644 --- a/dbaccess/source/ui/uno/composerdialogs.cxx +++ b/dbaccess/source/ui/uno/composerdialogs.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "composerdialogs.hxx" #include "dbu_reghelper.hxx" @@ -36,10 +35,8 @@ extern "C" void SAL_CALL createRegistryInfo_ComposerDialogs() static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::RowsetFilterDialog > aFilterDialogRegistration; } -//......................................................................... namespace dbaui { -//......................................................................... #define PROPERTY_ID_QUERYCOMPOSER 100 #define PROPERTY_ID_ROWSET 101 @@ -55,11 +52,8 @@ namespace dbaui using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdb; - //===================================================================== - //= ComposerDialog - //===================================================================== + // ComposerDialog DBG_NAME(ComposerDialog) - //--------------------------------------------------------------------- ComposerDialog::ComposerDialog(const Reference< XComponentContext >& _rxORB) :OGenericUnoDialog( _rxORB ) { @@ -71,20 +65,16 @@ namespace dbaui &m_xRowSet, ::getCppuType( &m_xRowSet ) ); } - //--------------------------------------------------------------------- ComposerDialog::~ComposerDialog() { DBG_DTOR(ComposerDialog,NULL); } - //--------------------------------------------------------------------- IMPLEMENT_IMPLEMENTATION_ID( ComposerDialog ) - //--------------------------------------------------------------------- IMPLEMENT_PROPERTYCONTAINER_DEFAULTS( ComposerDialog ) - //--------------------------------------------------------------------- Dialog* ComposerDialog::createDialog(Window* _pParent) { // obtain all the objects needed for the dialog @@ -132,16 +122,12 @@ namespace dbaui return createComposerDialog( _pParent, xConnection, xColumns ); } - //===================================================================== - //= RowsetFilterDialog - //===================================================================== - //--------------------------------------------------------------------- + // RowsetFilterDialog RowsetFilterDialog::RowsetFilterDialog( const Reference< XComponentContext >& _rxORB ) :ComposerDialog( _rxORB ) { } - //--------------------------------------------------------------------- IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(RowsetFilterDialog, "com.sun.star.uno.comp.sdb.RowsetFilterDialog") IMPLEMENT_SERVICE_INFO_SUPPORTS(RowsetFilterDialog) IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(RowsetFilterDialog, "com.sun.star.sdb.FilterDialog") @@ -152,8 +138,6 @@ namespace dbaui return static_cast< XServiceInfo* >(new RowsetFilterDialog( comphelper::getComponentContext(_rxORB))); } - - //--------------------------------------------------------------------- Dialog* RowsetFilterDialog::createComposerDialog( Window* _pParent, const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxColumns ) { return new DlgFilterCrit( _pParent, m_aContext, _rxConnection, m_xComposer, _rxColumns ); @@ -178,7 +162,6 @@ namespace dbaui ComposerDialog::initialize(aArguments); } - //--------------------------------------------------------------------- void RowsetFilterDialog::executedDialog( sal_Int16 _nExecutionResult ) { ComposerDialog::executedDialog( _nExecutionResult ); @@ -187,16 +170,12 @@ namespace dbaui static_cast< DlgFilterCrit* >( m_pDialog )->BuildWherePart(); } - //===================================================================== - //= RowsetOrderDialog - //===================================================================== - //--------------------------------------------------------------------- + // RowsetOrderDialog RowsetOrderDialog::RowsetOrderDialog( const Reference< XComponentContext >& _rxORB ) :ComposerDialog( _rxORB ) { } - //--------------------------------------------------------------------- IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(RowsetOrderDialog, "com.sun.star.uno.comp.sdb.RowsetOrderDialog") IMPLEMENT_SERVICE_INFO_SUPPORTS(RowsetOrderDialog) IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(RowsetOrderDialog, "com.sun.star.sdb.OrderDialog") @@ -207,13 +186,11 @@ namespace dbaui return static_cast< XServiceInfo* >(new RowsetOrderDialog( comphelper::getComponentContext(_rxORB))); } - //--------------------------------------------------------------------- Dialog* RowsetOrderDialog::createComposerDialog( Window* _pParent, const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxColumns ) { return new DlgOrderCrit( _pParent, _rxConnection, m_xComposer, _rxColumns ); } - //--------------------------------------------------------------------- void SAL_CALL RowsetOrderDialog::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException) { if( aArguments.getLength() == 2 ) @@ -229,7 +206,6 @@ namespace dbaui ComposerDialog::initialize(aArguments); } - //--------------------------------------------------------------------- void RowsetOrderDialog::executedDialog( sal_Int16 _nExecutionResult ) { ComposerDialog::executedDialog( _nExecutionResult ); @@ -243,9 +219,6 @@ namespace dbaui m_xComposer->setOrder( static_cast< DlgOrderCrit* >( m_pDialog )->GetOrignalOrder() ); } -//......................................................................... } // namespace dbaui -//......................................................................... - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/composerdialogs.hxx b/dbaccess/source/ui/uno/composerdialogs.hxx index 846ec80275cb..7a8d82bd6c63 100644 --- a/dbaccess/source/ui/uno/composerdialogs.hxx +++ b/dbaccess/source/ui/uno/composerdialogs.hxx @@ -30,14 +30,10 @@ #include "moduledbu.hxx" #include "apitools.hxx" -//......................................................................... namespace dbaui { -//......................................................................... - //===================================================================== - //= ComposerDialog - //===================================================================== + // ComposerDialog class ComposerDialog; typedef ::comphelper::OPropertyArrayUsageHelper< ComposerDialog > ComposerDialog_PBASE; @@ -76,9 +72,7 @@ namespace dbaui virtual Dialog* createDialog(Window* _pParent); }; - //===================================================================== - //= RowsetFilterDialog - //===================================================================== + // RowsetFilterDialog class RowsetFilterDialog : public ComposerDialog { public: @@ -103,9 +97,7 @@ namespace dbaui }; - //===================================================================== - //= RowsetOrderDialog - //===================================================================== + // RowsetOrderDialog class RowsetOrderDialog : public ComposerDialog { public: @@ -129,11 +121,8 @@ namespace dbaui throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // DBACCESS_SOURCE_UI_UNO_COMPOSERDIALOGS_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx index 4aaf66d14709..954c60186d85 100644 --- a/dbaccess/source/ui/uno/copytablewizard.cxx +++ b/dbaccess/source/ui/uno/copytablewizard.cxx @@ -70,10 +70,8 @@ #include <vcl/msgbox.hxx> #include <vcl/waitobj.hxx> -//........................................................................ namespace dbaui { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -140,9 +138,7 @@ namespace dbaui typedef ::utl::SharedUNOComponent< XConnection > SharedConnection; - //========================================================================= - //= CopyTableWizard - //========================================================================= + // CopyTableWizard typedef ::svt::OGenericUnoDialog CopyTableWizard_DialogBase; typedef ::cppu::ImplInheritanceHelper1 < CopyTableWizard_DialogBase , XCopyTableWizard @@ -366,9 +362,7 @@ private: sal_Int16 m_nOverrideExecutionResult; }; -//========================================================================= -//= MethodGuard -//========================================================================= +// MethodGuard class CopyTableAccessGuard { public: @@ -389,8 +383,6 @@ private: CopyTableWizard& m_rWizard; }; -//========================================================================= -//------------------------------------------------------------------------- CopyTableWizard::CopyTableWizard( const Reference< XComponentContext >& _rxORB ) :CopyTableWizard_Base( _rxORB ) ,m_xContext( _rxORB ) @@ -410,7 +402,6 @@ CopyTableWizard::CopyTableWizard( const Reference< XComponentContext >& _rxORB ) { } -//------------------------------------------------------------------------- CopyTableWizard::~CopyTableWizard() { acquire(); @@ -428,31 +419,26 @@ CopyTableWizard::~CopyTableWizard() // some thinking - would it break existing clients which do not call a dispose, then? } -//------------------------------------------------------------------------- Reference< XInterface > CopyTableWizard::Create( const Reference< XMultiServiceFactory >& _rxFactory ) { return *( new CopyTableWizard( comphelper::getComponentContext(_rxFactory) ) ); } -//------------------------------------------------------------------------- OUString SAL_CALL CopyTableWizard::getImplementationName() throw(RuntimeException) { return getImplementationName_Static(); } -//------------------------------------------------------------------------- OUString CopyTableWizard::getImplementationName_Static() throw(RuntimeException) { return OUString( "org.openoffice.comp.dbu.CopyTableWizard" ); } -//------------------------------------------------------------------------- ::comphelper::StringSequence SAL_CALL CopyTableWizard::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); } -//------------------------------------------------------------------------- ::comphelper::StringSequence CopyTableWizard::getSupportedServiceNames_Static() throw(RuntimeException) { ::comphelper::StringSequence aSupported(1); @@ -460,21 +446,18 @@ OUString CopyTableWizard::getImplementationName_Static() throw(RuntimeException) return aSupported; } -//------------------------------------------------------------------------- Reference< XPropertySetInfo > SAL_CALL CopyTableWizard::getPropertySetInfo() throw(RuntimeException) { Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) ); return xInfo; } -//-------------------------------------------------------------------- ::sal_Int16 SAL_CALL CopyTableWizard::getOperation() throw (RuntimeException) { CopyTableAccessGuard aGuard( *this ); return m_nOperation; } -//-------------------------------------------------------------------- void SAL_CALL CopyTableWizard::setOperation( ::sal_Int16 _operation ) throw (IllegalArgumentException, RuntimeException) { CopyTableAccessGuard aGuard( *this ); @@ -498,28 +481,24 @@ void SAL_CALL CopyTableWizard::setOperation( ::sal_Int16 _operation ) throw (Ill m_nOperation = _operation; } -//-------------------------------------------------------------------- OUString SAL_CALL CopyTableWizard::getDestinationTableName() throw (RuntimeException) { CopyTableAccessGuard aGuard( *this ); return m_sDestinationTable; } -//-------------------------------------------------------------------- void SAL_CALL CopyTableWizard::setDestinationTableName( const OUString& _destinationTableName ) throw (RuntimeException) { CopyTableAccessGuard aGuard( *this ); m_sDestinationTable = _destinationTableName; } -//-------------------------------------------------------------------- Optional< OUString > SAL_CALL CopyTableWizard::getCreatePrimaryKey() throw (RuntimeException) { CopyTableAccessGuard aGuard( *this ); return m_aPrimaryKeyName; } -//-------------------------------------------------------------------- void SAL_CALL CopyTableWizard::setCreatePrimaryKey( const Optional< OUString >& _newPrimaryKey ) throw (IllegalArgumentException, RuntimeException) { CopyTableAccessGuard aGuard( *this ); @@ -533,19 +512,19 @@ void SAL_CALL CopyTableWizard::setCreatePrimaryKey( const Optional< OUString >& m_aPrimaryKeyName = _newPrimaryKey; } -// ----------------------------------------------------------------------------- + sal_Bool SAL_CALL CopyTableWizard::getUseHeaderLineAsColumnNames() throw (RuntimeException) { CopyTableAccessGuard aGuard( *this ); return m_bUseHeaderLineAsColumnNames; } -// ----------------------------------------------------------------------------- + void SAL_CALL CopyTableWizard::setUseHeaderLineAsColumnNames( sal_Bool _bUseHeaderLineAsColumnNames ) throw (RuntimeException) { CopyTableAccessGuard aGuard( *this ); m_bUseHeaderLineAsColumnNames = _bUseHeaderLineAsColumnNames; } -//-------------------------------------------------------------------- + void SAL_CALL CopyTableWizard::addCopyTableListener( const Reference< XCopyTableListener >& _rxListener ) throw (RuntimeException) { CopyTableAccessGuard aGuard( *this ); @@ -553,7 +532,6 @@ void SAL_CALL CopyTableWizard::addCopyTableListener( const Reference< XCopyTable m_aCopyTableListeners.addInterface( _rxListener ); } -//-------------------------------------------------------------------- void SAL_CALL CopyTableWizard::removeCopyTableListener( const Reference< XCopyTableListener >& _rxListener ) throw (RuntimeException) { CopyTableAccessGuard aGuard( *this ); @@ -561,14 +539,12 @@ void SAL_CALL CopyTableWizard::removeCopyTableListener( const Reference< XCopyTa m_aCopyTableListeners.removeInterface( _rxListener ); } -//-------------------------------------------------------------------- void SAL_CALL CopyTableWizard::setTitle( const OUString& _rTitle ) throw (RuntimeException) { CopyTableAccessGuard aGuard( *this ); CopyTableWizard_DialogBase::setTitle( _rTitle ); } -//-------------------------------------------------------------------- ::sal_Int16 SAL_CALL CopyTableWizard::execute( ) throw (RuntimeException) { CopyTableAccessGuard aGuard( *this ); @@ -581,7 +557,6 @@ void SAL_CALL CopyTableWizard::setTitle( const OUString& _rTitle ) throw (Runtim return nExecutionResult; } -//------------------------------------------------------------------------- OCopyTableWizard& CopyTableWizard::impl_getDialog_throw() { OCopyTableWizard* pWizard = dynamic_cast< OCopyTableWizard* >( m_pDialog ); @@ -590,7 +565,6 @@ OCopyTableWizard& CopyTableWizard::impl_getDialog_throw() return *pWizard; } -//------------------------------------------------------------------------- const OCopyTableWizard& CopyTableWizard::impl_getDialog_throw() const { const OCopyTableWizard* pWizard = dynamic_cast< const OCopyTableWizard* >( m_pDialog ); @@ -599,7 +573,6 @@ const OCopyTableWizard& CopyTableWizard::impl_getDialog_throw() const return *pWizard; } -//------------------------------------------------------------------------- void CopyTableWizard::impl_attributesToDialog_nothrow( OCopyTableWizard& _rDialog ) const { // primary key column @@ -609,7 +582,6 @@ void CopyTableWizard::impl_attributesToDialog_nothrow( OCopyTableWizard& _rDialo // everything else was passed at construction time already } -//------------------------------------------------------------------------- void CopyTableWizard::impl_dialogToAttributes_nothrow( const OCopyTableWizard& _rDialog ) { m_aPrimaryKeyName.IsPresent = _rDialog.shouldCreatePrimaryKey(); @@ -624,10 +596,8 @@ void CopyTableWizard::impl_dialogToAttributes_nothrow( const OCopyTableWizard& _ m_bUseHeaderLineAsColumnNames = _rDialog.UseHeaderLine(); } -//------------------------------------------------------------------------- namespace { - //..................................................................... /** tries to obtain the InteractionHandler associated with a given data source If the data source is a sdb-level data source, it will have a DatabaseDocument associated @@ -656,7 +626,6 @@ namespace return xHandler; } - //..................................................................... /** tries to obtain the InteractionHandler associated with a given connection If the connection belongs to a sdb-level data source, then this data source @@ -681,7 +650,6 @@ namespace } } -//------------------------------------------------------------------------- Reference< XPropertySet > CopyTableWizard::impl_ensureDataAccessDescriptor_throw( const Sequence< Any >& _rAllArgs, const sal_Int16 _nArgPos, SharedConnection& _out_rxConnection, Reference< XInteractionHandler >& _out_rxDocInteractionHandler ) const @@ -719,7 +687,6 @@ Reference< XPropertySet > CopyTableWizard::impl_ensureDataAccessDescriptor_throw return xDescriptor; } -//------------------------------------------------------------------------- namespace { bool lcl_hasNonEmptyStringValue_throw( const Reference< XPropertySet >& _rxDescriptor, @@ -734,7 +701,6 @@ namespace } } -//------------------------------------------------------------------------- void CopyTableWizard::impl_checkForUnsupportedSettings_throw( const Reference< XPropertySet >& _rxSourceDescriptor ) const { OSL_PRECOND( _rxSourceDescriptor.is(), "CopyTableWizard::impl_checkForUnsupportedSettings_throw: illegal argument!" ); @@ -767,7 +733,6 @@ void CopyTableWizard::impl_checkForUnsupportedSettings_throw( const Reference< X } -//------------------------------------------------------------------------- SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptr< ICopyTableSourceObject > CopyTableWizard::impl_extractSourceObject_throw( const Reference< XPropertySet >& _rxDescriptor, sal_Int32& _out_rCommandType ) const { @@ -834,9 +799,9 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH return pSourceObject; } + SAL_WNODEPRECATED_DECLARATIONS_POP -//------------------------------------------------------------------------- void CopyTableWizard::impl_extractSourceResultSet_throw( const Reference< XPropertySet >& i_rDescriptor ) { Reference< XPropertySetInfo > xPSI( i_rDescriptor->getPropertySetInfo(), UNO_SET_THROW ); @@ -872,7 +837,6 @@ void CopyTableWizard::impl_extractSourceResultSet_throw( const Reference< XPrope } } -//------------------------------------------------------------------------- SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference< XPropertySet >& _rxDataSourceDescriptor, Reference< XInteractionHandler >& _out_rxDocInteractionHandler ) const { @@ -968,7 +932,6 @@ SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference< return xConnection; } -//------------------------------------------------------------------------- ::utl::SharedUNOComponent< XPreparedStatement > CopyTableWizard::impl_createSourceStatement_throw() const { OSL_PRECOND( m_xSourceConnection.is(), "CopyTableWizard::impl_createSourceStatement_throw: illegal call!" ); @@ -1025,7 +988,6 @@ SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference< return xStatement; } -//------------------------------------------------------------------------- namespace { class ValueTransfer @@ -1072,7 +1034,6 @@ namespace }; } -//------------------------------------------------------------------------- bool CopyTableWizard::impl_processCopyError_nothrow( const CopyTableRowEvent& _rEvent ) { Reference< XCopyTableListener > xListener; @@ -1149,7 +1110,6 @@ bool CopyTableWizard::impl_processCopyError_nothrow( const CopyTableRowEvent& _r return false; } -//------------------------------------------------------------------------- void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSourceResultSet, const Reference< XPropertySet >& _rxDestTable ) { @@ -1369,7 +1329,7 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou } while( bContinue ); } -//------------------------------------------------------------------------- + void CopyTableWizard::impl_doCopy_nothrow() { Any aError; @@ -1485,7 +1445,7 @@ void CopyTableWizard::impl_doCopy_nothrow() } } } -// ----------------------------------------------------------------------------- + OUString CopyTableWizard::impl_getServerSideCopyStatement_throw(const Reference< XPropertySet >& _xTable) { const Reference<XColumnsSupplier> xDestColsSup(_xTable,UNO_QUERY_THROW); @@ -1512,7 +1472,7 @@ OUString CopyTableWizard::impl_getServerSideCopyStatement_throw(const Reference< return sSql; } -//------------------------------------------------------------------------- + void SAL_CALL CopyTableWizard::initialize( const Sequence< Any >& _rArguments ) throw (Exception, RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); @@ -1565,13 +1525,11 @@ void SAL_CALL CopyTableWizard::initialize( const Sequence< Any >& _rArguments ) } } -//------------------------------------------------------------------------- ::cppu::IPropertyArrayHelper& CopyTableWizard::getInfoHelper() { return *getArrayHelper(); } -//------------------------------------------------------------------------------ ::cppu::IPropertyArrayHelper* CopyTableWizard::createArrayHelper( ) const { Sequence< Property > aProps; @@ -1579,7 +1537,6 @@ void SAL_CALL CopyTableWizard::initialize( const Sequence< Any >& _rArguments ) return new ::cppu::OPropertyArrayHelper( aProps ); } -//------------------------------------------------------------------------------ Dialog* CopyTableWizard::createDialog( Window* _pParent ) { OSL_PRECOND( isInitialized(), "CopyTableWizard::createDialog: not initialized!" ); @@ -1601,7 +1558,6 @@ Dialog* CopyTableWizard::createDialog( Window* _pParent ) return pWizard; } -//------------------------------------------------------------------------------ void CopyTableWizard::executedDialog( sal_Int16 _nExecutionResult ) { CopyTableWizard_DialogBase::executedDialog( _nExecutionResult ); @@ -1614,9 +1570,7 @@ void CopyTableWizard::executedDialog( sal_Int16 _nExecutionResult ) impl_dialogToAttributes_nothrow( impl_getDialog_throw() ); } -//........................................................................ } // namespace dbaui -//........................................................................ extern "C" void SAL_CALL createRegistryInfo_CopyTableWizard() { diff --git a/dbaccess/source/ui/uno/dbinteraction.cxx b/dbaccess/source/ui/uno/dbinteraction.cxx index 1b2268ce6fc1..31d84a779cb7 100644 --- a/dbaccess/source/ui/uno/dbinteraction.cxx +++ b/dbaccess/source/ui/uno/dbinteraction.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbinteraction.hxx" #include "dbu_reghelper.hxx" #include <tools/diagnose_ex.h> @@ -41,19 +40,14 @@ #include "UITools.hxx" #include <comphelper/processfactory.hxx> - -//========================================================================== - extern "C" void SAL_CALL createRegistryInfo_OInteractionHandler() { static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::SQLExceptionInteractionHandler > aSQLExceptionInteractionHandler_AutoRegistration; static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::LegacyInteractionHandler > aLegacyInteractionHandler_AutoRegistration; } -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::sdb; @@ -62,10 +56,7 @@ namespace dbaui using namespace ::com::sun::star::beans; using namespace ::dbtools; - //========================================================================= - //= BasicInteractionHandler - //========================================================================= - //------------------------------------------------------------------------- + // BasicInteractionHandler BasicInteractionHandler::BasicInteractionHandler( const Reference< XComponentContext >& rxContext, const bool i_bFallbackToGeneric ) :m_xContext( rxContext ) ,m_bFallbackToGeneric( i_bFallbackToGeneric ) @@ -74,19 +65,16 @@ namespace dbaui "BasicInteractionHandler::BasicInteractionHandler: enabling legacy behavior, there should be no clients of this anymore!" ); } - //------------------------------------------------------------------------- ::sal_Bool SAL_CALL BasicInteractionHandler::handleInteractionRequest( const Reference< XInteractionRequest >& i_rRequest ) throw (RuntimeException) { return impl_handle_throw( i_rRequest ); } - //------------------------------------------------------------------------- void SAL_CALL BasicInteractionHandler::handle( const Reference< XInteractionRequest >& i_rRequest ) throw(RuntimeException) { impl_handle_throw( i_rRequest ); } - //------------------------------------------------------------------------- sal_Bool BasicInteractionHandler::impl_handle_throw( const Reference< XInteractionRequest >& i_Request ) { Any aRequest( i_Request->getRequest() ); @@ -125,7 +113,6 @@ namespace dbaui return sal_False; } - //------------------------------------------------------------------------- void BasicInteractionHandler::implHandle(const ParametersRequest& _rParamRequest, const Sequence< Reference< XInteractionContinuation > >& _rContinuations) { SolarMutexGuard aGuard; @@ -164,7 +151,6 @@ namespace dbaui } } - //------------------------------------------------------------------------- void BasicInteractionHandler::implHandle(const SQLExceptionInfo& _rSqlInfo, const Sequence< Reference< XInteractionContinuation > >& _rContinuations) { SolarMutexGuard aGuard; @@ -238,7 +224,6 @@ namespace dbaui DBG_UNHANDLED_EXCEPTION(); } } - //------------------------------------------------------------------------- void BasicInteractionHandler::implHandle(const DocumentSaveRequest& _rDocuRequest, const Sequence< Reference< XInteractionContinuation > >& _rContinuations) { SolarMutexGuard aGuard; @@ -301,7 +286,6 @@ namespace dbaui _rContinuations[nDisApprovePos]->select(); } - //------------------------------------------------------------------------- bool BasicInteractionHandler::implHandleUnknown( const Reference< XInteractionRequest >& _rxRequest ) { if ( m_xContext.is() ) @@ -314,7 +298,6 @@ namespace dbaui return false; } - //------------------------------------------------------------------------- sal_Int32 BasicInteractionHandler::getContinuation(Continuation _eCont, const Sequence< Reference< XInteractionContinuation > >& _rContinuations) { const Reference< XInteractionContinuation >* pContinuations = _rContinuations.getConstArray(); @@ -352,9 +335,7 @@ namespace dbaui return -1; } - //========================================================================== - //= SQLExceptionInteractionHandler - //========================================================================== + // SQLExceptionInteractionHandler IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(SQLExceptionInteractionHandler, "com.sun.star.comp.dbaccess.DatabaseInteractionHandler") IMPLEMENT_SERVICE_INFO_SUPPORTS(SQLExceptionInteractionHandler) IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(SQLExceptionInteractionHandler, "com.sun.star.sdb.DatabaseInteractionHandler") @@ -365,22 +346,17 @@ namespace dbaui return static_cast< XServiceInfo* >(new SQLExceptionInteractionHandler(comphelper::getComponentContext(_rxORB))); } - //========================================================================== - //= LegacyInteractionHandler - //========================================================================== + // LegacyInteractionHandler IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(LegacyInteractionHandler, "com.sun.star.comp.dbaccess.LegacyInteractionHandler") IMPLEMENT_SERVICE_INFO_SUPPORTS(LegacyInteractionHandler) IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(LegacyInteractionHandler, "com.sun.star.sdb.LegacyInteractionHandler") - Reference< XInterface > SAL_CALL LegacyInteractionHandler::Create(const Reference< XMultiServiceFactory >& _rxORB) { return static_cast< XServiceInfo* >(new LegacyInteractionHandler(comphelper::getComponentContext(_rxORB))); } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/dbinteraction.hxx b/dbaccess/source/ui/uno/dbinteraction.hxx index 32018f7b8bab..0a6ffd88cd25 100644 --- a/dbaccess/source/ui/uno/dbinteraction.hxx +++ b/dbaccess/source/ui/uno/dbinteraction.hxx @@ -37,14 +37,10 @@ namespace dbtools class SQLExceptionInfo; } -//......................................................................... namespace dbaui { -//......................................................................... - //========================================================================= - //= BasicInteractionHandler - //========================================================================= + // BasicInteractionHandler typedef ::cppu::WeakImplHelper2 < ::com::sun::star::lang::XServiceInfo , ::com::sun::star::task::XInteractionHandler2 > BasicInteractionHandler_Base; @@ -124,9 +120,7 @@ namespace dbaui const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > >& _rContinuations); }; - //========================================================================= - //= SQLExceptionInteractionHandler - //========================================================================= + // SQLExceptionInteractionHandler class SQLExceptionInteractionHandler : public BasicInteractionHandler { public: @@ -141,9 +135,7 @@ namespace dbaui DECLARE_SERVICE_INFO_STATIC(); }; - //========================================================================= - //= SQLExceptionInteractionHandler - //========================================================================= + // SQLExceptionInteractionHandler /** an implementation for the legacy css.sdb.InteractionHandler css.sdb.InteractionHandler is deprecated, as it does not only handle database related interactions, @@ -171,9 +163,7 @@ namespace dbaui DECLARE_SERVICE_INFO_STATIC(); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // _DBAUI_INTERACTION_HXX_ diff --git a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx index bf062f4b2927..e97bc16d80b4 100644 --- a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx +++ b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "textconnectionsettings.hxx" #include "dbu_reghelper.hxx" #include "moduledbu.hxx" @@ -34,10 +33,8 @@ #include <svtools/genericunodialog.hxx> #include <cppuhelper/implbase1.hxx> -//........................................................................ namespace dbaui { -//........................................................................ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::XInterface; @@ -55,9 +52,7 @@ namespace dbaui namespace PropertyAttribute = ::com::sun::star::beans::PropertyAttribute; - //==================================================================== - //= OTextConnectionSettingsDialog - //==================================================================== + // OTextConnectionSettingsDialog class OTextConnectionSettingsDialog; typedef ::cppu::ImplInheritanceHelper1 < ODatabaseAdministrationDialog @@ -112,25 +107,19 @@ namespace dbaui using OTextConnectionSettingsDialog_BASE::getFastPropertyValue; }; - //==================================================================== - //= OTextConnectionSettingsDialog - //==================================================================== - //-------------------------------------------------------------------- + // OTextConnectionSettingsDialog OTextConnectionSettingsDialog::OTextConnectionSettingsDialog( const Reference<XComponentContext>& _rContext ) :OTextConnectionSettingsDialog_BASE( _rContext ) { TextConnectionSettingsDialog::bindItemStorages( *m_pDatasourceItems, m_aPropertyValues ); } - //--------------------------------------------------------------------- OTextConnectionSettingsDialog::~OTextConnectionSettingsDialog() { } - //--------------------------------------------------------------------- IMPLEMENT_IMPLEMENTATION_ID( OTextConnectionSettingsDialog ) - //--------------------------------------------------------------------- IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(OTextConnectionSettingsDialog, "com.sun.star.comp.dbaccess.OTextConnectionSettingsDialog") IMPLEMENT_SERVICE_INFO_SUPPORTS(OTextConnectionSettingsDialog) IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(OTextConnectionSettingsDialog, "com.sun.star.sdb.TextConnectionSettings") @@ -141,19 +130,16 @@ namespace dbaui return static_cast< XServiceInfo* >(new OTextConnectionSettingsDialog( comphelper::getComponentContext(_rxORB))); } - //--------------------------------------------------------------------- Reference< XPropertySetInfo > SAL_CALL OTextConnectionSettingsDialog::getPropertySetInfo() throw(RuntimeException) { return createPropertySetInfo( getInfoHelper() ); } - //--------------------------------------------------------------------- ::cppu::IPropertyArrayHelper& OTextConnectionSettingsDialog::getInfoHelper() { return *getArrayHelper(); } - //--------------------------------------------------------------------- ::cppu::IPropertyArrayHelper* OTextConnectionSettingsDialog::createArrayHelper( ) const { Sequence< Property > aProps; @@ -210,19 +196,16 @@ namespace dbaui return new ::cppu::OPropertyArrayHelper( aProps ); } - //--------------------------------------------------------------------- Dialog* OTextConnectionSettingsDialog::createDialog(Window* _pParent) { return new TextConnectionSettingsDialog( _pParent, *m_pDatasourceItems ); } - //--------------------------------------------------------------------- void OTextConnectionSettingsDialog::implInitialize(const Any& _rValue) { OTextConnectionSettingsDialog_BASE::implInitialize( _rValue ); } - //-------------------------------------------------------------------- void SAL_CALL OTextConnectionSettingsDialog::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) throw(Exception) { PropertyValues::const_iterator pos = m_aPropertyValues.find( _nHandle ); @@ -236,7 +219,6 @@ namespace dbaui } } - //-------------------------------------------------------------------- sal_Bool SAL_CALL OTextConnectionSettingsDialog::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue) throw(IllegalArgumentException) { sal_Bool bModified = sal_False; @@ -257,7 +239,6 @@ namespace dbaui return bModified; } - //-------------------------------------------------------------------- void SAL_CALL OTextConnectionSettingsDialog::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const { PropertyValues::const_iterator pos = m_aPropertyValues.find( _nHandle ); @@ -271,9 +252,7 @@ namespace dbaui } } -//........................................................................ } // namespace dbaui -//........................................................................ extern "C" void SAL_CALL createRegistryInfo_OTextConnectionSettingsDialog() { diff --git a/dbaccess/source/ui/uno/unoDirectSql.cxx b/dbaccess/source/ui/uno/unoDirectSql.cxx index c3e942607af3..47c92fd2ee49 100644 --- a/dbaccess/source/ui/uno/unoDirectSql.cxx +++ b/dbaccess/source/ui/uno/unoDirectSql.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "unoDirectSql.hxx" #include "dbu_reghelper.hxx" #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> @@ -30,16 +29,13 @@ #include <tools/diagnose_ex.h> #include <comphelper/processfactory.hxx> - extern "C" void SAL_CALL createRegistryInfo_ODirectSQLDialog() { static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::ODirectSQLDialog > aAutoRegistration; } -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -49,11 +45,8 @@ namespace dbaui using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdb; - //===================================================================== - //= ODirectSQLDialog - //===================================================================== + // ODirectSQLDialog DBG_NAME(ODirectSQLDialog) -//--------------------------------------------------------------------- ODirectSQLDialog::ODirectSQLDialog(const Reference< XComponentContext >& _rxORB) :ODirectSQLDialog_BASE( _rxORB ) { @@ -61,17 +54,14 @@ DBG_NAME(ODirectSQLDialog) } - //--------------------------------------------------------------------- ODirectSQLDialog::~ODirectSQLDialog() { DBG_DTOR(ODirectSQLDialog,NULL); } - //--------------------------------------------------------------------- IMPLEMENT_IMPLEMENTATION_ID( ODirectSQLDialog ) - //--------------------------------------------------------------------- IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(ODirectSQLDialog, "com.sun.star.comp.sdb.DirectSQLDialog") IMPLEMENT_SERVICE_INFO_SUPPORTS(ODirectSQLDialog) IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(ODirectSQLDialog, SERVICE_SDB_DIRECTSQLDIALOG) @@ -82,10 +72,8 @@ DBG_NAME(ODirectSQLDialog) return static_cast< XServiceInfo* >(new ODirectSQLDialog( comphelper::getComponentContext(_rxORB))); } - //--------------------------------------------------------------------- IMPLEMENT_PROPERTYCONTAINER_DEFAULTS( ODirectSQLDialog ) - //--------------------------------------------------------------------- Dialog* ODirectSQLDialog::createDialog(Window* _pParent) { // obtain all the objects needed for the dialog @@ -109,7 +97,6 @@ DBG_NAME(ODirectSQLDialog) return new DirectSQLDialog( _pParent, xConnection); } - //--------------------------------------------------------------------- void ODirectSQLDialog::implInitialize(const Any& _rValue) { PropertyValue aProperty; @@ -129,8 +116,6 @@ DBG_NAME(ODirectSQLDialog) } ODirectSQLDialog_BASE::implInitialize(_rValue); } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/unoDirectSql.hxx b/dbaccess/source/ui/uno/unoDirectSql.hxx index b57a498e35c1..b9fce9f9aeb8 100644 --- a/dbaccess/source/ui/uno/unoDirectSql.hxx +++ b/dbaccess/source/ui/uno/unoDirectSql.hxx @@ -28,14 +28,10 @@ #include "moduledbu.hxx" #include <com/sun/star/sdbc/XConnection.hpp> -//......................................................................... namespace dbaui { -//......................................................................... - //===================================================================== - //= ODirectSQLDialog - //===================================================================== + // ODirectSQLDialog class ODirectSQLDialog; typedef ::svt::OGenericUnoDialog ODirectSQLDialog_BASE; typedef ::comphelper::OPropertyArrayUsageHelper< ODirectSQLDialog > ODirectSQLDialog_PBASE; @@ -64,9 +60,7 @@ namespace dbaui virtual void implInitialize(const com::sun::star::uno::Any& _rValue); }; -//......................................................................... } // namespace dbaui -//......................................................................... #endif // DBAUI_UNODIRECTSQL_HXX diff --git a/dbaccess/source/ui/uno/unoadmin.cxx b/dbaccess/source/ui/uno/unoadmin.cxx index 115b7c88cef0..53f4f17f6bae 100644 --- a/dbaccess/source/ui/uno/unoadmin.cxx +++ b/dbaccess/source/ui/uno/unoadmin.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbustrings.hrc" #include <toolkit/awt/vclxwindow.hxx> #include "dbu_reghelper.hxx" @@ -37,18 +36,14 @@ #include <vcl/svapp.hxx> // --- -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; -//========================================================================= DBG_NAME(ODatabaseAdministrationDialog) -//------------------------------------------------------------------------- ODatabaseAdministrationDialog::ODatabaseAdministrationDialog(const Reference< XComponentContext >& _rxORB) :ODatabaseAdministrationDialogBase(_rxORB) ,m_pDatasourceItems(NULL) @@ -62,7 +57,6 @@ ODatabaseAdministrationDialog::ODatabaseAdministrationDialog(const Reference< XC ODbAdminDialog::createItemSet(m_pDatasourceItems, m_pItemPool, m_pItemPoolDefaults, m_pCollection); } -//------------------------------------------------------------------------- ODatabaseAdministrationDialog::~ODatabaseAdministrationDialog() { // we do this here cause the base class' call to destroyDialog won't reach us anymore : we're within an dtor, @@ -79,13 +73,13 @@ ODatabaseAdministrationDialog::~ODatabaseAdministrationDialog() DBG_DTOR(ODatabaseAdministrationDialog,NULL); } -//------------------------------------------------------------------------- + void ODatabaseAdministrationDialog::destroyDialog() { ODatabaseAdministrationDialogBase::destroyDialog(); ODbAdminDialog::destroyItemSet(m_pDatasourceItems, m_pItemPool, m_pItemPoolDefaults); } -//------------------------------------------------------------------------------ + void ODatabaseAdministrationDialog::implInitialize(const Any& _rValue) { PropertyValue aProperty; @@ -106,8 +100,6 @@ void ODatabaseAdministrationDialog::implInitialize(const Any& _rValue) ODatabaseAdministrationDialogBase::implInitialize(_rValue); } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/uno/unosqlmessage.cxx b/dbaccess/source/ui/uno/unosqlmessage.cxx index 94ceda731275..1ac8838fc52e 100644 --- a/dbaccess/source/ui/uno/unosqlmessage.cxx +++ b/dbaccess/source/ui/uno/unosqlmessage.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "sqlmessage.hxx" #include "unosqlmessage.hxx" #include "dbu_reghelper.hxx" @@ -37,17 +36,13 @@ extern "C" void SAL_CALL createRegistryInfo_OSQLMessageDialog() static OMultiInstanceAutoRegistration< OSQLMessageDialog > aAutoRegistration; } -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; -//========================================================================= -//------------------------------------------------------------------------- OSQLMessageDialog::OSQLMessageDialog(const Reference< XComponentContext >& _rxORB) :OSQLMessageDialogBase(_rxORB) { @@ -57,38 +52,32 @@ OSQLMessageDialog::OSQLMessageDialog(const Reference< XComponentContext >& _rxOR &m_sHelpURL, ::getCppuType( &m_sHelpURL ) ); } -//------------------------------------------------------------------------- Sequence<sal_Int8> SAL_CALL OSQLMessageDialog::getImplementationId( ) throw(RuntimeException) { static ::cppu::OImplementationId aId; return aId.getImplementationId(); } -//------------------------------------------------------------------------- Reference< XInterface > SAL_CALL OSQLMessageDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory) { return *(new OSQLMessageDialog( comphelper::getComponentContext(_rxFactory) )); } -//------------------------------------------------------------------------- OUString SAL_CALL OSQLMessageDialog::getImplementationName() throw(RuntimeException) { return getImplementationName_Static(); } -//------------------------------------------------------------------------- OUString OSQLMessageDialog::getImplementationName_Static() throw(RuntimeException) { return OUString("org.openoffice.comp.dbu.OSQLMessageDialog"); } -//------------------------------------------------------------------------- ::comphelper::StringSequence SAL_CALL OSQLMessageDialog::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); } -//------------------------------------------------------------------------- ::comphelper::StringSequence OSQLMessageDialog::getSupportedServiceNames_Static() throw(RuntimeException) { ::comphelper::StringSequence aSupported(1); @@ -96,7 +85,6 @@ OUString OSQLMessageDialog::getImplementationName_Static() throw(RuntimeExceptio return aSupported; } -//------------------------------------------------------------------------- void OSQLMessageDialog::initialize(Sequence<Any> const & args) throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException) { OUString title; @@ -114,7 +102,6 @@ void OSQLMessageDialog::initialize(Sequence<Any> const & args) throw (com::sun:: } } -//------------------------------------------------------------------------- sal_Bool SAL_CALL OSQLMessageDialog::convertFastPropertyValue( Any& _rConvertedValue, Any& _rOldValue, sal_Int32 _nHandle, const Any& _rValue) throw(IllegalArgumentException) { switch (_nHandle) @@ -136,20 +123,17 @@ sal_Bool SAL_CALL OSQLMessageDialog::convertFastPropertyValue( Any& _rConvertedV } } -//------------------------------------------------------------------------- Reference<XPropertySetInfo> SAL_CALL OSQLMessageDialog::getPropertySetInfo() throw(RuntimeException) { Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) ); return xInfo; } -//------------------------------------------------------------------------- ::cppu::IPropertyArrayHelper& OSQLMessageDialog::getInfoHelper() { return *const_cast<OSQLMessageDialog*>(this)->getArrayHelper(); } -//------------------------------------------------------------------------------ ::cppu::IPropertyArrayHelper* OSQLMessageDialog::createArrayHelper( ) const { Sequence< Property > aProps; @@ -157,7 +141,6 @@ Reference<XPropertySetInfo> SAL_CALL OSQLMessageDialog::getPropertySetInfo() th return new ::cppu::OPropertyArrayHelper(aProps); } -//------------------------------------------------------------------------------ Dialog* OSQLMessageDialog::createDialog(Window* _pParent) { if ( m_aException.hasValue() ) @@ -167,8 +150,6 @@ Dialog* OSQLMessageDialog::createDialog(Window* _pParent) return new OSQLMessageBox(_pParent, SQLException()); } -//......................................................................... } // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |