summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2010-10-13 14:37:08 +0200
committerJan Holesovsky <kendy@suse.cz>2010-10-13 14:37:08 +0200
commitb453af9c9bad2c671770a1bab2ffd4bd26ad7cd7 (patch)
tree9d910449079ed841acf02e28a9d4ec93890da95b
parent97531e546835b6a306f67b26a4f5b2cd5ec076d8 (diff)
parent7a21b3f79d63f840781eb043fd046f26a25a61d8 (diff)
Merge branch 'master' of ssh://git.freedesktop.org/git/libreoffice/base
-rw-r--r--dbaccess/source/core/api/BookmarkSet.cxx33
-rw-r--r--dbaccess/source/core/api/BookmarkSet.hxx2
-rw-r--r--dbaccess/source/core/api/CIndexColumn.hxx2
-rw-r--r--dbaccess/source/core/api/CIndexes.cxx15
-rw-r--r--dbaccess/source/core/api/CIndexes.hxx2
-rw-r--r--dbaccess/source/core/api/CRowSetColumn.cxx13
-rw-r--r--dbaccess/source/core/api/CRowSetColumn.hxx4
-rw-r--r--dbaccess/source/core/api/CRowSetDataColumn.cxx34
-rw-r--r--dbaccess/source/core/api/CRowSetDataColumn.hxx8
-rw-r--r--dbaccess/source/core/api/CacheSet.cxx151
-rw-r--r--dbaccess/source/core/api/CacheSet.hxx6
-rw-r--r--dbaccess/source/core/api/FilteredContainer.cxx30
-rw-r--r--dbaccess/source/core/api/HelperCollections.cxx11
-rw-r--r--dbaccess/source/core/api/HelperCollections.hxx4
-rw-r--r--dbaccess/source/core/api/KeySet.cxx156
-rw-r--r--dbaccess/source/core/api/KeySet.hxx27
-rw-r--r--dbaccess/source/core/api/OptimisticSet.cxx72
-rw-r--r--dbaccess/source/core/api/OptimisticSet.hxx17
-rw-r--r--dbaccess/source/core/api/PrivateRow.cxx2
-rw-r--r--dbaccess/source/core/api/PrivateRow.hxx2
-rw-r--r--dbaccess/source/core/api/RowSet.cxx314
-rw-r--r--dbaccess/source/core/api/RowSet.hxx2
-rw-r--r--dbaccess/source/core/api/RowSetBase.cxx194
-rw-r--r--dbaccess/source/core/api/RowSetBase.hxx11
-rw-r--r--dbaccess/source/core/api/RowSetCache.cxx115
-rw-r--r--dbaccess/source/core/api/RowSetCache.hxx2
-rw-r--r--dbaccess/source/core/api/RowSetCacheIterator.cxx32
-rw-r--r--dbaccess/source/core/api/RowSetCacheIterator.hxx10
-rw-r--r--dbaccess/source/core/api/RowSetRow.hxx9
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx136
-rw-r--r--dbaccess/source/core/api/StaticSet.cxx75
-rw-r--r--dbaccess/source/core/api/StaticSet.hxx3
-rw-r--r--dbaccess/source/core/api/TableDeco.cxx185
-rw-r--r--dbaccess/source/core/api/View.cxx22
-rw-r--r--dbaccess/source/core/api/WrappedResultSet.cxx33
-rw-r--r--dbaccess/source/core/api/WrappedResultSet.hxx2
-rw-r--r--dbaccess/source/core/api/callablestatement.cxx32
-rw-r--r--dbaccess/source/core/api/column.cxx48
-rw-r--r--dbaccess/source/core/api/columnsettings.cxx9
-rw-r--r--dbaccess/source/core/api/datacolumn.cxx57
-rw-r--r--dbaccess/source/core/api/datacolumn.hxx2
-rw-r--r--dbaccess/source/core/api/datasettings.cxx15
-rw-r--r--dbaccess/source/core/api/definitioncolumn.cxx54
-rw-r--r--dbaccess/source/core/api/makefile.mk2
-rw-r--r--dbaccess/source/core/api/preparedstatement.cxx43
-rw-r--r--dbaccess/source/core/api/query.cxx33
-rw-r--r--dbaccess/source/core/api/query.hxx4
-rw-r--r--dbaccess/source/core/api/querycomposer.cxx59
-rw-r--r--dbaccess/source/core/api/querycontainer.cxx46
-rw-r--r--dbaccess/source/core/api/querydescriptor.cxx54
-rw-r--r--dbaccess/source/core/api/querydescriptor.hxx2
-rw-r--r--dbaccess/source/core/api/resultcolumn.cxx20
-rw-r--r--dbaccess/source/core/api/resultcolumn.hxx2
-rw-r--r--dbaccess/source/core/api/resultset.cxx133
-rw-r--r--dbaccess/source/core/api/resultset.hxx2
-rw-r--r--dbaccess/source/core/api/statement.cxx49
-rw-r--r--dbaccess/source/core/api/table.cxx72
-rw-r--r--dbaccess/source/core/api/tablecontainer.cxx50
-rw-r--r--dbaccess/source/core/api/viewcontainer.cxx30
-rw-r--r--dbaccess/source/core/dataaccess/ComponentDefinition.cxx57
-rw-r--r--dbaccess/source/core/dataaccess/ComponentDefinition.hxx8
-rw-r--r--dbaccess/source/core/dataaccess/ContentHelper.cxx100
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx100
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.hxx6
-rw-r--r--dbaccess/source/core/dataaccess/SharedConnection.cxx58
-rw-r--r--dbaccess/source/core/dataaccess/SharedConnection.hxx21
-rw-r--r--dbaccess/source/core/dataaccess/bookmarkcontainer.cxx35
-rw-r--r--dbaccess/source/core/dataaccess/bookmarkcontainer.hxx10
-rw-r--r--dbaccess/source/core/dataaccess/commandcontainer.cxx20
-rw-r--r--dbaccess/source/core/dataaccess/commandcontainer.hxx9
-rw-r--r--dbaccess/source/core/dataaccess/commanddefinition.cxx26
-rw-r--r--dbaccess/source/core/dataaccess/commanddefinition.hxx5
-rw-r--r--dbaccess/source/core/dataaccess/connection.cxx82
-rw-r--r--dbaccess/source/core/dataaccess/connection.hxx4
-rw-r--r--dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx25
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx70
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.hxx3
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx153
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.hxx9
-rw-r--r--dbaccess/source/core/dataaccess/databaseregistrations.cxx37
-rw-r--r--dbaccess/source/core/dataaccess/databaseregistrations.hxx6
-rw-r--r--dbaccess/source/core/dataaccess/datasource.cxx100
-rw-r--r--dbaccess/source/core/dataaccess/datasource.hxx6
-rw-r--r--dbaccess/source/core/dataaccess/definitioncontainer.cxx54
-rw-r--r--dbaccess/source/core/dataaccess/documentcontainer.cxx75
-rw-r--r--dbaccess/source/core/dataaccess/documentcontainer.hxx7
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx113
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.hxx7
-rw-r--r--dbaccess/source/core/dataaccess/documenteventexecutor.cxx16
-rw-r--r--dbaccess/source/core/dataaccess/documenteventexecutor.hxx6
-rw-r--r--dbaccess/source/core/dataaccess/documenteventnotifier.cxx24
-rw-r--r--dbaccess/source/core/dataaccess/documenteventnotifier.hxx6
-rw-r--r--dbaccess/source/core/dataaccess/documentevents.cxx30
-rw-r--r--dbaccess/source/core/dataaccess/documentevents.hxx6
-rw-r--r--dbaccess/source/core/dataaccess/intercept.cxx15
-rw-r--r--dbaccess/source/core/dataaccess/intercept.hxx86
-rw-r--r--dbaccess/source/core/dataaccess/makefile.mk2
-rw-r--r--dbaccess/source/core/dataaccess/myucp_datasupplier.cxx37
-rw-r--r--dbaccess/source/core/dataaccess/myucp_datasupplier.hxx2
-rw-r--r--dbaccess/source/core/dataaccess/myucp_resultset.cxx7
-rw-r--r--dbaccess/source/core/dataaccess/myucp_resultset.hxx2
-rw-r--r--dbaccess/source/core/inc/ContainerListener.hxx11
-rw-r--r--dbaccess/source/core/inc/ContainerMediator.hxx9
-rw-r--r--dbaccess/source/core/inc/ContentHelper.hxx9
-rw-r--r--dbaccess/source/core/inc/DatabaseDataProvider.hxx4
-rw-r--r--dbaccess/source/core/inc/FilteredContainer.hxx4
-rw-r--r--dbaccess/source/core/inc/PropertyForward.hxx8
-rw-r--r--dbaccess/source/core/inc/RefreshListener.hxx8
-rw-r--r--dbaccess/source/core/inc/SingleSelectQueryComposer.hxx2
-rw-r--r--dbaccess/source/core/inc/TableDeco.hxx8
-rw-r--r--dbaccess/source/core/inc/View.hxx6
-rw-r--r--dbaccess/source/core/inc/callablestatement.hxx2
-rw-r--r--dbaccess/source/core/inc/column.hxx8
-rw-r--r--dbaccess/source/core/inc/columnsettings.hxx22
-rw-r--r--dbaccess/source/core/inc/commandbase.hxx10
-rw-r--r--dbaccess/source/core/inc/composertools.hxx7
-rw-r--r--dbaccess/source/core/inc/containerapprove.hxx7
-rw-r--r--dbaccess/source/core/inc/core_resource.hrc5
-rw-r--r--dbaccess/source/core/inc/core_resource.hxx13
-rw-r--r--dbaccess/source/core/inc/datasettings.hxx7
-rw-r--r--dbaccess/source/core/inc/dbamiscres.hrc10
-rw-r--r--dbaccess/source/core/inc/definitioncolumn.hxx2
-rw-r--r--dbaccess/source/core/inc/definitioncontainer.hxx8
-rw-r--r--dbaccess/source/core/inc/module_dba.hxx7
-rw-r--r--dbaccess/source/core/inc/object.hxx2
-rw-r--r--dbaccess/source/core/inc/objectnameapproval.hxx8
-rw-r--r--dbaccess/source/core/inc/preparedstatement.hxx2
-rw-r--r--dbaccess/source/core/inc/querycomposer.hxx2
-rw-r--r--dbaccess/source/core/inc/querycontainer.hxx13
-rw-r--r--dbaccess/source/core/inc/recovery/dbdocrecovery.hxx6
-rw-r--r--dbaccess/source/core/inc/sdbcoretools.hxx11
-rw-r--r--dbaccess/source/core/inc/statement.hxx4
-rw-r--r--dbaccess/source/core/inc/table.hxx2
-rw-r--r--dbaccess/source/core/inc/tablecontainer.hxx6
-rw-r--r--dbaccess/source/core/inc/userinformation.hxx2
-rw-r--r--dbaccess/source/core/inc/veto.hxx7
-rw-r--r--dbaccess/source/core/inc/viewcontainer.hxx4
137 files changed, 1392 insertions, 2853 deletions
diff --git a/dbaccess/source/core/api/BookmarkSet.cxx b/dbaccess/source/core/api/BookmarkSet.cxx
index 864bcd5dd..412c2d7bd 100644
--- a/dbaccess/source/core/api/BookmarkSet.cxx
+++ b/dbaccess/source/core/api/BookmarkSet.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,43 +56,43 @@ void OBookmarkSet::construct(const Reference< XResultSet>& _xDriverSet,const ::r
OCacheSet::construct(_xDriverSet,i_sRowSetFilter);
m_xRowLocate.set(_xDriverSet,UNO_QUERY);
}
-// -----------------------------------------------------------------------------
+
Any SAL_CALL OBookmarkSet::getBookmark() throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::getBookmark" );
return m_xRowLocate->getBookmark();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OBookmarkSet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::moveToBookmark" );
return m_xRowLocate->moveToBookmark(bookmark);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OBookmarkSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::moveRelativeToBookmark" );
return m_xRowLocate->moveRelativeToBookmark(bookmark,rows);
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OBookmarkSet::compareBookmarks( const Any& _first, const Any& _second ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::compareBookmarks" );
return m_xRowLocate->compareBookmarks(_first,_second);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OBookmarkSet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::hasOrderedBookmarks" );
return m_xRowLocate->hasOrderedBookmarks();
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OBookmarkSet::hashBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::hashBookmark" );
return m_xRowLocate->hashBookmark(bookmark);
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::sdbcx::XDeleteRows
Sequence< sal_Int32 > SAL_CALL OBookmarkSet::deleteRows( const Sequence< Any >& rows ,const connectivity::OSQLTable& /*_xTable*/) throw(SQLException, RuntimeException)
{
@@ -104,7 +104,7 @@ Sequence< sal_Int32 > SAL_CALL OBookmarkSet::deleteRows( const Sequence< Any >&
}
return Sequence< sal_Int32 >();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OBookmarkSet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::insertRow" );
@@ -129,7 +129,7 @@ void SAL_CALL OBookmarkSet::insertRow( const ORowSetRow& _rInsertRow,const conne
else
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XRESULTSETUPDATE ), SQL_GENERAL_ERROR, *this );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OBookmarkSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::updateRow" );
@@ -154,7 +154,7 @@ void SAL_CALL OBookmarkSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowS
else
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_XRESULTSETUPDATE ), SQL_GENERAL_ERROR, *this );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OBookmarkSet::deleteRow(const ORowSetRow& /*_rDeleteRow*/ ,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::deleteRow" );
@@ -162,12 +162,12 @@ void SAL_CALL OBookmarkSet::deleteRow(const ORowSetRow& /*_rDeleteRow*/ ,const c
xUpd->deleteRow();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OBookmarkSet::cancelRowUpdates( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::cancelRowUpdates" );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OBookmarkSet::moveToInsertRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::moveToInsertRow" );
@@ -175,18 +175,18 @@ void SAL_CALL OBookmarkSet::moveToInsertRow( ) throw(SQLException, RuntimeExcep
if(xUpd.is())
xUpd->moveToInsertRow();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OBookmarkSet::moveToCurrentRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::moveToCurrentRow" );
}
-// -------------------------------------------------------------------------
+
void OBookmarkSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::fillValueRow" );
OCacheSet::fillValueRow(_rRow,_nPosition);
}
-// -------------------------------------------------------------------------
+
void OBookmarkSet::updateColumn(sal_Int32 nPos,Reference< XRowUpdate > _xParameter,const ORowSetValue& _rValue)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OBookmarkSet::updateColumn" );
@@ -266,5 +266,4 @@ void OBookmarkSet::updateColumn(sal_Int32 nPos,Reference< XRowUpdate > _xParamet
}
}
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/BookmarkSet.hxx b/dbaccess/source/core/api/BookmarkSet.hxx
index faa806263..b3e21a473 100644
--- a/dbaccess/source/core/api/BookmarkSet.hxx
+++ b/dbaccess/source/core/api/BookmarkSet.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/api/CIndexColumn.hxx b/dbaccess/source/core/api/CIndexColumn.hxx
index 80bc09dc8..3d71ee1fb 100644
--- a/dbaccess/source/core/api/CIndexColumn.hxx
+++ b/dbaccess/source/core/api/CIndexColumn.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/api/CIndexes.cxx b/dbaccess/source/core/api/CIndexes.cxx
index 896b5632a..8ea223cff 100644
--- a/dbaccess/source/core/api/CIndexes.cxx
+++ b/dbaccess/source/core/api/CIndexes.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -60,7 +60,7 @@ ObjectType OIndexes::createObject(const ::rtl::OUString& _rName)
return xRet;
}
-// -------------------------------------------------------------------------
+
Reference< XPropertySet > OIndexes::createDescriptor()
{
Reference<XDataDescriptorFactory> xData( m_xIndexes,UNO_QUERY);
@@ -69,7 +69,7 @@ Reference< XPropertySet > OIndexes::createDescriptor()
else
return OIndexesHelper::createDescriptor();
}
-// -------------------------------------------------------------------------
+
// XAppend
ObjectType OIndexes::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
@@ -80,7 +80,7 @@ ObjectType OIndexes::appendObject( const ::rtl::OUString& _rForName, const Refer
xData->appendByDescriptor(descriptor);
return createObject( _rForName );
}
-// -------------------------------------------------------------------------
+
// XDrop
void OIndexes::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
{
@@ -93,7 +93,7 @@ void OIndexes::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
else
OIndexesHelper::dropObject(_nPos,_sElementName);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OIndexes::disposing(void)
{
if ( m_xIndexes.is() )
@@ -101,9 +101,4 @@ void SAL_CALL OIndexes::disposing(void)
else
OIndexesHelper::disposing();
}
-// -----------------------------------------------------------------------------
-
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/CIndexes.hxx b/dbaccess/source/core/api/CIndexes.hxx
index eee1d4814..33e87a02f 100644
--- a/dbaccess/source/core/api/CIndexes.hxx
+++ b/dbaccess/source/core/api/CIndexes.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/api/CRowSetColumn.cxx b/dbaccess/source/core/api/CRowSetColumn.cxx
index 66ec32161..41a5cd81c 100644
--- a/dbaccess/source/core/api/CRowSetColumn.cxx
+++ b/dbaccess/source/core/api/CRowSetColumn.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,19 +44,15 @@ using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::beans;
-//..............................................................................
namespace dbaccess
{
-//..............................................................................
-//------------------------------------------------------------------------------
ORowSetColumn::ORowSetColumn( const Reference < XResultSetMetaData >& _xMetaData, const Reference < XRow >& _xRow, sal_Int32 _nPos,
const Reference< XDatabaseMetaData >& _rxDBMeta, const ::rtl::OUString& _rDescription, const ::rtl::OUString& i_sLabel,ORowSetCacheIterator& _rColumnValue )
:ORowSetDataColumn( _xMetaData, _xRow, NULL, _nPos, _rxDBMeta, _rDescription, i_sLabel,_rColumnValue )
{
}
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* ORowSetColumn::createArrayHelper( ) const
{
const sal_Int32 nDerivedProperties = 21;
@@ -69,7 +65,7 @@ ORowSetColumn::ORowSetColumn( const Reference < XResultSetMetaData >& _xMetaData
DECL_PROP1_BOOL( ISAUTOINCREMENT, READONLY );
DECL_PROP1_BOOL( ISCASESENSITIVE, READONLY );
DECL_PROP1_BOOL( ISCURRENCY, READONLY );
- DECL_PROP1_BOOL( ISDEFINITELYWRITABLE, READONLY );
+ DECL_PROP1_BOOL( ISDEFINITELYWRITABLE, READONLY );
DECL_PROP1( ISNULLABLE, sal_Int32, READONLY );
DECL_PROP1_BOOL( ISREADONLY, BOUND );
DECL_PROP1_BOOL( ISROWVERSION, READONLY );
@@ -93,13 +89,11 @@ ORowSetColumn::ORowSetColumn( const Reference < XResultSetMetaData >& _xMetaData
return new ::cppu::OPropertyArrayHelper( ::comphelper::concatSequences( aDerivedProperties, aRegisteredProperties ), sal_False );
}
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& ORowSetColumn::getInfoHelper()
{
return *static_cast< ::comphelper::OPropertyArrayUsageHelper< ORowSetColumn >* >(this)->getArrayHelper();
}
-//------------------------------------------------------------------------------
void SAL_CALL ORowSetColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue )throw (Exception)
{
OSL_ENSURE( nHandle != PROPERTY_ID_VALUE, "ORowSetColumn::setFastPropertyValue_NoBroadcast: hmm? This property is marked as READONLY!" );
@@ -107,8 +101,5 @@ void SAL_CALL ORowSetColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,
ORowSetDataColumn::setFastPropertyValue_NoBroadcast( nHandle, rValue );
}
-//..............................................................................
} // namespace dbaccess
-//..............................................................................
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/CRowSetColumn.hxx b/dbaccess/source/core/api/CRowSetColumn.hxx
index f82d806c5..16eb830ad 100644
--- a/dbaccess/source/core/api/CRowSetColumn.hxx
+++ b/dbaccess/source/core/api/CRowSetColumn.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,7 +37,7 @@ namespace dbaccess
class ORowSetColumn;
class ORowSetColumn :public ORowSetDataColumn
,public ::comphelper::OPropertyArrayUsageHelper< ORowSetColumn >
-
+
{
public:
ORowSetColumn( const ::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XResultSetMetaData >& _xMetaData,
diff --git a/dbaccess/source/core/api/CRowSetDataColumn.cxx b/dbaccess/source/core/api/CRowSetDataColumn.cxx
index f673025ac..a698b8e11 100644
--- a/dbaccess/source/core/api/CRowSetDataColumn.cxx
+++ b/dbaccess/source/core/api/CRowSetDataColumn.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,7 +51,7 @@ using namespace cppu;
using namespace osl;
DBG_NAME(ORowSetDataColumn)
-// -------------------------------------------------------------------------
+
ORowSetDataColumn::ORowSetDataColumn( const Reference < XResultSetMetaData >& _xMetaData,
const Reference < XRow >& _xRow,
const Reference < XRowUpdate >& _xRowUpdate,
@@ -69,14 +69,13 @@ ORowSetDataColumn::ORowSetDataColumn( const Reference < XResultSetMetaData >& _x
OColumnSettings::registerProperties( *this );
registerProperty( PROPERTY_DESCRIPTION, PROPERTY_ID_DESCRIPTION, PropertyAttribute::READONLY, &m_aDescription, ::getCppuType( &m_aDescription ) );
}
-// -------------------------------------------------------------------------
+
ORowSetDataColumn::~ORowSetDataColumn()
{
DBG_DTOR(ORowSetDataColumn,NULL);
}
-// -------------------------------------------------------------------------
+
// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* ORowSetDataColumn::createArrayHelper( ) const
{
const sal_Int32 nDerivedProperties = 21;
@@ -114,12 +113,11 @@ ORowSetDataColumn::~ORowSetDataColumn()
}
// cppu::OPropertySetHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& ORowSetDataColumn::getInfoHelper()
{
return *static_cast< ::comphelper::OPropertyArrayUsageHelper< ORowSetDataColumn >* >(this)->getArrayHelper();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSetDataColumn::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
if ( PROPERTY_ID_VALUE == nHandle )
@@ -141,7 +139,6 @@ void SAL_CALL ORowSetDataColumn::getFastPropertyValue( Any& rValue, sal_Int32 nH
ODataColumn::getFastPropertyValue( rValue, nHandle );
}
-// -------------------------------------------------------------------------
void SAL_CALL ORowSetDataColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue )throw (Exception)
{
switch( nHandle )
@@ -161,7 +158,7 @@ void SAL_CALL ORowSetDataColumn::setFastPropertyValue_NoBroadcast(sal_Int32 nHan
break;
}
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetDataColumn::convertFastPropertyValue( Any & rConvertedValue,
Any & rOldValue,
sal_Int32 nHandle,
@@ -191,7 +188,7 @@ sal_Bool SAL_CALL ORowSetDataColumn::convertFastPropertyValue( Any & rConvertedV
return bModified;
}
-//--------------------------------------------------------------------------
+
Sequence< sal_Int8 > ORowSetDataColumn::getImplementationId() throw (RuntimeException)
{
static OImplementationId * pId = 0;
@@ -206,7 +203,7 @@ Sequence< sal_Int8 > ORowSetDataColumn::getImplementationId() throw (RuntimeExce
}
return pId->getImplementationId();
}
-// -------------------------------------------------------------------------
+
void ORowSetDataColumn::fireValueChange(const ORowSetValue& _rOldValue)
{
if ( !m_aColumnValue.isNull() && m_aColumnValue->isValid() && (!(((*m_aColumnValue)->get())[m_nPos] == _rOldValue)) )
@@ -226,7 +223,7 @@ void ORowSetDataColumn::fireValueChange(const ORowSetValue& _rOldValue)
fire(&nHandle, &aNew, &m_aOldValue, 1, sal_False );
}
}
-// -----------------------------------------------------------------------------
+
DBG_NAME(ORowSetDataColumns )
ORowSetDataColumns::ORowSetDataColumns(
sal_Bool _bCase,
@@ -239,12 +236,12 @@ ORowSetDataColumns::ORowSetDataColumns(
{
DBG_CTOR(ORowSetDataColumns ,NULL);
}
-// -----------------------------------------------------------------------------
+
ORowSetDataColumns::~ORowSetDataColumns()
{
DBG_DTOR(ORowSetDataColumns ,NULL);
}
-// -----------------------------------------------------------------------------
+
sdbcx::ObjectType ORowSetDataColumns::createObject(const ::rtl::OUString& _rName)
{
connectivity::sdbcx::ObjectType xNamed;
@@ -256,7 +253,7 @@ sdbcx::ObjectType ORowSetDataColumns::createObject(const ::rtl::OUString& _rName
return xNamed;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ORowSetDataColumns::disposing(void)
{
// clear_NoDispose();
@@ -264,17 +261,14 @@ void SAL_CALL ORowSetDataColumns::disposing(void)
m_aColumns = NULL;
// m_aColumns.clear();
}
-// -----------------------------------------------------------------------------
+
void ORowSetDataColumns::assign(const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,const ::std::vector< ::rtl::OUString> &_rVector)
{
m_aColumns = _rColumns;
reFill(_rVector);
}
-// -----------------------------------------------------------------------------
+
void ORowSetDataColumns::impl_refresh() throw(::com::sun::star::uno::RuntimeException)
{
}
-// -----------------------------------------------------------------------------
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/CRowSetDataColumn.hxx b/dbaccess/source/core/api/CRowSetDataColumn.hxx
index 90677d117..1d7ebb5c3 100644
--- a/dbaccess/source/core/api/CRowSetDataColumn.hxx
+++ b/dbaccess/source/core/api/CRowSetDataColumn.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -63,7 +63,7 @@ namespace dbaccess
const ::rtl::OUString& i_sLabel,
const ORowSetCacheIterator& _rColumnValue);
-
+
// com::sun::star::lang::XTypeProvider
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
// comphelper::OPropertyArrayUsageHelper
@@ -83,9 +83,6 @@ namespace dbaccess
protected:
using ODataColumn::getFastPropertyValue;
};
- // -------------------------------------------------------------------------
-// typedef connectivity::ORefVector< ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet> >
-// ORowSetDataColumns_COLLECTION;
typedef connectivity::sdbcx::OCollection ORowSetDataColumns_BASE;
class ORowSetDataColumns : public ORowSetDataColumns_BASE
@@ -110,4 +107,3 @@ namespace dbaccess
}
#endif
-
diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx
index 5b8c8c9d0..847792bcc 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -70,8 +70,8 @@ using namespace ::com::sun::star::io;
using namespace ::osl;
DBG_NAME(OCacheSet)
-// -------------------------------------------------------------------------
-OCacheSet::OCacheSet()
+
+OCacheSet::OCacheSet()
:m_bInserted(sal_False)
,m_bUpdated(sal_False)
,m_bDeleted(sal_False)
@@ -80,7 +80,7 @@ OCacheSet::OCacheSet()
DBG_CTOR(OCacheSet,NULL);
}
-// -------------------------------------------------------------------------
+
::rtl::OUString OCacheSet::getIdentifierQuoteString() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getIdentifierQuoteString" );
@@ -90,8 +90,8 @@ OCacheSet::OCacheSet()
sQuote = xMeta->getIdentifierQuoteString();
return sQuote;
}
-// -------------------------------------------------------------------------
-void OCacheSet::construct( const Reference< XResultSet>& _xDriverSet,const ::rtl::OUString& /*i_sRowSetFilter*/)
+
+void OCacheSet::construct( const Reference< XResultSet>& _xDriverSet,const ::rtl::OUString& /*i_sRowSetFilter*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::construct" );
OSL_ENSURE(_xDriverSet.is(),"Invalid resultSet");
@@ -127,15 +127,15 @@ void OCacheSet::construct( const Reference< XResultSet>& _xDriverSet,const ::rtl
}
}
}
-// -------------------------------------------------------------------------
+
OCacheSet::~OCacheSet()
{
try
{
- m_xDriverSet = NULL;
- m_xDriverRow = NULL;
+ m_xDriverSet = NULL;
+ m_xDriverRow = NULL;
m_xSetMetaData = NULL;
- m_xConnection = NULL;
+ m_xConnection = NULL;
}
catch(Exception&)
{
@@ -148,7 +148,7 @@ OCacheSet::~OCacheSet()
DBG_DTOR(OCacheSet,NULL);
}
-// -----------------------------------------------------------------------------
+
void OCacheSet::fillTableName(const Reference<XPropertySet>& _xTable) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::fillTableName" );
@@ -164,7 +164,7 @@ void OCacheSet::fillTableName(const Reference<XPropertySet>& _xTable) throw(SQL
,::dbtools::eInDataManipulation);
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OCacheSet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::insertRow" );
@@ -208,27 +208,12 @@ void SAL_CALL OCacheSet::insertRow( const ORowSetRow& _rInsertRow,const connecti
m_bInserted = xPrep->executeUpdate() > 0;
}
-
-// ::rtl::OUString aCountSql = ::rtl::OUString::createFromAscii("SELECT COUNT(*) FROM ");
-// aCountSql += m_aComposedTableName;
-// try
-// {
-// Reference< XStatement > xStmt(m_xConnection->createStatement());
-// Reference<XResultSet> xRes(xStmt->executeQuery(aCountSql));
-// if(xRes.is() && xRes->next())
-// {
-// Reference<XRow> xRow(xRes,UNO_QUERY);
-// }
-// }
-// catch(SQLException&)
-// {
-// }
-
+
// TODO set the bookmark in the insert row
}
-// -------------------------------------------------------------------------
+
void OCacheSet::fillParameters( const ORowSetRow& _rRow
- ,const connectivity::OSQLTable& _xTable
+ ,const connectivity::OSQLTable& _xTable
,::rtl::OUStringBuffer& _sCondition
,::rtl::OUStringBuffer& _sParameter
,::std::list< sal_Int32>& _rOrgValues)
@@ -262,7 +247,7 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow
}
::rtl::OUString aColumnName;
-
+
static ::rtl::OUString aPara = ::rtl::OUString::createFromAscii("?,");
static ::rtl::OUString aAnd = ::rtl::OUString::createFromAscii(" AND ");
@@ -270,7 +255,7 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow
sal_Int32 nCheckCount = 1; // index for the orginal values
sal_Int32 i = 1;
-
+
::rtl::OUString sIsNull(RTL_CONSTASCII_USTRINGPARAM(" IS NULL"));
::rtl::OUString sParam(RTL_CONSTASCII_USTRINGPARAM(" = ?"));
ORowVector< ORowSetValue >::Vector::const_iterator aIter = _rRow->get().begin()+1;
@@ -312,7 +297,7 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow
}
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OCacheSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::updateRow" );
@@ -323,7 +308,7 @@ void SAL_CALL OCacheSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetR
aSql.append(m_aComposedTableName);
aSql.append(::rtl::OUString::createFromAscii(" SET "));
// list all cloumns that should be set
-
+
::rtl::OUStringBuffer aCondition;
::std::list< sal_Int32> aOrgValues;
fillParameters(_rInsertRow,_xTable,aCondition,aSql,aOrgValues);
@@ -360,7 +345,7 @@ void SAL_CALL OCacheSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetR
m_bUpdated = xPrep->executeUpdate() > 0;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OCacheSet::deleteRow(const ORowSetRow& _rDeleteRow ,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::deleteRow" );
@@ -404,7 +389,7 @@ void SAL_CALL OCacheSet::deleteRow(const ORowSetRow& _rDeleteRow ,const connecti
::rtl::OUStringBuffer aColumnName;
::std::list< sal_Int32> aOrgValues;
fillParameters(_rDeleteRow,_xTable,aSql,aColumnName,aOrgValues);
-
+
aSql.setLength(aSql.getLength()-5);
// now create end execute the prepared statement
@@ -419,7 +404,7 @@ void SAL_CALL OCacheSet::deleteRow(const ORowSetRow& _rDeleteRow ,const connecti
m_bDeleted = xPrep->executeUpdate() > 0;
}
-// -------------------------------------------------------------------------
+
void OCacheSet::setParameter(sal_Int32 nPos
,const Reference< XParameters >& _xParameter
,const ORowSetValue& _rValue
@@ -430,7 +415,7 @@ void OCacheSet::setParameter(sal_Int32 nPos
sal_Int32 nType = ( _nType != DataType::OTHER ) ? _nType : _rValue.getTypeKind();
::dbtools::setObjectWithInfo(_xParameter,nPos,_rValue,nType,_nScale);
}
-// -------------------------------------------------------------------------
+
void OCacheSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::fillValueRow" );
@@ -448,127 +433,127 @@ void OCacheSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition)
aIter->fill(i,m_aColumnTypes[i-1],m_aNullable[i-1],this);
}
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::wasNull( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::wasNull" );
return m_xDriverRow->wasNull();
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OCacheSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getString" );
return m_xDriverRow->getString(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getBoolean" );
return m_xDriverRow->getBoolean(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int8 SAL_CALL OCacheSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getByte" );
return m_xDriverRow->getByte(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int16 SAL_CALL OCacheSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getShort" );
return m_xDriverRow->getShort(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OCacheSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getInt" );
return m_xDriverRow->getInt(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int64 SAL_CALL OCacheSet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getLong" );
return m_xDriverRow->getLong(columnIndex);
}
-// -------------------------------------------------------------------------
+
float SAL_CALL OCacheSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getFloat" );
return m_xDriverRow->getFloat(columnIndex);
}
-// -------------------------------------------------------------------------
+
double SAL_CALL OCacheSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getDouble" );
return m_xDriverRow->getDouble(columnIndex);
}
-// -------------------------------------------------------------------------
+
Sequence< sal_Int8 > SAL_CALL OCacheSet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getBytes" );
return m_xDriverRow->getBytes(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::Date SAL_CALL OCacheSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getDate" );
return m_xDriverRow->getDate(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::Time SAL_CALL OCacheSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getTime" );
return m_xDriverRow->getTime(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::DateTime SAL_CALL OCacheSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getTimestamp" );
return m_xDriverRow->getTimestamp(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > SAL_CALL OCacheSet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getBinaryStream" );
return m_xDriverRow->getBinaryStream(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > SAL_CALL OCacheSet::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getCharacterStream" );
return m_xDriverRow->getCharacterStream(columnIndex);
}
-// -------------------------------------------------------------------------
+
Any SAL_CALL OCacheSet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getObject" );
return m_xDriverRow->getObject(columnIndex,typeMap);
}
-// -------------------------------------------------------------------------
+
Reference< XRef > SAL_CALL OCacheSet::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getRef" );
return m_xDriverRow->getRef(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< XBlob > SAL_CALL OCacheSet::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getBlob" );
return m_xDriverRow->getBlob(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< XClob > SAL_CALL OCacheSet::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getClob" );
return m_xDriverRow->getClob(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< XArray > SAL_CALL OCacheSet::getArray( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getArray" );
return m_xDriverRow->getArray(columnIndex);
}
-// -------------------------------------------------------------------------
+
// XResultSet
sal_Bool SAL_CALL OCacheSet::next( ) throw(SQLException, RuntimeException)
{
@@ -576,144 +561,142 @@ sal_Bool SAL_CALL OCacheSet::next( ) throw(SQLException, RuntimeException)
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
return m_xDriverSet->next();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::isBeforeFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::isBeforeFirst" );
return m_xDriverSet->isBeforeFirst();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::isAfterLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::isAfterLast" );
return m_xDriverSet->isAfterLast();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::isFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::isFirst" );
return m_xDriverSet->isFirst();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::isLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::isLast" );
return m_xDriverSet->isLast();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OCacheSet::beforeFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::beforeFirst" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
m_xDriverSet->beforeFirst();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OCacheSet::afterLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::afterLast" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
m_xDriverSet->afterLast();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::first( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::first" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
return m_xDriverSet->first();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::last( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::last" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
return m_xDriverSet->last();
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OCacheSet::getRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getRow" );
return m_xDriverSet->getRow();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::absolute" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
return m_xDriverSet->absolute(row);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::relative( sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::relative" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
return m_xDriverSet->relative(rows);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::previous( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::previous" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
return m_xDriverSet->previous();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OCacheSet::refreshRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::refreshRow" );
m_xDriverSet->refreshRow();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::rowUpdated( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::rowUpdated" );
return m_xDriverSet->rowUpdated();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::rowInserted( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::rowInserted" );
return m_xDriverSet->rowInserted();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OCacheSet::rowDeleted( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::rowDeleted" );
return m_xDriverSet->rowDeleted();
}
-// -------------------------------------------------------------------------
+
Reference< XInterface > SAL_CALL OCacheSet::getStatement( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::getStatement" );
return m_xDriverSet->getStatement();
}
-// -----------------------------------------------------------------------------
+
bool OCacheSet::isResultSetChanged() const
{
return false;
}
-// -----------------------------------------------------------------------------
+
void OCacheSet::reset(const Reference< XResultSet>& /*_xDriverSet*/)
{
OSL_ENSURE(0,"Illegal call!");
}
-// -----------------------------------------------------------------------------
+
void OCacheSet::mergeColumnValues(sal_Int32 i_nColumnIndex,ORowSetValueVector::Vector& /*io_aInsertRow*/,ORowSetValueVector::Vector& /*io_aRow*/,::std::vector<sal_Int32>& o_aChangedColumns)
{
o_aChangedColumns.push_back(i_nColumnIndex);
}
-// -----------------------------------------------------------------------------
+
bool OCacheSet::columnValuesUpdated(ORowSetValueVector::Vector& /*io_aCachedRow*/,const ORowSetValueVector::Vector& /*io_aRow*/)
{
return false;
}
-// -----------------------------------------------------------------------------
+
bool OCacheSet::updateColumnValues(const ORowSetValueVector::Vector& /*io_aCachedRow*/,ORowSetValueVector::Vector& /*io_aRow*/,const ::std::vector<sal_Int32>& /*i_aChangedColumns*/)
{
return true;
}
-// -----------------------------------------------------------------------------
+
void OCacheSet::fillMissingValues(ORowSetValueVector::Vector& /*io_aRow*/) const
{
}
-// -----------------------------------------------------------------------------
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/CacheSet.hxx b/dbaccess/source/core/api/CacheSet.hxx
index f34602f01..b1835d1dc 100644
--- a/dbaccess/source/core/api/CacheSet.hxx
+++ b/dbaccess/source/core/api/CacheSet.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -75,7 +75,7 @@ namespace dbaccess
,sal_Int32 _nScale
) const;
void fillParameters( const ORowSetRow& _rRow
- ,const connectivity::OSQLTable& _xTable
+ ,const connectivity::OSQLTable& _xTable
,::rtl::OUStringBuffer& _sCondition
,::rtl::OUStringBuffer& _sParameter
,::std::list< sal_Int32>& _rOrgValues);
@@ -83,7 +83,7 @@ namespace dbaccess
::rtl::OUString getIdentifierQuoteString() const;
public:
-
+
// late constructor
virtual void construct(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xDriverSet,const ::rtl::OUString& i_sRowSetFilter);
virtual void fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition);
diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx
index a2125f47a..e0a46338c 100644
--- a/dbaccess/source/core/api/FilteredContainer.cxx
+++ b/dbaccess/source/core/api/FilteredContainer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -57,12 +57,11 @@ namespace dbaccess
using namespace ::cppu;
using namespace ::connectivity::sdbcx;
-//------------------------------------------------------------------------------
/** creates a vector of WildCards and reduce the _rTableFilter of the length of WildsCards
*/
sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std::vector< WildCard >& _rOut)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OFilteredContainer::createWildCardVector" );
+ RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OFilteredContainer::createWildCardVector" );
// for wildcard search : remove all table filters which are a wildcard expression and build a WilCard
// for them
::rtl::OUString* pTableFilters = _rTableFilter.getArray();
@@ -88,7 +87,6 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
return nShiftPos;
}
- // -------------------------------------------------------------------------
bool lcl_isElementAllowed( const ::rtl::OUString& _rName,
const Sequence< ::rtl::OUString >& _rTableFilter,
const ::std::vector< WildCard >& _rWCSearch )
@@ -111,7 +109,6 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
return bFilterMatch;
}
- //--------------------------------------------------------------------------
typedef ::boost::optional< ::rtl::OUString > OptionalString;
struct TableInfo
{
@@ -138,7 +135,6 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
};
typedef ::std::vector< TableInfo > TableInfos;
- //--------------------------------------------------------------------------
void lcl_ensureComposedName( TableInfo& _io_tableInfo, const Reference< XDatabaseMetaData >& _metaData )
{
if ( !_metaData.is() )
@@ -155,7 +151,6 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
}
}
- //--------------------------------------------------------------------------
void lcl_ensureType( TableInfo& _io_tableInfo, const Reference< XDatabaseMetaData >& _metaData, const Reference< XNameAccess >& _masterContainer )
{
if ( !!_io_tableInfo.sType )
@@ -179,7 +174,6 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
_io_tableInfo.sType = OptionalString( sTypeName );
}
- //--------------------------------------------------------------------------
connectivity::TStringVector lcl_filter( const TableInfos& _unfilteredTables,
const Sequence< ::rtl::OUString >& _tableFilter, const Sequence< ::rtl::OUString >& _tableTypeFilter,
const Reference< XDatabaseMetaData >& _metaData, const Reference< XNameAccess >& _masterContainer )
@@ -257,7 +251,7 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
//==========================================================================
//= OViewContainer
//==========================================================================
- OFilteredContainer::OFilteredContainer(::cppu::OWeakObject& _rParent,
+ OFilteredContainer::OFilteredContainer(::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,
const Reference< XConnection >& _xCon,
sal_Bool _bCase,
@@ -270,9 +264,9 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
,m_pRefreshListener(_pRefreshListener)
,m_nInAppend(_nInAppend)
,m_xConnection(_xCon)
- {
+ {
}
- // -------------------------------------------------------------------------
+
void OFilteredContainer::construct(const Reference< XNameAccess >& _rxMasterContainer,
const Sequence< ::rtl::OUString >& _rTableFilter,
const Sequence< ::rtl::OUString >& _rTableTypeFilter)
@@ -289,7 +283,7 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
}
m_xMasterContainer = _rxMasterContainer;
-
+
if ( m_xMasterContainer.is() )
{
addMasterContainerListener();
@@ -312,7 +306,7 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
construct( _rTableFilter, _rTableTypeFilter );
}
}
- //------------------------------------------------------------------------------
+
void OFilteredContainer::construct(const Sequence< ::rtl::OUString >& _rTableFilter, const Sequence< ::rtl::OUString >& _rTableTypeFilter)
{
// build sorted versions of the filter sequences, so the visibility decision is faster
@@ -400,7 +394,6 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
m_bConstructed = sal_True;
}
- //------------------------------------------------------------------------------
void OFilteredContainer::disposing()
{
OCollection::disposing();
@@ -411,11 +404,10 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
m_xMasterContainer = NULL;
m_xMetaData = NULL;
m_pWarningsContainer = NULL;
- m_pRefreshListener = NULL;
+ m_pRefreshListener = NULL;
m_bConstructed = sal_False;
}
- // -------------------------------------------------------------------------
void OFilteredContainer::impl_refresh() throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OFilteredContainer::impl_refresh" );
@@ -429,14 +421,12 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
}
}
- // -----------------------------------------------------------------------------
::rtl::OUString OFilteredContainer::getNameForObject(const ObjectType& _xObject)
{
OSL_ENSURE( _xObject.is(), "OFilteredContainer::getNameForObject: Object is NULL!" );
return ::dbtools::composeTableName( m_xMetaData, _xObject, ::dbtools::eInDataManipulation, false, false, false );
}
- // -----------------------------------------------------------------------------
// multiple to obtain all tables from XDatabaseMetaData::getTables, via passing a particular
// table type filter:
// adhere to the standard, which requests to pass a NULL table type filter, if
@@ -492,9 +482,5 @@ sal_Int32 createWildCardVector(Sequence< ::rtl::OUString >& _rTableFilter, ::std
}
}
-// ..............................................................................
} // namespace
-// ..............................................................................
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/HelperCollections.cxx b/dbaccess/source/core/api/HelperCollections.cxx
index af8bb7c5b..63416ba04 100644
--- a/dbaccess/source/core/api/HelperCollections.cxx
+++ b/dbaccess/source/core/api/HelperCollections.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,7 +47,7 @@ namespace dbaccess
using namespace ::com::sun::star::script;
using namespace ::cppu;
using namespace ::osl;
- // -----------------------------------------------------------------------------
+
OPrivateColumns::OPrivateColumns(const ::vos::ORef< ::connectivity::OSQLColumns>& _rColumns,
sal_Bool _bCase,
::cppu::OWeakObject& _rParent,
@@ -59,7 +59,6 @@ namespace dbaccess
{
}
- // -------------------------------------------------------------------------
OPrivateColumns* OPrivateColumns::createWithIntrinsicNames( const ::vos::ORef< ::connectivity::OSQLColumns >& _rColumns,
sal_Bool _bCase, ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex )
{
@@ -78,7 +77,6 @@ namespace dbaccess
return new OPrivateColumns( _rColumns, _bCase, _rParent, _rMutex, aNames, sal_False );
}
- // -------------------------------------------------------------------------
void SAL_CALL OPrivateColumns::disposing(void)
{
m_aColumns = NULL;
@@ -87,7 +85,7 @@ namespace dbaccess
// So we're not allowed to dispose our elements.
OPrivateColumns_Base::disposing();
}
- // -------------------------------------------------------------------------
+
connectivity::sdbcx::ObjectType OPrivateColumns::createObject(const ::rtl::OUString& _rName)
{
if ( m_aColumns.isValid() )
@@ -103,7 +101,7 @@ namespace dbaccess
}
return NULL;
}
- // -------------------------------------------------------------------------
+
connectivity::sdbcx::ObjectType OPrivateTables::createObject(const ::rtl::OUString& _rName)
{
if ( !m_aTables.empty() )
@@ -115,7 +113,6 @@ namespace dbaccess
}
return NULL;
}
- // -----------------------------------------------------------------------------
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/HelperCollections.hxx b/dbaccess/source/core/api/HelperCollections.hxx
index fa91dfd78..6beb434fd 100644
--- a/dbaccess/source/core/api/HelperCollections.hxx
+++ b/dbaccess/source/core/api/HelperCollections.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,7 +48,7 @@ namespace dbaccess
using namespace ::com::sun::star::script;
using namespace ::cppu;
using namespace ::osl;
- // -----------------------------------------------------------------------------
+
typedef connectivity::sdbcx::OCollection OPrivateColumns_Base;
class OPrivateColumns : public OPrivateColumns_Base
{
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index b657e58e1..1da0379cc 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle andor its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -99,7 +99,7 @@ namespace
}
}
DBG_NAME(OKeySet)
-// -------------------------------------------------------------------------
+
OKeySet::OKeySet(const connectivity::OSQLTable& _xTable,
const Reference< XIndexAccess>& _xTableKeys,
const ::rtl::OUString& _rUpdateTableName, // this can be the alias or the full qualified name
@@ -120,7 +120,7 @@ OKeySet::OKeySet(const connectivity::OSQLTable& _xTable,
DBG_CTOR(OKeySet,NULL);
}
-// -----------------------------------------------------------------------------
+
OKeySet::~OKeySet()
{
try
@@ -238,13 +238,13 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable,
}
return aFilter;
}
-// -----------------------------------------------------------------------------
+
void OKeySet::construct(const Reference< XResultSet>& _xDriverSet,const ::rtl::OUString& i_sRowSetFilter)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::construct" );
OCacheSet::construct(_xDriverSet,i_sRowSetFilter);
initColumns();
-
+
Reference<XNameAccess> xKeyColumns = getKeyColumns();
Reference<XDatabaseMetaData> xMeta = m_xConnection->getMetaData();
Reference<XColumnsSupplier> xQueryColSup(m_xComposer,UNO_QUERY);
@@ -280,14 +280,14 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet,const ::rtl::O
connectivity::OSQLTable xSelColSup(xSelectTables->getByName(*pIter),uno::UNO_QUERY);
Reference<XPropertySet> xProp(xSelColSup,uno::UNO_QUERY);
::rtl::OUString sSelectTableName = ::dbtools::composeTableName( xMeta, xProp, ::dbtools::eInDataManipulation, false, false, false );
-
- ::dbaccess::getColumnPositions(xQueryColumns,xSelColSup->getColumns()->getElementNames(),sSelectTableName,(*m_pForeignColumnNames));
-
+
+ ::dbaccess::getColumnPositions(xQueryColumns,xSelColSup->getColumns()->getElementNames(),sSelectTableName,(*m_pForeignColumnNames));
+
SelectColumnsMetaData::iterator aPosEnd = (*m_pForeignColumnNames).end();
for(SelectColumnsMetaData::iterator aPosIter = (*m_pForeignColumnNames).begin();aPosIter != aPosEnd;++aPosIter)
{
// look for columns not in the source columns to use them as filter as well
- // if ( !xSourceColumns->hasByName(aPosIter->first) )
+ // if ( !xSourceColumns->hasByName(aPosIter->first) )
{
if ( aFilter.getLength() )
aFilter.append(aAnd);
@@ -300,7 +300,7 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet,const ::rtl::O
break;
}
}
- } // if ( aSeq.getLength() > 1 ) // special handling for join
+ }
executeStatement(aFilter,i_sRowSetFilter,xAnalyzer);
}
void OKeySet::executeStatement(::rtl::OUStringBuffer& io_aFilter,const ::rtl::OUString& i_sRowSetFilter,Reference<XSingleSelectQueryComposer>& io_xAnalyzer)
@@ -336,7 +336,7 @@ void OKeySet::executeStatement(::rtl::OUStringBuffer& io_aFilter,const ::rtl::OU
m_xStatement = m_xConnection->prepareStatement(io_xAnalyzer->getQueryWithSubstitution());
::comphelper::disposeComponent(io_xAnalyzer);
}
-// -------------------------------------------------------------------------
+
Any SAL_CALL OKeySet::getBookmark() throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getBookmark" );
@@ -345,7 +345,6 @@ Any SAL_CALL OKeySet::getBookmark() throw(SQLException, RuntimeException)
return makeAny(m_aKeyIter->first);
}
-// -------------------------------------------------------------------------
sal_Bool SAL_CALL OKeySet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::moveToBookmark" );
@@ -353,7 +352,7 @@ sal_Bool SAL_CALL OKeySet::moveToBookmark( const Any& bookmark ) throw(SQLExcept
m_aKeyIter = m_aKeyMap.find(::comphelper::getINT32(bookmark));
return m_aKeyIter != m_aKeyMap.end();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::moveRelativeToBookmark" );
@@ -366,7 +365,7 @@ sal_Bool SAL_CALL OKeySet::moveRelativeToBookmark( const Any& bookmark, sal_Int3
return !isBeforeFirst() && !isAfterLast();
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OKeySet::compareBookmarks( const Any& _first, const Any& _second ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::compareBookmarks" );
@@ -376,19 +375,19 @@ sal_Int32 SAL_CALL OKeySet::compareBookmarks( const Any& _first, const Any& _sec
return (nFirst != nSecond) ? CompareBookmark::NOT_EQUAL : CompareBookmark::EQUAL;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::hasOrderedBookmarks" );
return sal_True;
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OKeySet::hashBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::hashBookmark" );
return ::comphelper::getINT32(bookmark);
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::sdbcx::XDeleteRows
Sequence< sal_Int32 > SAL_CALL OKeySet::deleteRows( const Sequence< Any >& rows ,const connectivity::OSQLTable& _xTable) throw(SQLException, RuntimeException)
{
@@ -477,7 +476,7 @@ Sequence< sal_Int32 > SAL_CALL OKeySet::deleteRows( const Sequence< Any >& rows
}
return aRet;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::updateRow" );
@@ -586,11 +585,10 @@ void SAL_CALL OKeySet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_CONDITION_FOR_PK ), SQL_GENERAL_ERROR, m_xConnection );
// now create end execute the prepared statement
-
::rtl::OUString sEmpty;
executeUpdate(_rInsertRow ,_rOrginalRow,aSql.makeStringAndClear(),sEmpty,aIndexColumnPositions);
}
-// -----------------------------------------------------------------------------
+
void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const ::rtl::OUString& i_sSQL,const ::rtl::OUString& i_sTableName,const ::std::vector<sal_Int32>& _aIndexColumnPositions)
{
// now create end execute the prepared statement
@@ -656,7 +654,7 @@ void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rO
tryRefetch(_rInsertRow,bRefetch);
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::insertRow" );
@@ -701,7 +699,7 @@ void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivi
::rtl::OUString sEmpty;
executeInsert(_rInsertRow,aSql.makeStringAndClear(),sEmpty,bRefetch);
}
-// -------------------------------------------------------------------------
+
void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString& i_sSQL,const ::rtl::OUString& i_sTableName,bool bRefetch )
{
// now create,fill and execute the prepared statement
@@ -838,7 +836,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
--aKeyIter;
ORowSetRow aKeyRow = new connectivity::ORowVector< ORowSetValue >(m_pKeyColumnNames->size());
copyRowValue(_rInsertRow,aKeyRow,aKeyIter->first + 1);
-
+
m_aKeyIter = m_aKeyMap.insert(OKeySetMatrix::value_type(aKeyIter->first + 1,OKeySetValue(aKeyRow,::std::pair<sal_Int32,Reference<XRow> >(1,NULL)))).first;
// now we set the bookmark for this row
(_rInsertRow->get())[0] = makeAny((sal_Int32)m_aKeyIter->first);
@@ -861,7 +859,7 @@ void OKeySet::tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch)
connectivity::ORowVector< ORowSetValue >::Vector::const_iterator aParaEnd;
OUpdatedParameter::iterator aUpdateFind = m_aUpdatedParameter.find(m_aKeyIter->first);
if ( aUpdateFind == m_aUpdatedParameter.end() )
- {
+ {
aParaIter = m_aParameterValueForCache.get().begin();
aParaEnd = m_aParameterValueForCache.get().end();
}
@@ -870,7 +868,7 @@ void OKeySet::tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch)
aParaIter = aUpdateFind->second.get().begin();
aParaEnd = aUpdateFind->second.get().end();
}
-
+
for(++aParaIter;aParaIter != aParaEnd;++aParaIter,++nPos)
{
::dbtools::setObjectWithInfo( xParameter, nPos, aParaIter->makeAny(), aParaIter->getTypeKind() );
@@ -899,7 +897,7 @@ void OKeySet::tryRefetch(const ORowSetRow& _rInsertRow,bool bRefetch)
m_aKeyIter->second.second.second = new OPrivateRow(_rInsertRow->get());
}
}
-// -----------------------------------------------------------------------------
+
void OKeySet::copyRowValue(const ORowSetRow& _rInsertRow,ORowSetRow& _rKeyRow,sal_Int32 i_nBookmark)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::copyRowValue" );
@@ -939,7 +937,7 @@ void OKeySet::copyRowValue(const ORowSetRow& _rInsertRow,ORowSetRow& _rKeyRow,sa
aIter->setTypeKind(aPosIter->second.nType);
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OKeySet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::deleteRow" );
@@ -1045,29 +1043,29 @@ void SAL_CALL OKeySet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivit
m_bDeleted = sal_True;
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OKeySet::cancelRowUpdates( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::cancelRowUpdates" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OKeySet::moveToInsertRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::moveToInsertRow" );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OKeySet::moveToCurrentRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::moveToCurrentRow" );
}
-// -------------------------------------------------------------------------
+
Reference<XNameAccess> OKeySet::getKeyColumns() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getKeyColumns" );
// use keys and indexes for excat postioning
// first the keys
-
+
Reference<XIndexAccess> xKeys = m_xTableKeys;
if ( !xKeys.is() )
{
@@ -1102,7 +1100,7 @@ Reference<XNameAccess> OKeySet::getKeyColumns() const
return xKeyColumns;
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::next( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::next" );
@@ -1122,19 +1120,19 @@ sal_Bool SAL_CALL OKeySet::next( ) throw(SQLException, RuntimeException)
refreshRow();
return !isAfterLast();
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::isBeforeFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::isBeforeFirst" );
return m_aKeyIter == m_aKeyMap.begin();
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::isAfterLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::isAfterLast" );
return m_bRowCountFinal && m_aKeyIter == m_aKeyMap.end();
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::isFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::isFirst" );
@@ -1142,7 +1140,7 @@ sal_Bool SAL_CALL OKeySet::isFirst( ) throw(SQLException, RuntimeException)
++aTemp;
return m_aKeyIter == aTemp && m_aKeyIter != m_aKeyMap.end();
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::isLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::isLast" );
@@ -1153,7 +1151,7 @@ sal_Bool SAL_CALL OKeySet::isLast( ) throw(SQLException, RuntimeException)
--aTemp;
return m_aKeyIter == aTemp;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OKeySet::beforeFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::beforeFirst" );
@@ -1162,7 +1160,7 @@ void SAL_CALL OKeySet::beforeFirst( ) throw(SQLException, RuntimeException)
m_xRow = NULL;
::comphelper::disposeComponent(m_xSet);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OKeySet::afterLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::afterLast" );
@@ -1172,7 +1170,7 @@ void SAL_CALL OKeySet::afterLast( ) throw(SQLException, RuntimeException)
m_xRow = NULL;
::comphelper::disposeComponent(m_xSet);
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::first( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::first" );
@@ -1185,7 +1183,7 @@ sal_Bool SAL_CALL OKeySet::first( ) throw(SQLException, RuntimeException)
refreshRow();
return m_aKeyIter != m_aKeyMap.end() && m_aKeyIter != m_aKeyMap.begin();
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::last( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::last" );
@@ -1197,7 +1195,7 @@ sal_Bool SAL_CALL OKeySet::last( ) throw(SQLException, RuntimeException)
refreshRow();
return m_aKeyIter != m_aKeyMap.end() && m_aKeyIter != m_aKeyMap.begin();
}
-// -----------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OKeySet::getRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getRow" );
@@ -1206,7 +1204,7 @@ sal_Int32 SAL_CALL OKeySet::getRow( ) throw(SQLException, RuntimeException)
return ::std::distance(m_aKeyMap.begin(),m_aKeyIter);
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::absolute" );
@@ -1244,7 +1242,7 @@ sal_Bool SAL_CALL OKeySet::absolute( sal_Int32 row ) throw(SQLException, Runtime
return m_aKeyIter != m_aKeyMap.end() && m_aKeyIter != m_aKeyMap.begin();
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::relative( sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::relative" );
@@ -1255,7 +1253,7 @@ sal_Bool SAL_CALL OKeySet::relative( sal_Int32 rows ) throw(SQLException, Runtim
}
return absolute(getRow()+rows);
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::previous( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::previous" );
@@ -1267,7 +1265,7 @@ sal_Bool SAL_CALL OKeySet::previous( ) throw(SQLException, RuntimeException)
}
return m_aKeyIter != m_aKeyMap.begin();
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OKeySet::refreshRow() throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::refreshRow" );
@@ -1292,7 +1290,7 @@ void SAL_CALL OKeySet::refreshRow() throw(SQLException, RuntimeException)
connectivity::ORowVector< ORowSetValue >::Vector::const_iterator aParaEnd;
OUpdatedParameter::iterator aUpdateFind = m_aUpdatedParameter.find(m_aKeyIter->first);
if ( aUpdateFind == m_aUpdatedParameter.end() )
- {
+ {
aParaIter = m_aParameterValueForCache.get().begin();
aParaEnd = m_aParameterValueForCache.get().end();
}
@@ -1301,7 +1299,7 @@ void SAL_CALL OKeySet::refreshRow() throw(SQLException, RuntimeException)
aParaIter = aUpdateFind->second.get().begin();
aParaEnd = aUpdateFind->second.get().end();
}
-
+
for(++aParaIter;aParaIter != aParaEnd;++aParaIter,++nPos)
{
::dbtools::setObjectWithInfo( xParameter, nPos, aParaIter->makeAny(), aParaIter->getTypeKind() );
@@ -1326,7 +1324,7 @@ void SAL_CALL OKeySet::refreshRow() throw(SQLException, RuntimeException)
m_xRow.set(m_xSet,UNO_QUERY);
OSL_ENSURE(m_xRow.is(),"No row form statement!");
}
-// -----------------------------------------------------------------------------
+
sal_Bool OKeySet::fetchRow()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::fetchRow" );
@@ -1360,7 +1358,7 @@ sal_Bool OKeySet::fetchRow()
m_bRowCountFinal = sal_True;
return bRet;
}
-// -------------------------------------------------------------------------
+
void OKeySet::fillAllRows()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::fillAllRows" );
@@ -1376,152 +1374,152 @@ sal_Bool SAL_CALL OKeySet::wasNull( ) throw(SQLException, RuntimeException)
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::wasNull" );
return m_xRow->wasNull();
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OKeySet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getString" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getString(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getBoolean" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getBoolean(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int8 SAL_CALL OKeySet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getByte" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getByte(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int16 SAL_CALL OKeySet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getShort" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getShort(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OKeySet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getInt" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getInt(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int64 SAL_CALL OKeySet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getLong" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getLong(columnIndex);
}
-// -------------------------------------------------------------------------
+
float SAL_CALL OKeySet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getFloat" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getFloat(columnIndex);
}
-// -------------------------------------------------------------------------
+
double SAL_CALL OKeySet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getDouble" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getDouble(columnIndex);
}
-// -------------------------------------------------------------------------
+
Sequence< sal_Int8 > SAL_CALL OKeySet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getBytes" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getBytes(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::Date SAL_CALL OKeySet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getDate" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getDate(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::Time SAL_CALL OKeySet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getTime" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getTime(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::DateTime SAL_CALL OKeySet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getTimestamp" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getTimestamp(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > SAL_CALL OKeySet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getBinaryStream" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getBinaryStream(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > SAL_CALL OKeySet::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getCharacterStream" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getCharacterStream(columnIndex);
}
-// -------------------------------------------------------------------------
+
Any SAL_CALL OKeySet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getObject" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getObject(columnIndex,typeMap);
}
-// -------------------------------------------------------------------------
+
Reference< XRef > SAL_CALL OKeySet::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getRef" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getRef(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< XBlob > SAL_CALL OKeySet::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getBlob" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getBlob(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< XClob > SAL_CALL OKeySet::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getClob" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getClob(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< XArray > SAL_CALL OKeySet::getArray( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::getArray" );
OSL_ENSURE(m_xRow.is(),"m_xRow is null!");
return m_xRow->getArray(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::rowUpdated( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::rowUpdated" );
return m_aKeyIter != m_aKeyMap.begin() && m_aKeyIter != m_aKeyMap.end() && m_aKeyIter->second.second.first == 2;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::rowInserted( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::rowInserted" );
return m_aKeyIter != m_aKeyMap.begin() && m_aKeyIter != m_aKeyMap.end() && m_aKeyIter->second.second.first == 1;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OKeySet::rowDeleted( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::rowDeleted" );
@@ -1529,7 +1527,7 @@ sal_Bool SAL_CALL OKeySet::rowDeleted( ) throw(SQLException, RuntimeException)
m_bDeleted = sal_False;
return bDeleted;
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OKeySet::getComposedTableName(const ::rtl::OUString& _sCatalog,
const ::rtl::OUString& _sSchema,
const ::rtl::OUString& _sTable)
@@ -1562,7 +1560,7 @@ sal_Bool SAL_CALL OKeySet::rowDeleted( ) throw(SQLException, RuntimeException)
return aComposedName;
}
-// -----------------------------------------------------------------------------
+
namespace dbaccess
{
@@ -1607,7 +1605,7 @@ void getColumnPositions(const Reference<XNameAccess>& _rxQueryColumns,
sal_Int32 nNullable = ColumnValue::NULLABLE_UNKNOWN;
OSL_VERIFY( xQueryColumnProp->getPropertyValue( PROPERTY_ISNULLABLE ) >>= nNullable );
-
+
if ( i_bAppendTableName )
{
::rtl::OUStringBuffer sName;
@@ -1617,11 +1615,11 @@ void getColumnPositions(const Reference<XNameAccess>& _rxQueryColumns,
SelectColumnDescription aColDesc( nPos, nType,nScale,nNullable != sdbc::ColumnValue::NO_NULLS, sColumnDefault );
aColDesc.sRealName = sRealName;
aColDesc.sTableName = sTableName;
- o_rColumnNames[sName.makeStringAndClear()] = aColDesc;
+ o_rColumnNames[sName.makeStringAndClear()] = aColDesc;
}
else
o_rColumnNames[sRealName] = SelectColumnDescription( nPos, nType,nScale,nNullable != sdbc::ColumnValue::NO_NULLS, sColumnDefault );
-
+
break;
}
}
@@ -1629,7 +1627,7 @@ void getColumnPositions(const Reference<XNameAccess>& _rxQueryColumns,
}
}
}
-// -----------------------------------------------------------------------------
+
void OKeySet::impl_convertValue_throw(const ORowSetRow& _rInsertRow,const SelectColumnDescription& i_aMetaData)
{
ORowSetValue& aValue((_rInsertRow->get())[i_aMetaData.nPosition]);
@@ -1650,6 +1648,4 @@ 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/KeySet.hxx b/dbaccess/source/core/api/KeySet.hxx
index a05cf856a..f2f301549 100644
--- a/dbaccess/source/core/api/KeySet.hxx
+++ b/dbaccess/source/core/api/KeySet.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,8 +51,6 @@ namespace dbaccess
sal_Int32 nScale;
sal_Bool bNullable;
-
-
SelectColumnDescription()
:nPosition( 0 )
,nType( 0 )
@@ -88,7 +86,7 @@ namespace dbaccess
protected:
OKeySetMatrix m_aKeyMap;
OKeySetMatrix::iterator m_aKeyIter;
-
+
::std::vector< ::rtl::OUString > m_aAutoColumns; // contains all columns which are autoincrement ones
OUpdatedParameter m_aUpdatedParameter; // contains all parameter which have been updated and are needed for refetching
@@ -105,7 +103,7 @@ namespace dbaccess
::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryAnalyzer > m_xComposer;
::rtl::OUString m_sUpdateTableName;
::std::vector< ::rtl::OUString > m_aFilterColumns;
-
+
sal_Bool m_bRowCountFinal;
/**
@@ -127,7 +125,7 @@ namespace dbaccess
+ \param i_nBookmark The bookmark is used to update the parameter
*/
void copyRowValue(const ORowSetRow& _rInsertRow,ORowSetRow& _rKeyRow,sal_Int32 i_nBookmark);
-
+
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > getKeyColumns() const;
void fillAllRows();
sal_Bool fetchRow();
@@ -143,7 +141,7 @@ namespace dbaccess
void executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const ::rtl::OUString& i_sSQL,const ::rtl::OUString& i_sTableName,const ::std::vector<sal_Int32>& _aIndexColumnPositions = ::std::vector<sal_Int32>());
void executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString& i_sSQL,const ::rtl::OUString& i_sTableName = ::rtl::OUString(),bool bRefetch = false);
void executeStatement(::rtl::OUStringBuffer& io_aFilter,const ::rtl::OUString& i_sRowSetFilter,::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryComposer>& io_xAnalyzer);
-
+
virtual ~OKeySet();
public:
OKeySet(const connectivity::OSQLTable& _xTable,
@@ -151,7 +149,7 @@ namespace dbaccess
const ::rtl::OUString& _rUpdateTableName,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryAnalyzer >& _xComposer,
const ORowSetValueVector& _aParameterValueForCache);
-
+
// late ctor which can throw exceptions
virtual void construct(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xDriverSet,const ::rtl::OUString& i_sRowSetFilter);
@@ -198,17 +196,17 @@ namespace dbaccess
virtual void SAL_CALL refreshRow( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
// ::com::sun::star::sdbcx::XRowLocate
virtual ::com::sun::star::uno::Any SAL_CALL getBookmark() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // -------------------------------------------------------------------------
+
virtual sal_Bool SAL_CALL moveToBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // -------------------------------------------------------------------------
+
virtual sal_Bool SAL_CALL moveRelativeToBookmark( const ::com::sun::star::uno::Any& bookmark, sal_Int32 rows ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // -------------------------------------------------------------------------
+
virtual sal_Int32 SAL_CALL compareBookmarks( const ::com::sun::star::uno::Any& first, const ::com::sun::star::uno::Any& second ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // -------------------------------------------------------------------------
+
virtual sal_Bool SAL_CALL hasOrderedBookmarks( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // -------------------------------------------------------------------------
+
virtual sal_Int32 SAL_CALL hashBookmark( const ::com::sun::star::uno::Any& bookmark ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
- // -------------------------------------------------------------------------
+
// ::com::sun::star::sdbcx::XDeleteRows
virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL deleteRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rows ,const connectivity::OSQLTable& _xTable) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
// ::com::sun::star::sdbc::XResultSetUpdate
@@ -221,4 +219,3 @@ namespace dbaccess
};
}
#endif // DBACCESS_CORE_API_KEYSET_HXX
-
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx
index 6dac3c5e3..25c6c15a3 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -99,7 +99,7 @@ namespace
}
DBG_NAME(OptimisticSet)
-// -------------------------------------------------------------------------
+
OptimisticSet::OptimisticSet(const ::comphelper::ComponentContext& _rContext,
const Reference< XConnection>& i_xConnection,
const Reference< XSingleSelectQueryAnalyzer >& _xComposer,
@@ -112,12 +112,12 @@ OptimisticSet::OptimisticSet(const ::comphelper::ComponentContext& _rContext,
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OptimisticSet::OptimisticSet" );
DBG_CTOR(OptimisticSet,NULL);
}
-// -----------------------------------------------------------------------------
+
OptimisticSet::~OptimisticSet()
{
DBG_DTOR(OptimisticSet,NULL);
}
-// -----------------------------------------------------------------------------
+
void OptimisticSet::construct(const Reference< XResultSet>& _xDriverSet,const ::rtl::OUString& i_sRowSetFilter)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OptimisticSet::construct" );
@@ -170,14 +170,14 @@ void OptimisticSet::construct(const Reference< XResultSet>& _xDriverSet,const ::
m_xStatement = m_xConnection->prepareStatement(xAnalyzer->getQueryWithSubstitution());
::comphelper::disposeComponent(xAnalyzer);
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::sdbcx::XDeleteRows
Sequence< sal_Int32 > SAL_CALL OptimisticSet::deleteRows( const Sequence< Any >& /*rows*/ ,const connectivity::OSQLTable& /*_xTable*/) throw(SQLException, RuntimeException)
{
Sequence< sal_Int32 > aRet;
return aRet;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OptimisticSet::updateRow" );
@@ -265,7 +265,7 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
}
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OptimisticSet::insertRow" );
@@ -277,7 +277,7 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn
static ::rtl::OUString aAnd = ::rtl::OUString::createFromAscii(" AND ");
::rtl::OUString sIsNull(RTL_CONSTASCII_USTRINGPARAM(" IS NULL"));
::rtl::OUString sParam(RTL_CONSTASCII_USTRINGPARAM(" = ?"));
-
+
// here we build the condition part for the update statement
SelectColumnsMetaData::const_iterator aIter = m_pColumnNames->begin();
SelectColumnsMetaData::const_iterator aEnd = m_pColumnNames->end();
@@ -285,7 +285,7 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn
{
if ( aResultSetChanged.find( aIter->second.sTableName ) == aResultSetChanged.end() )
aResultSetChanged[aIter->second.sTableName] = false;
-
+
const ::rtl::OUString sQuotedColumnName = ::dbtools::quoteName( aQuote,aIter->second.sRealName);
if ( (_rInsertRow->get())[aIter->second.nPosition].isModified() )
{
@@ -364,19 +364,19 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn
if ( xRow.is() && xRes->next() )
{
m_bResultSetChanged = true;
- continue;
+ continue;
}
}
catch(const SQLException&)
{
}
}
-
+
executeInsert(_rInsertRow,sSql.makeStringAndClear(),aSqlIter->first);
}
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OptimisticSet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
::rtl::OUString sParam(RTL_CONSTASCII_USTRINGPARAM(" = ?"));
@@ -422,7 +422,7 @@ void SAL_CALL OptimisticSet::deleteRow(const ORowSetRow& _rDeleteRow,const conne
}
}
}
-// -------------------------------------------------------------------------
+
void OptimisticSet::executeDelete(const ORowSetRow& _rDeleteRow,const ::rtl::OUString& i_sSQL,const ::rtl::OUString& i_sTableName)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OptimisticSet::executeDelete" );
@@ -450,41 +450,17 @@ void OptimisticSet::executeDelete(const ORowSetRow& _rDeleteRow,const ::rtl::OUS
m_bDeleted = sal_True;
}
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OptimisticSet::getComposedTableName(const ::rtl::OUString& /*_sCatalog*/,
const ::rtl::OUString& /*_sSchema*/,
const ::rtl::OUString& /*_sTable*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OptimisticSet::getComposedTableName" );
::rtl::OUString aComposedName;
-/*
- Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData();
- if( xMetaData.is() && xMetaData->supportsTableCorrelationNames() )
- {
- aComposedName = ::dbtools::composeTableName( xMetaData, _sCatalog, _sSchema, _sTable, sal_False, ::dbtools::eInDataManipulation );
- // first we have to check if the composed tablename is in the select clause or if an alias is used
- Reference<XTablesSupplier> xTabSup(m_xComposer,UNO_QUERY);
- Reference<XNameAccess> xSelectTables = xTabSup->getTables();
- OSL_ENSURE(xSelectTables.is(),"No Select tables!");
- if(xSelectTables.is())
- {
- if(!xSelectTables->hasByName(aComposedName))
- { // the composed name isn't used in the select clause so we have to find out which name is used instead
- ::rtl::OUString sCatalog,sSchema,sTable;
- ::dbtools::qualifiedNameComponents(xMetaData,m_sUpdateTableName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
- aComposedName = ::dbtools::composeTableNameForSelect( m_xConnection, sCatalog, sSchema, sTable );
- }
- else
- aComposedName = ::dbtools::composeTableNameForSelect( m_xConnection, _sCatalog, _sSchema, _sTable );
- }
- }
- else
- aComposedName = ::dbtools::composeTableNameForSelect( m_xConnection, _sCatalog, _sSchema, _sTable );
-*/
return aComposedName;
}
-// -----------------------------------------------------------------------------
+
void OptimisticSet::fillJoinedColumns_throw(const ::std::vector< TNodePair >& i_aJoinColumns)
{
::std::vector< TNodePair >::const_iterator aIter = i_aJoinColumns.begin();
@@ -503,9 +479,9 @@ void OptimisticSet::fillJoinedColumns_throw(const ::std::vector< TNodePair >& i_
fillJoinedColumns_throw(sLeft.makeStringAndClear(),sRight.makeStringAndClear());
}
}
-// -----------------------------------------------------------------------------
+
void OptimisticSet::fillJoinedColumns_throw(const ::rtl::OUString& i_sLeftColumn,const ::rtl::OUString& i_sRightColumn)
-{
+{
sal_Int32 nLeft = 0,nRight = 0;
SelectColumnsMetaData::const_iterator aLeftIter = m_pKeyColumnNames->find(i_sLeftColumn);
SelectColumnsMetaData::const_iterator aRightIter = m_pKeyColumnNames->find(i_sRightColumn);
@@ -543,14 +519,14 @@ void OptimisticSet::fillJoinedColumns_throw(const ::rtl::OUString& i_sLeftColumn
else
m_aJoinedColumns[nRight] = nLeft;
}
-// -----------------------------------------------------------------------------
+
bool OptimisticSet::isResultSetChanged() const
{
bool bOld = m_bResultSetChanged;
m_bResultSetChanged = false;
return bOld;
}
-// -----------------------------------------------------------------------------
+
void OptimisticSet::reset(const Reference< XResultSet>& _xDriverSet)
{
OCacheSet::construct(_xDriverSet,::rtl::OUString());
@@ -559,7 +535,7 @@ void OptimisticSet::reset(const Reference< XResultSet>& _xDriverSet)
m_aKeyMap.insert(OKeySetMatrix::value_type(0,OKeySetValue(NULL,::std::pair<sal_Int32,Reference<XRow> >(0,NULL))));
m_aKeyIter = m_aKeyMap.begin();
}
-// -----------------------------------------------------------------------------
+
void OptimisticSet::mergeColumnValues(sal_Int32 i_nColumnIndex,ORowSetValueVector::Vector& io_aInsertRow,ORowSetValueVector::Vector& io_aRow,::std::vector<sal_Int32>& o_aChangedColumns)
{
o_aChangedColumns.push_back(i_nColumnIndex);
@@ -601,7 +577,7 @@ namespace
}
};
}
-// -----------------------------------------------------------------------------
+
bool OptimisticSet::updateColumnValues(const ORowSetValueVector::Vector& io_aCachedRow,ORowSetValueVector::Vector& io_aRow,const ::std::vector<sal_Int32>& i_aChangedColumns)
{
bool bRet = false;
@@ -638,7 +614,7 @@ bool OptimisticSet::updateColumnValues(const ORowSetValueVector::Vector& io_aCac
}
return bRet;
}
-// -----------------------------------------------------------------------------
+
bool OptimisticSet::columnValuesUpdated(ORowSetValueVector::Vector& o_aCachedRow,const ORowSetValueVector::Vector& i_aRow)
{
bool bRet = false;
@@ -677,7 +653,7 @@ bool OptimisticSet::columnValuesUpdated(ORowSetValueVector::Vector& o_aCachedRow
}
return bRet;
}
-// -----------------------------------------------------------------------------
+
void OptimisticSet::fillMissingValues(ORowSetValueVector::Vector& io_aRow) const
{
TSQLStatements aSql;
@@ -761,6 +737,4 @@ void OptimisticSet::fillMissingValues(ORowSetValueVector::Vector& io_aRow) const
}
}
}
-// -----------------------------------------------------------------------------
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/OptimisticSet.hxx b/dbaccess/source/core/api/OptimisticSet.hxx
index fd1b304a7..b86f956e7 100644
--- a/dbaccess/source/core/api/OptimisticSet.hxx
+++ b/dbaccess/source/core/api/OptimisticSet.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,11 +49,10 @@ namespace dbaccess
{
::connectivity::OSQLParser m_aSqlParser;
::connectivity::OSQLParseTreeIterator m_aSqlIterator;
-
+
::std::map<sal_Int32,sal_Int32> m_aJoinedColumns;
- ::std::map<sal_Int32,sal_Int32> m_aJoinedKeyColumns;
-
-
+ ::std::map<sal_Int32,sal_Int32> m_aJoinedKeyColumns;
+
mutable bool m_bResultSetChanged;
/**
@@ -67,9 +66,9 @@ namespace dbaccess
::rtl::OUString getComposedTableName( const ::rtl::OUString& _sCatalog,
const ::rtl::OUString& _sSchema,
const ::rtl::OUString& _sTable);
-
+
void impl_convertValue_throw(const ORowSetRow& _rInsertRow,const SelectColumnDescription& i_aMetaData);
-
+
void executeDelete(const ORowSetRow& _rDeleteRow,const ::rtl::OUString& i_sSQL,const ::rtl::OUString& i_sTableName);
void fillJoinedColumns_throw(const ::std::vector< ::connectivity::TNodePair>& i_aJoinColumns);
void fillJoinedColumns_throw(const ::rtl::OUString& i_sLeftColumn,const ::rtl::OUString& i_sRightColumn);
@@ -80,11 +79,10 @@ namespace dbaccess
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& i_xConnection,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryAnalyzer >& _xComposer,
const ORowSetValueVector& _aParameterValueForCache);
-
+
// late ctor which can throw exceptions
virtual void construct(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>& _xDriverSet,const ::rtl::OUString& i_sRowSetFilter);
- // -------------------------------------------------------------------------
// ::com::sun::star::sdbcx::XDeleteRows
virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL deleteRows( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rows ,const connectivity::OSQLTable& _xTable) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
// ::com::sun::star::sdbc::XResultSetUpdate
@@ -106,4 +104,3 @@ namespace dbaccess
};
}
#endif // DBACCESS_CORE_API_OPTIMISTICSET_HXX
-
diff --git a/dbaccess/source/core/api/PrivateRow.cxx b/dbaccess/source/core/api/PrivateRow.cxx
index a16da879c..05eed3b2b 100644
--- a/dbaccess/source/core/api/PrivateRow.cxx
+++ b/dbaccess/source/core/api/PrivateRow.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle andor its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/api/PrivateRow.hxx b/dbaccess/source/core/api/PrivateRow.hxx
index aabcb0d4a..82dd97232 100644
--- a/dbaccess/source/core/api/PrivateRow.hxx
+++ b/dbaccess/source/core/api/PrivateRow.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 44ccd3fb8..a9fe9c4a9 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -104,12 +104,10 @@ using namespace ::com::sun::star::util;
using namespace ::cppu;
using namespace ::osl;
-//--------------------------------------------------------------------------
extern "C" void SAL_CALL createRegistryInfo_ORowSet()
{
static ::dba::OAutoRegistration< ORowSet > aAutoRegistration;
}
-// -----------------------------------------------------------------------------
#define NOTIFY_LISTERNERS_CHECK(_rListeners,T,method) \
Sequence< Reference< XInterface > > aListenerSeq = _rListeners.getElements(); \
@@ -136,16 +134,14 @@ extern "C" void SAL_CALL createRegistryInfo_ORowSet()
_rGuard.reset();
-//..................................................................
namespace dbaccess
{
-//..................................................................
-//--------------------------------------------------------------------------
+
Reference< XInterface > ORowSet_CreateInstance(const Reference< XMultiServiceFactory >& _rxFactory)
{
return *(new ORowSet(_rxFactory));
}
-//--------------------------------------------------------------------------
+
ORowSet::ORowSet( const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB )
:ORowSet_BASE1(m_aMutex)
,ORowSetBase( _rxORB, ORowSet_BASE1::rBHelper, &m_aMutex )
@@ -240,7 +236,6 @@ ORowSet::~ORowSet()
}
}
-// -----------------------------------------------------------------------------
void ORowSet::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefault ) const
{
switch( _nHandle )
@@ -292,9 +287,8 @@ void ORowSet::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefault ) c
break;
}
}
-// -------------------------------------------------------------------------
-// typedef ::comphelper::OPropertyArrayUsageHelper<ORowSet> ORowSet_Prop;
+// typedef ::comphelper::OPropertyArrayUsageHelper<ORowSet> ORowSet_Prop;
void SAL_CALL ORowSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception)
{
switch(nHandle)
@@ -386,7 +380,7 @@ void SAL_CALL ORowSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const
break;
};
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
{
if(m_pCache)
@@ -430,7 +424,7 @@ void SAL_CALL ORowSet::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
}
}
}
-// -------------------------------------------------------------------------
+
// com::sun::star::XTypeProvider
Sequence< Type > SAL_CALL ORowSet::getTypes() throw (RuntimeException)
{
@@ -440,7 +434,7 @@ Sequence< Type > SAL_CALL ORowSet::getTypes() throw (RuntimeException)
::comphelper::concatSequences(ORowSet_BASE1::getTypes(),ORowSetBase::getTypes()));
return aTypes.getTypes();
}
-// -------------------------------------------------------------------------
+
Sequence< sal_Int8 > SAL_CALL ORowSet::getImplementationId() throw (RuntimeException)
{
static OImplementationId * pId = 0;
@@ -455,24 +449,22 @@ Sequence< sal_Int8 > SAL_CALL ORowSet::getImplementationId() throw (RuntimeExcep
}
return pId->getImplementationId();
}
-// -------------------------------------------------------------------------
// com::sun::star::XInterface
Any SAL_CALL ORowSet::queryInterface( const Type & rType ) throw (RuntimeException)
{
return ORowSet_BASE1::queryInterface( rType);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::acquire() throw()
{
ORowSet_BASE1::acquire();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::release() throw()
{
ORowSet_BASE1::release();
}
-// -------------------------------------------------------------------------
// com::sun::star::XUnoTunnel
sal_Int64 SAL_CALL ORowSet::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
@@ -482,7 +474,7 @@ sal_Int64 SAL_CALL ORowSet::getSomething( const Sequence< sal_Int8 >& rId ) thro
return 0;
}
-// -------------------------------------------------------------------------
+
// com::sun::star::XAggregation
Any SAL_CALL ORowSet::queryAggregation( const Type& rType ) throw(RuntimeException)
{
@@ -491,23 +483,23 @@ Any SAL_CALL ORowSet::queryAggregation( const Type& rType ) throw(RuntimeExcepti
aRet = ORowSet_BASE1::queryAggregation(rType);
return aRet;
}
-//------------------------------------------------------------------------------
+
rtl::OUString ORowSet::getImplementationName_static( ) throw(RuntimeException)
{
return rtl::OUString::createFromAscii("com.sun.star.comp.dba.ORowSet");
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::XServiceInfo
::rtl::OUString SAL_CALL ORowSet::getImplementationName( ) throw(RuntimeException)
{
return getImplementationName_static();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSet::supportsService( const ::rtl::OUString& _rServiceName ) throw(RuntimeException)
{
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > ORowSet::getSupportedServiceNames_static( ) throw (RuntimeException)
{
Sequence< rtl::OUString > aSNS( 5 );
@@ -518,18 +510,18 @@ Sequence< ::rtl::OUString > ORowSet::getSupportedServiceNames_static( ) throw (
aSNS[4] = SERVICE_SDB_ROWSET;
return aSNS;
}
-// -------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL ORowSet::getSupportedServiceNames( ) throw(RuntimeException)
{
return getSupportedServiceNames_static();
}
-//------------------------------------------------------------------------------
+
Reference< XInterface > ORowSet::Create(const Reference< XComponentContext >& _rxContext)
{
::comphelper::ComponentContext aContext( _rxContext );
return ORowSet_CreateInstance( aContext.getLegacyServiceFactory() );
}
-// -------------------------------------------------------------------------
+
// OComponentHelper
void SAL_CALL ORowSet::disposing()
{
@@ -561,7 +553,7 @@ void SAL_CALL ORowSet::disposing()
ORowSetBase::disposing();
}
-// -------------------------------------------------------------------------
+
void ORowSet::freeResources( bool _bComplete )
{
MutexGuard aGuard(m_aMutex);
@@ -618,7 +610,6 @@ void ORowSet::freeResources( bool _bComplete )
}
}
-// -------------------------------------------------------------------------
void ORowSet::setActiveConnection( Reference< XConnection >& _rxNewConn, sal_Bool _bFireEvent )
{
if (_rxNewConn.get() == m_xActiveConnection.get())
@@ -664,7 +655,6 @@ void ORowSet::setActiveConnection( Reference< XConnection >& _rxNewConn, sal_Boo
}
}
-// -------------------------------------------------------------------------
// ::com::sun::star::XEventListener
void SAL_CALL ORowSet::disposing( const ::com::sun::star::lang::EventObject& Source ) throw(RuntimeException)
{
@@ -680,7 +670,6 @@ void SAL_CALL ORowSet::disposing( const ::com::sun::star::lang::EventObject& Sou
}
}
}
-// -------------------------------------------------------------------------
// XCloseable
void SAL_CALL ORowSet::close( ) throw(SQLException, RuntimeException)
@@ -692,7 +681,7 @@ void SAL_CALL ORowSet::close( ) throw(SQLException, RuntimeException)
// additionals things to set
freeResources( true );
}
-// -------------------------------------------------------------------------
+
// comphelper::OPropertyArrayUsageHelper
::cppu::IPropertyArrayHelper* ORowSet::createArrayHelper( ) const
{
@@ -700,14 +689,14 @@ void SAL_CALL ORowSet::close( ) throw(SQLException, RuntimeException)
describeProperties(aProps);
return new ::cppu::OPropertyArrayHelper(aProps);
}
-// -------------------------------------------------------------------------
+
// cppu::OPropertySetHelper
::cppu::IPropertyArrayHelper& SAL_CALL ORowSet::getInfoHelper()
{
typedef ::comphelper::OPropertyArrayUsageHelper<ORowSet> ORowSet_PROP;
return *ORowSet_PROP::getArrayHelper();
}
-// -----------------------------------------------------------------------------
+
void ORowSet::updateValue(sal_Int32 columnIndex,const ORowSetValue& x)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -721,7 +710,7 @@ void ORowSet::updateValue(sal_Int32 columnIndex,const ORowSetValue& x)
m_pCache->updateValue(columnIndex,x,rRow,aNotify.getChangedColumns());
aNotify.firePropertyChange();
}
-// -------------------------------------------------------------------------
+
// XRowUpdate
void SAL_CALL ORowSet::updateNull( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
@@ -736,74 +725,74 @@ void SAL_CALL ORowSet::updateNull( sal_Int32 columnIndex ) throw(SQLException, R
m_pCache->updateNull(columnIndex,rRow,aNotify.getChangedColumns());
aNotify.firePropertyChange();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateBoolean( sal_Int32 columnIndex, sal_Bool x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateByte( sal_Int32 columnIndex, sal_Int8 x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateShort( sal_Int32 columnIndex, sal_Int16 x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateInt( sal_Int32 columnIndex, sal_Int32 x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateLong( sal_Int32 columnIndex, sal_Int64 x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateFloat( sal_Int32 columnIndex, float x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateDouble( sal_Int32 columnIndex, double x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateString( sal_Int32 columnIndex, const ::rtl::OUString& x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateBytes( sal_Int32 columnIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateDate( sal_Int32 columnIndex, const ::com::sun::star::util::Date& x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateTime( sal_Int32 columnIndex, const ::com::sun::star::util::Time& x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateTimestamp( sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x ) throw(SQLException, RuntimeException)
{
updateValue(columnIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateBinaryStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
::osl::MutexGuard aGuard( *m_pMutex );
checkUpdateConditions(columnIndex);
checkUpdateIterator();
-
+
{
Sequence<sal_Int8> aSeq;
if(x.is())
@@ -811,7 +800,7 @@ void SAL_CALL ORowSet::updateBinaryStream( sal_Int32 columnIndex, const Referenc
updateValue(columnIndex,aSeq);
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateCharacterStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -823,7 +812,7 @@ void SAL_CALL ORowSet::updateCharacterStream( sal_Int32 columnIndex, const Refer
m_pCache->updateCharacterStream(columnIndex,x,length,rRow,aNotify.getChangedColumns());
aNotify.firePropertyChange();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateObject( sal_Int32 columnIndex, const Any& x ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -867,7 +856,7 @@ void SAL_CALL ORowSet::updateObject( sal_Int32 columnIndex, const Any& x ) throw
aNotify.firePropertyChange();
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 scale ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -879,7 +868,6 @@ void SAL_CALL ORowSet::updateNumericObject( sal_Int32 columnIndex, const Any& x,
m_pCache->updateNumericObject(columnIndex,x,scale,rRow,aNotify.getChangedColumns());
aNotify.firePropertyChange();
}
-// -------------------------------------------------------------------------
// XResultSetUpdate
void SAL_CALL ORowSet::insertRow( ) throw(SQLException, RuntimeException)
@@ -890,7 +878,7 @@ void SAL_CALL ORowSet::insertRow( ) throw(SQLException, RuntimeException)
// when the row isn't modified
// or the concurency is read only
::osl::ResettableMutexGuard aGuard( *m_pMutex );
-
+
if(!m_pCache || !m_bNew || !m_bModified || m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY)
throwFunctionSequenceException(*this);
@@ -921,7 +909,7 @@ void SAL_CALL ORowSet::insertRow( ) throw(SQLException, RuntimeException)
// - rowChanged
notifyAllListenersRowChanged(aGuard,aEvt);
-
+
if ( !aBookmarks.empty() )
{
RowsChangeEvent aUpEvt(*this,RowChangeAction::UPDATE,aBookmarks.size(),Sequence<Any>(&(*aBookmarks.begin()),aBookmarks.size()));
@@ -941,16 +929,16 @@ void SAL_CALL ORowSet::insertRow( ) throw(SQLException, RuntimeException)
fireRowcount();
}
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL ORowSet::getRow( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
- checkCache();
+ checkCache();
// check if we are inserting a row
return (m_pCache && ( m_pCache->m_bNew || m_bModified )) ? 0 : ORowSetBase::getRow();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::updateRow( ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -958,7 +946,7 @@ void SAL_CALL ORowSet::updateRow( ) throw(SQLException, RuntimeException)
::osl::ResettableMutexGuard aGuard( *m_pMutex );
if ( !m_pCache || m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY || m_bNew || ((m_pCache->m_nPrivileges & Privilege::UPDATE ) != Privilege::UPDATE) )
throwFunctionSequenceException(*this);
-
+
if(m_bModified)
{
@@ -973,7 +961,7 @@ void SAL_CALL ORowSet::updateRow( ) throw(SQLException, RuntimeException)
::std::vector< Any > aBookmarks;
m_pCache->updateRow(m_aCurrentRow.operator ->(),aBookmarks);
if ( !aBookmarks.empty() )
- aEvt.Bookmarks = Sequence<Any>(&(*aBookmarks.begin()),aBookmarks.size());
+ aEvt.Bookmarks = Sequence<Any>(&(*aBookmarks.begin()),aBookmarks.size());
aEvt.Rows += aBookmarks.size();
m_aBookmark = m_pCache->getBookmark();
m_aCurrentRow = m_pCache->m_aMatrixIter;
@@ -1008,7 +996,7 @@ void SAL_CALL ORowSet::updateRow( ) throw(SQLException, RuntimeException)
}
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::deleteRow( ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -1060,7 +1048,6 @@ void SAL_CALL ORowSet::deleteRow( ) throw(SQLException, RuntimeException)
fireRowcount();
}
-// -------------------------------------------------------------------------
void ORowSet::implCancelRowUpdates( sal_Bool _bNotifyModified ) SAL_THROW( ( SQLException, RuntimeException ) )
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -1097,13 +1084,11 @@ void ORowSet::implCancelRowUpdates( sal_Bool _bNotifyModified ) SAL_THROW( ( SQL
fireProperty(PROPERTY_ID_ISMODIFIED,sal_False,sal_True);
}
-// -------------------------------------------------------------------------
void SAL_CALL ORowSet::cancelRowUpdates( ) throw(SQLException, RuntimeException)
{
implCancelRowUpdates( sal_True );
}
-// -------------------------------------------------------------------------
void SAL_CALL ORowSet::addRowSetListener( const Reference< XRowSetListener >& listener ) throw(RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -1112,7 +1097,7 @@ void SAL_CALL ORowSet::addRowSetListener( const Reference< XRowSetListener >& li
if(listener.is())
m_aRowsetListeners.addInterface(listener);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::removeRowSetListener( const Reference< XRowSetListener >& listener ) throw(RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -1121,7 +1106,7 @@ void SAL_CALL ORowSet::removeRowSetListener( const Reference< XRowSetListener >&
if(listener.is())
m_aRowsetListeners.removeInterface(listener);
}
-// -----------------------------------------------------------------------------
+
void ORowSet::notifyAllListeners(::osl::ResettableMutexGuard& _rGuard)
{
EventObject aEvt(*m_pMySelf);
@@ -1129,7 +1114,7 @@ void ORowSet::notifyAllListeners(::osl::ResettableMutexGuard& _rGuard)
m_aRowsetListeners.notifyEach( &XRowSetListener::rowSetChanged, aEvt );
_rGuard.reset();
}
-// -------------------------------------------------------------------------
+
void ORowSet::notifyAllListenersCursorMoved(::osl::ResettableMutexGuard& _rGuard)
{
EventObject aEvt(*m_pMySelf);
@@ -1137,7 +1122,7 @@ void ORowSet::notifyAllListenersCursorMoved(::osl::ResettableMutexGuard& _rGuard
m_aRowsetListeners.notifyEach( &XRowSetListener::cursorMoved, aEvt );
_rGuard.reset();
}
-// -------------------------------------------------------------------------
+
void ORowSet::notifyAllListenersRowChanged(::osl::ResettableMutexGuard& _rGuard, const RowsChangeEvent& aEvt)
{
_rGuard.clear();
@@ -1145,21 +1130,21 @@ void ORowSet::notifyAllListenersRowChanged(::osl::ResettableMutexGuard& _rGuard,
m_aRowsChangeListener.notifyEach( &XRowsChangeListener::rowsChanged, aEvt );
_rGuard.reset();
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSet::notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard& _rGuard)
{
EventObject aEvt(*m_pMySelf);
NOTIFY_LISTERNERS_CHECK(m_aApproveListeners,XRowSetApproveListener,approveCursorMove);
return bCheck;
}
-// -------------------------------------------------------------------------
+
void ORowSet::notifyAllListenersRowBeforeChange(::osl::ResettableMutexGuard& _rGuard,const RowChangeEvent &aEvt)
{
NOTIFY_LISTERNERS_CHECK(m_aApproveListeners,XRowSetApproveListener,approveRowChange);
if ( !bCheck )
m_aErrors.raiseTypedException( sdb::ErrorCondition::ROW_SET_OPERATION_VETOED, *this, ::cppu::UnoType< RowSetVetoException >::get() );
}
-// -------------------------------------------------------------------------
+
void ORowSet::fireRowcount()
{
sal_Int32 nCurrentRowCount( impl_getRowCount() );
@@ -1183,7 +1168,7 @@ void ORowSet::fireRowcount()
m_bLastKnownRowCountFinal = bCurrentRowCountFinal;
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::moveToInsertRow( ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -1242,7 +1227,7 @@ void SAL_CALL ORowSet::moveToInsertRow( ) throw(SQLException, RuntimeException)
fireRowcount();
}
}
-// -------------------------------------------------------------------------
+
void ORowSet::impl_setDataColumnsWriteable_throw()
{
impl_restoreDataColumnsWriteable_throw();
@@ -1254,11 +1239,11 @@ void ORowSet::impl_setDataColumnsWriteable_throw()
sal_Bool bReadOnly = sal_False;
(*aIter)->getPropertyValue(PROPERTY_ISREADONLY) >>= bReadOnly;
*aReadIter = bReadOnly;
-
+
(*aIter)->setPropertyValue(PROPERTY_ISREADONLY,makeAny(sal_False));
}
}
-// -------------------------------------------------------------------------
+
void ORowSet::impl_restoreDataColumnsWriteable_throw()
{
TDataColumns::iterator aIter = m_aDataColumns.begin();
@@ -1269,7 +1254,7 @@ void ORowSet::impl_restoreDataColumnsWriteable_throw()
}
m_aReadOnlyDataColumns.clear();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::moveToCurrentRow( ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -1304,7 +1289,7 @@ void SAL_CALL ORowSet::moveToCurrentRow( ) throw(SQLException, RuntimeException
aNotifier.fire();
}
}
-// -------------------------------------------------------------------------
+
// XRow
sal_Bool SAL_CALL ORowSet::wasNull( ) throw(SQLException, RuntimeException)
{
@@ -1313,7 +1298,7 @@ sal_Bool SAL_CALL ORowSet::wasNull( ) throw(SQLException, RuntimeException)
return ( m_pCache && isInsertRow() ) ? ((*m_pCache->m_aInsertRow)->get())[m_nLastColumnIndex].isNull() : ORowSetBase::wasNull();
}
-// -----------------------------------------------------------------------------
+
const ORowSetValue& ORowSet::getInsertValue(sal_Int32 columnIndex)
{
checkCache();
@@ -1323,79 +1308,79 @@ const ORowSetValue& ORowSet::getInsertValue(sal_Int32 columnIndex)
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL ORowSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int8 SAL_CALL ORowSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int16 SAL_CALL ORowSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL ORowSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int64 SAL_CALL ORowSet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
float SAL_CALL ORowSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
double SAL_CALL ORowSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
Sequence< sal_Int8 > SAL_CALL ORowSet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::Date SAL_CALL ORowSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::Time SAL_CALL ORowSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::DateTime SAL_CALL ORowSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSet::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
@@ -1407,7 +1392,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSet::getBinaryStrea
return ORowSetBase::getBinaryStream(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSet::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
@@ -1419,18 +1404,18 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSet::getCharacterSt
return ORowSetBase::getCharacterStream(columnIndex);
}
-// -------------------------------------------------------------------------
+
Any SAL_CALL ORowSet::getObject( sal_Int32 columnIndex, const Reference< XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
return getInsertValue(columnIndex).makeAny();
}
-// -------------------------------------------------------------------------
+
Reference< XRef > SAL_CALL ORowSet::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
{
return Reference< XRef >();
}
-// -------------------------------------------------------------------------
+
Reference< XBlob > SAL_CALL ORowSet::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
if ( m_pCache && isInsertRow() )
@@ -1440,17 +1425,17 @@ Reference< XBlob > SAL_CALL ORowSet::getBlob( sal_Int32 columnIndex ) throw(SQLE
}
return ORowSetBase::getBlob(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< XClob > SAL_CALL ORowSet::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
return Reference< XClob >(getInsertValue(columnIndex).makeAny(),UNO_QUERY);
}
-// -------------------------------------------------------------------------
+
Reference< XArray > SAL_CALL ORowSet::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
{
return Reference< XArray >();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::executeWithCompletion( const Reference< XInteractionHandler >& _rxHandler ) throw(SQLException, RuntimeException)
{
if (!_rxHandler.is())
@@ -1484,7 +1469,7 @@ void SAL_CALL ORowSet::executeWithCompletion( const Reference< XInteractionHandl
const sal_Int32 nParamCount = xParamsAsIndicies.is() ? xParamsAsIndicies->getCount() : 0;
if ( m_aParametersSet.size() < (size_t)nParamCount )
m_aParametersSet.resize( nParamCount ,false);
-
+
::dbtools::askForParameters( xComposer, this, m_xActiveConnection, _rxHandler,m_aParametersSet );
}
// ensure that only the allowed exceptions leave this block
@@ -1507,7 +1492,6 @@ void SAL_CALL ORowSet::executeWithCompletion( const Reference< XInteractionHandl
execute_NoApprove_NoNewConn(aGuard);
}
-// -------------------------------------------------------------------------
Reference< XIndexAccess > SAL_CALL ORowSet::getParameters( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( *m_pMutex );
@@ -1534,7 +1518,6 @@ Reference< XIndexAccess > SAL_CALL ORowSet::getParameters( ) throw (RuntimeExce
return m_pParameters.get();
}
-// -------------------------------------------------------------------------
void ORowSet::approveExecution() throw (RowSetVetoException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aColumnsMutex );
@@ -1562,9 +1545,8 @@ void ORowSet::approveExecution() throw (RowSetVetoException, RuntimeException)
}
}
}
-// -------------------------------------------------------------------------
+
// XRowSet
-// -------------------------------------------------------------------------
void SAL_CALL ORowSet::execute( ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -1589,7 +1571,6 @@ void SAL_CALL ORowSet::execute( ) throw(SQLException, RuntimeException)
execute_NoApprove_NoNewConn(aGuard);
}
-//------------------------------------------------------------------------------
void ORowSet::setStatementResultSetType( const Reference< XPropertySet >& _rxStatement, sal_Int32 _nDesiredResultSetType, sal_Int32 _nDesiredResultSetConcurrency )
{
OSL_ENSURE( _rxStatement.is(), "ORowSet::setStatementResultSetType: invalid statement - this will crash!" );
@@ -1643,7 +1624,6 @@ void ORowSet::setStatementResultSetType( const Reference< XPropertySet >& _rxSta
_rxStatement->setPropertyValue( PROPERTY_RESULTSETCONCURRENCY, makeAny( nResultSetConcurrency ) );
}
-// -----------------------------------------------------------------------------
Reference< XResultSet > ORowSet::impl_prepareAndExecute_throw()
{
::rtl::OUString sCommandToExecute;
@@ -1703,7 +1683,6 @@ Reference< XResultSet > ORowSet::impl_prepareAndExecute_throw()
return xResultSet;
}
-// -----------------------------------------------------------------------------
void ORowSet::impl_initializeColumnSettings_nothrow( const Reference< XPropertySet >& _rxTemplateColumn, const Reference< XPropertySet >& _rxRowSetColumn )
{
OSL_ENSURE( _rxTemplateColumn.is() && _rxRowSetColumn.is(),
@@ -1789,7 +1768,6 @@ void ORowSet::impl_initializeColumnSettings_nothrow( const Reference< XPropertyS
}
}
-// -----------------------------------------------------------------------------
void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotification)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "frank.schoenheit@sun.com", "ORowSet::execute_NoApprove_NoNewConn" );
@@ -1939,7 +1917,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
m_xColumns->getByName(sColumnLabel) >>= xColumn;
if (!xColumn.is() && m_xColumns->hasByName(sName))
m_xColumns->getByName(sName) >>= xColumn;
-
+
// check if column already in the list we need another
if ( aAllColumns.find( xColumn ) != aAllColumns.end() )
{
@@ -1991,9 +1969,9 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
sParseLabel,
m_aCurrentRow);
aColumns->get().push_back(pColumn);
-
+
pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_ISREADONLY,makeAny(rKeyColumns.find(i) != rKeyColumns.end()));
-
+
if(!sColumnLabel.getLength())
{
if(xColumn.is())
@@ -2024,7 +2002,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi
// notify the rowset listeners
notifyAllListeners(_rClearForNotification);
}
-// -------------------------------------------------------------------------
+
// XRowSetApproveBroadcaster
void SAL_CALL ORowSet::addRowSetApproveListener( const Reference< XRowSetApproveListener >& listener ) throw(RuntimeException)
{
@@ -2034,7 +2012,7 @@ void SAL_CALL ORowSet::addRowSetApproveListener( const Reference< XRowSetApprove
m_aApproveListeners.addInterface(listener);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::removeRowSetApproveListener( const Reference< XRowSetApproveListener >& listener ) throw(RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -2052,7 +2030,7 @@ void SAL_CALL ORowSet::addRowsChangeListener( const Reference< XRowsChangeListen
m_aRowsChangeListener.addInterface(listener);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::removeRowsChangeListener( const Reference< XRowsChangeListener >& listener ) throw(RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -2061,7 +2039,6 @@ void SAL_CALL ORowSet::removeRowsChangeListener( const Reference< XRowsChangeLis
m_aRowsChangeListener.removeInterface(listener);
}
-// -------------------------------------------------------------------------
// XResultSetAccess
Reference< XResultSet > SAL_CALL ORowSet::createResultSet( ) throw(SQLException, RuntimeException)
@@ -2077,14 +2054,12 @@ Reference< XResultSet > SAL_CALL ORowSet::createResultSet( ) throw(SQLException
}
return Reference< XResultSet >();
}
-// -------------------------------------------------------------------------
// ::com::sun::star::util::XCancellable
void SAL_CALL ORowSet::cancel( ) throw(RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
}
-// -------------------------------------------------------------------------
// ::com::sun::star::sdbcx::XDeleteRows
Sequence< sal_Int32 > SAL_CALL ORowSet::deleteRows( const Sequence< Any >& rows ) throw(SQLException, RuntimeException)
@@ -2140,7 +2115,7 @@ Sequence< sal_Int32 > SAL_CALL ORowSet::deleteRows( const Sequence< Any >& rows
return aResults;
}
-// -----------------------------------------------------------------------------
+
void ORowSet::notifyRowSetAndClonesRowDelete( const Any& _rBookmark )
{
// notify ourself
@@ -2158,7 +2133,7 @@ void ORowSet::notifyRowSetAndClonesRowDelete( const Any& _rBookmark )
}
}
}
-//------------------------------------------------------------------------------
+
void ORowSet::notifyRowSetAndClonesRowDeleted( const Any& _rBookmark, sal_Int32 _nPos )
{
// notify ourself
@@ -2176,7 +2151,7 @@ void ORowSet::notifyRowSetAndClonesRowDeleted( const Any& _rBookmark, sal_Int32
}
}
}
-//------------------------------------------------------------------------------
+
Reference< XConnection > ORowSet::calcConnection(const Reference< XInteractionHandler >& _rxHandler) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -2220,7 +2195,7 @@ Reference< XConnection > ORowSet::calcConnection(const Reference< XInteractionH
}
return m_xActiveConnection;
}
-//------------------------------------------------------------------------------
+
Reference< XNameAccess > ORowSet::impl_getTables_throw()
{
Reference< XNameAccess > xTables;
@@ -2260,7 +2235,6 @@ Reference< XNameAccess > ORowSet::impl_getTables_throw()
return xTables;
}
-//------------------------------------------------------------------------------
void ORowSet::impl_resetTables_nothrow()
{
if ( !m_pTables )
@@ -2278,7 +2252,6 @@ void ORowSet::impl_resetTables_nothrow()
DELETEZ( m_pTables );
}
-//------------------------------------------------------------------------------
sal_Bool ORowSet::impl_initComposer_throw( ::rtl::OUString& _out_rCommandToExecute )
{
sal_Bool bUseEscapeProcessing = impl_buildActiveCommand_throw( );
@@ -2326,11 +2299,10 @@ sal_Bool ORowSet::impl_initComposer_throw( ::rtl::OUString& _out_rCommandToExecu
impl_initParametersContainer_nothrow();
_out_rCommandToExecute = m_xComposer->getQueryWithSubstitution();
-
+
return bUseEscapeProcessing;
}
-//------------------------------------------------------------------------------
sal_Bool ORowSet::impl_buildActiveCommand_throw()
{
// create the sql command
@@ -2426,7 +2398,6 @@ sal_Bool ORowSet::impl_buildActiveCommand_throw()
return bDoEscapeProcessing;
}
-//------------------------------------------------------------------------------
void ORowSet::impl_initParametersContainer_nothrow()
{
OSL_PRECOND( !m_pParameters.is(), "ORowSet::impl_initParametersContainer_nothrow: already initialized the parameters!" );
@@ -2440,7 +2411,6 @@ void ORowSet::impl_initParametersContainer_nothrow()
}
}
-//------------------------------------------------------------------------------
void ORowSet::impl_disposeParametersContainer_nothrow()
{
if ( !m_pParameters.is() )
@@ -2458,7 +2428,6 @@ void ORowSet::impl_disposeParametersContainer_nothrow()
m_pParameters = NULL;
}
-// -----------------------------------------------------------------------------
ORowSetValue& ORowSet::getParameterStorage(sal_Int32 parameterIndex)
{
::connectivity::checkDisposed( ORowSet_BASE1::rBHelper.bDisposed );
@@ -2491,7 +2460,7 @@ ORowSetValue& ORowSet::getParameterStorage(sal_Int32 parameterIndex)
m_aPrematureParamValues.get().resize( parameterIndex );
return m_aPrematureParamValues.get()[ parameterIndex - 1 ];
}
-// -------------------------------------------------------------------------
+
// XParameters
void SAL_CALL ORowSet::setNull( sal_Int32 parameterIndex, sal_Int32 /*sqlType*/ ) throw(SQLException, RuntimeException)
{
@@ -2499,12 +2468,12 @@ void SAL_CALL ORowSet::setNull( sal_Int32 parameterIndex, sal_Int32 /*sqlType*/
getParameterStorage( parameterIndex ).setNull();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& /*typeName*/ ) throw(SQLException, RuntimeException)
{
setNull( parameterIndex, sqlType );
}
-// -----------------------------------------------------------------------------
+
void ORowSet::setParameter(sal_Int32 parameterIndex, const ORowSetValue& x)
{
::osl::MutexGuard aGuard( m_aColumnsMutex );
@@ -2512,67 +2481,66 @@ void ORowSet::setParameter(sal_Int32 parameterIndex, const ORowSetValue& x)
getParameterStorage( parameterIndex ) = x;
}
-// -------------------------------------------------------------------------
void SAL_CALL ORowSet::setBoolean( sal_Int32 parameterIndex, sal_Bool x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setByte( sal_Int32 parameterIndex, sal_Int8 x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setShort( sal_Int32 parameterIndex, sal_Int16 x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setInt( sal_Int32 parameterIndex, sal_Int32 x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setLong( sal_Int32 parameterIndex, sal_Int64 x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setFloat( sal_Int32 parameterIndex, float x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setDouble( sal_Int32 parameterIndex, double x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setString( sal_Int32 parameterIndex, const ::rtl::OUString& x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setBytes( sal_Int32 parameterIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setDate( sal_Int32 parameterIndex, const ::com::sun::star::util::Date& x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setTime( sal_Int32 parameterIndex, const ::com::sun::star::util::Time& x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setTimestamp( sal_Int32 parameterIndex, const ::com::sun::star::util::DateTime& x ) throw(SQLException, RuntimeException)
{
setParameter(parameterIndex,x);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setBinaryStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aColumnsMutex );
@@ -2590,7 +2558,7 @@ void SAL_CALL ORowSet::setBinaryStream( sal_Int32 parameterIndex, const Referenc
throw SQLException();
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setCharacterStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aColumnsMutex );
@@ -2612,7 +2580,7 @@ void SAL_CALL ORowSet::setCharacterStream( sal_Int32 parameterIndex, const Refer
throw SQLException();
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setObject( sal_Int32 parameterIndex, const Any& x ) throw(SQLException, RuntimeException)
{
if ( !::dbtools::implSetObject( this, parameterIndex, x ) )
@@ -2620,7 +2588,7 @@ void SAL_CALL ORowSet::setObject( sal_Int32 parameterIndex, const Any& x ) throw
throw SQLException();
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 targetSqlType, sal_Int32 /*scale*/ ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aColumnsMutex );
@@ -2628,27 +2596,27 @@ void SAL_CALL ORowSet::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x
setObject( parameterIndex, x );
rParamValue.setTypeKind( targetSqlType );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setRef( sal_Int32 /*parameterIndex*/, const Reference< XRef >& /*x*/ ) throw(SQLException, RuntimeException)
{
::dbtools::throwFeatureNotImplementedException( "XParameters::setRef", *this );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setBlob( sal_Int32 /*parameterIndex*/, const Reference< XBlob >& /*x*/ ) throw(SQLException, RuntimeException)
{
::dbtools::throwFeatureNotImplementedException( "XParameters::setBlob", *this );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setClob( sal_Int32 /*parameterIndex*/, const Reference< XClob >& /*x*/ ) throw(SQLException, RuntimeException)
{
::dbtools::throwFeatureNotImplementedException( "XParameters::setClob", *this );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::setArray( sal_Int32 /*parameterIndex*/, const Reference< XArray >& /*x*/ ) throw(SQLException, RuntimeException)
{
::dbtools::throwFeatureNotImplementedException( "XParameters::setArray", *this );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSet::clearParameters( ) throw(SQLException, RuntimeException)
{
::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
@@ -2661,18 +2629,16 @@ void SAL_CALL ORowSet::clearParameters( ) throw(SQLException, RuntimeException)
m_aParametersSet.clear();
}
-// -------------------------------------------------------------------------
Any SAL_CALL ORowSet::getWarnings( ) throw (SQLException, RuntimeException)
{
return m_aWarnings.getWarnings();
}
-// -------------------------------------------------------------------------
void SAL_CALL ORowSet::clearWarnings( ) throw (SQLException, RuntimeException)
{
m_aWarnings.clearWarnings();
}
-// -----------------------------------------------------------------------------
+
void ORowSet::doCancelModification( )
{
//OSL_ENSURE( isModification(), "ORowSet::doCancelModification: invalid call (no cache!)!" );
@@ -2685,31 +2651,26 @@ void ORowSet::doCancelModification( )
m_bModified = sal_False;
}
-// -----------------------------------------------------------------------------
sal_Bool ORowSet::isModification( )
{
return isNew();
}
-// -----------------------------------------------------------------------------
sal_Bool ORowSet::isModified( )
{
return m_bModified;
}
-// -----------------------------------------------------------------------------
sal_Bool ORowSet::isNew( )
{
return m_bNew;
}
-// -----------------------------------------------------------------------------
sal_Bool ORowSet::isPropertyChangeNotificationEnabled() const
{
return m_bPropChangeNotifyEnabled;
}
-// -----------------------------------------------------------------------------
void ORowSet::checkUpdateIterator()
{
if(!m_bModified && !m_bNew)
@@ -2721,7 +2682,7 @@ void ORowSet::checkUpdateIterator()
else if ( m_bNew ) // here we are modifing a value
m_bModified = sal_True;
}
-// -----------------------------------------------------------------------------
+
void ORowSet::checkUpdateConditions(sal_Int32 columnIndex)
{
checkCache();
@@ -2737,10 +2698,10 @@ void ORowSet::checkUpdateConditions(sal_Int32 columnIndex)
if ( columnIndex <= 0 || sal_Int32((*m_aCurrentRow)->get().size()) <= columnIndex )
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_INVALID_INDEX ), SQL_INVALID_DESCRIPTOR_INDEX, *this );
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ORowSet::refreshRow( ) throw(SQLException, RuntimeException)
{
-
+
ORowSetNotifier aNotifier( this );
// this will call cancelRowModification on the cache if necessary
@@ -2755,7 +2716,7 @@ void SAL_CALL ORowSet::refreshRow( ) throw(SQLException, RuntimeException)
// - IsNew
aNotifier.fire( );
}
-// -----------------------------------------------------------------------------
+
void ORowSet::impl_rebuild_throw(::osl::ResettableMutexGuard& _rGuard)
{
Reference< XResultSet > xResultSet( m_xStatement->executeQuery() );
@@ -2767,7 +2728,7 @@ void ORowSet::impl_rebuild_throw(::osl::ResettableMutexGuard& _rGuard)
// ORowSetClone
// ***********************************************************
DBG_NAME(ORowSetClone);
-//--------------------------------------------------------------------------
+
ORowSetClone::ORowSetClone( const ::comphelper::ComponentContext& _rContext, ORowSet& rParent, ::osl::Mutex* _pMutex )
:OSubComponent(m_aMutex, rParent)
,ORowSetBase( _rContext, OComponentHelper::rBHelper, _pMutex )
@@ -2858,19 +2819,18 @@ ORowSetClone::ORowSetClone( const ::comphelper::ComponentContext& _rContext, ORo
registerProperty(PROPERTY_ISBOOKMARKABLE, PROPERTY_ID_ISBOOKMARKABLE, nRT, &m_bIsBookmarable, ::getBooleanCppuType());
}
-//--------------------------------------------------------------------------
ORowSetClone::~ORowSetClone()
{
DBG_DTOR(ORowSetClone, NULL);
}
+
// com::sun::star::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > ORowSetClone::getTypes() throw (RuntimeException)
{
return ::comphelper::concatSequences(OSubComponent::getTypes(),ORowSetBase::getTypes());
}
+
// com::sun::star::XInterface
-//--------------------------------------------------------------------------
Any ORowSetClone::queryInterface( const Type & rType ) throw (RuntimeException)
{
Any aRet = ORowSetBase::queryInterface(rType);
@@ -2878,32 +2838,28 @@ Any ORowSetClone::queryInterface( const Type & rType ) throw (RuntimeException)
aRet = OSubComponent::queryInterface(rType);
return aRet;
}
-//------------------------------------------------------------------------------
+
void ORowSetClone::acquire() throw()
{
OSubComponent::acquire();
}
-//------------------------------------------------------------------------------
void ORowSetClone::release() throw()
{
OSubComponent::release();
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString ORowSetClone::getImplementationName( ) throw(RuntimeException)
{
return rtl::OUString::createFromAscii("com.sun.star.sdb.ORowSetClone");
}
-//------------------------------------------------------------------------------
sal_Bool ORowSetClone::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > ORowSetClone::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 2 );
@@ -2913,7 +2869,6 @@ Sequence< ::rtl::OUString > ORowSetClone::getSupportedServiceNames( ) throw (Ru
}
// OComponentHelper
-//------------------------------------------------------------------------------
void ORowSetClone::disposing()
{
MutexGuard aGuard( m_aMutex );
@@ -2925,7 +2880,6 @@ void ORowSetClone::disposing()
}
// XCloseable
-//------------------------------------------------------------------------------
void ORowSetClone::close(void) throw( SQLException, RuntimeException )
{
{
@@ -2935,7 +2889,6 @@ void ORowSetClone::close(void) throw( SQLException, RuntimeException )
}
dispose();
}
-// -------------------------------------------------------------------------
// comphelper::OPropertyArrayUsageHelper
::cppu::IPropertyArrayHelper* ORowSetClone::createArrayHelper( ) const
@@ -2944,7 +2897,6 @@ void ORowSetClone::close(void) throw( SQLException, RuntimeException )
describeProperties(aProps);
return new ::cppu::OPropertyArrayHelper(aProps);
}
-// -------------------------------------------------------------------------
// cppu::OPropertySetHelper
::cppu::IPropertyArrayHelper& SAL_CALL ORowSetClone::getInfoHelper()
@@ -2952,8 +2904,7 @@ void ORowSetClone::close(void) throw( SQLException, RuntimeException )
typedef ::comphelper::OPropertyArrayUsageHelper<ORowSetClone> ORowSetClone_PROP;
return *ORowSetClone_PROP::getArrayHelper();
}
-// -------------------------------------------------------------------------
-//--------------------------------------------------------------------------
+
Sequence< sal_Int8 > ORowSetClone::getUnoTunnelImplementationId()
{
static ::cppu::OImplementationId * pId = 0;
@@ -2968,7 +2919,7 @@ Sequence< sal_Int8 > ORowSetClone::getUnoTunnelImplementationId()
}
return pId->getImplementationId();
}
-// -----------------------------------------------------------------------------
+
// com::sun::star::XUnoTunnel
sal_Int64 SAL_CALL ORowSetClone::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
@@ -2977,7 +2928,7 @@ sal_Int64 SAL_CALL ORowSetClone::getSomething( const Sequence< sal_Int8 >& rId )
return 0;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ORowSetClone::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception)
{
if ( nHandle == PROPERTY_ID_FETCHSIZE )
@@ -2989,43 +2940,36 @@ void SAL_CALL ORowSetClone::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,c
OPropertyStateContainer::setFastPropertyValue_NoBroadcast(nHandle,rValue);
}
-// -----------------------------------------------------------------------------
void ORowSetClone::doCancelModification( )
{
//OSL_ENSURE( sal_False, "ORowSetClone::doCancelModification: invalid call!" );
}
-// -----------------------------------------------------------------------------
sal_Bool ORowSetClone::isModification( )
{
return sal_False;
}
-// -----------------------------------------------------------------------------
sal_Bool ORowSetClone::isModified( )
{
return sal_False;
}
-// -----------------------------------------------------------------------------
sal_Bool ORowSetClone::isNew( )
{
return sal_False;
}
-// -------------------------------------------------------------------------
void SAL_CALL ORowSetClone::execute( ) throw(SQLException, RuntimeException)
{
throwFunctionNotSupportedException( "RowSetClone::XRowSet::execute", *this );
}
-// -------------------------------------------------------------------------
void SAL_CALL ORowSetClone::addRowSetListener( const Reference< XRowSetListener >& ) throw(RuntimeException)
{
throwFunctionNotSupportedException( "RowSetClone::XRowSet", *this );
}
-// -------------------------------------------------------------------------
void SAL_CALL ORowSetClone::removeRowSetListener( const Reference< XRowSetListener >& ) throw(RuntimeException)
{
throwFunctionNotSupportedException( "RowSetClone::XRowSet", *this );
diff --git a/dbaccess/source/core/api/RowSet.hxx b/dbaccess/source/core/api/RowSet.hxx
index cb2e2baef..465a281c9 100644
--- a/dbaccess/source/core/api/RowSet.hxx
+++ b/dbaccess/source/core/api/RowSet.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index 6ff380eaf..90ae44a45 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -71,7 +71,6 @@ namespace dbaccess
// =========================================================================
// = OEmptyCollection
// =========================================================================
-// -------------------------------------------------------------------------
class OEmptyCollection : public sdbcx::OCollection
{
protected:
@@ -80,22 +79,21 @@ protected:
public:
OEmptyCollection(::cppu::OWeakObject& _rParent,::osl::Mutex& _rMutex) : OCollection(_rParent,sal_True,_rMutex,::std::vector< ::rtl::OUString>()){}
};
-// -----------------------------------------------------------------------------
+
void OEmptyCollection::impl_refresh() throw(RuntimeException)
{
}
-// -----------------------------------------------------------------------------
+
connectivity::sdbcx::ObjectType OEmptyCollection::createObject(const ::rtl::OUString& /*_rName*/)
{
return connectivity::sdbcx::ObjectType();
}
-// -----------------------------------------------------------------------------
// =========================================================================
// = ORowSetBase
// =========================================================================
DBG_NAME(ORowSetBase)
-// -------------------------------------------------------------------------
+
ORowSetBase::ORowSetBase( const ::comphelper::ComponentContext& _rContext, ::cppu::OBroadcastHelper& _rBHelper, ::osl::Mutex* _pMutex )
:OPropertyStateContainer(_rBHelper)
,m_pMutex(_pMutex)
@@ -124,7 +122,7 @@ ORowSetBase::ORowSetBase( const ::comphelper::ComponentContext& _rContext, ::cpp
registerPropertyNoMember( PROPERTY_ROWCOUNT, PROPERTY_ID_ROWCOUNT, nRBT, ::getCppuType( &nInitialRowCountValue ), &nInitialRowCountValue );
registerPropertyNoMember( PROPERTY_ISROWCOUNTFINAL, PROPERTY_ID_ISROWCOUNTFINAL, nRBT, ::getBooleanCppuType(), &bInitialRowCountFinalValue );
}
-// -----------------------------------------------------------------------------
+
ORowSetBase::~ORowSetBase()
{
if(m_pColumns)
@@ -141,15 +139,15 @@ ORowSetBase::~ORowSetBase()
DBG_DTOR(ORowSetBase,NULL);
}
+
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > ORowSetBase::getTypes() throw (RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getTypes" );
return ::comphelper::concatSequences(ORowSetBase_BASE::getTypes(),OPropertyStateContainer::getTypes());
}
+
// com::sun::star::uno::XInterface
-//--------------------------------------------------------------------------
Any ORowSetBase::queryInterface( const Type & rType ) throw (RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::queryInterface" );
@@ -158,7 +156,7 @@ Any ORowSetBase::queryInterface( const Type & rType ) throw (RuntimeException)
aRet = OPropertyStateContainer::queryInterface(rType);
return aRet;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSetBase::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) const
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getFastPropertyValue" );
@@ -179,7 +177,7 @@ void SAL_CALL ORowSetBase::getFastPropertyValue(Any& rValue,sal_Int32 nHandle) c
else
OPropertyStateContainer::getFastPropertyValue(rValue,nHandle);
}
-// -------------------------------------------------------------------------
+
// OComponentHelper
void SAL_CALL ORowSetBase::disposing(void)
{
@@ -198,7 +196,7 @@ void SAL_CALL ORowSetBase::disposing(void)
}
m_pCache = NULL;
}
-// -------------------------------------------------------------------------
+
// comphelper::OPropertyArrayUsageHelper
::cppu::IPropertyArrayHelper* ORowSetBase::createArrayHelper( ) const
{
@@ -207,14 +205,14 @@ void SAL_CALL ORowSetBase::disposing(void)
describeProperties(aProps);
return new ::cppu::OPropertyArrayHelper(aProps);
}
-// -------------------------------------------------------------------------
+
// cppu::OPropertySetHelper
::cppu::IPropertyArrayHelper& SAL_CALL ORowSetBase::getInfoHelper()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getInfoHelper" );
return *const_cast<ORowSetBase*>(this)->getArrayHelper();
}
-// -------------------------------------------------------------------------
+
// XRow
sal_Bool SAL_CALL ORowSetBase::wasNull( ) throw(SQLException, RuntimeException)
{
@@ -223,23 +221,22 @@ sal_Bool SAL_CALL ORowSetBase::wasNull( ) throw(SQLException, RuntimeException)
checkCache();
return impl_wasNull();
}
-// -----------------------------------------------------------------------------
+
sal_Bool ORowSetBase::impl_wasNull()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::impl_wasNull" );
return ((m_nLastColumnIndex != -1) && !m_aCurrentRow.isNull() && m_aCurrentRow != m_pCache->getEnd() && m_aCurrentRow->isValid()) ? ((*m_aCurrentRow)->get())[m_nLastColumnIndex].isNull() : sal_True;
}
-// -----------------------------------------------------------------------------
const ORowSetValue& ORowSetBase::getValue(sal_Int32 columnIndex)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getValue" );
checkCache();
return impl_getValue(columnIndex);
}
-// -----------------------------------------------------------------------------
+
const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex)
-{
+{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::impl_getValue" );
if ( m_bBeforeFirst || m_bAfterLast )
{
@@ -292,97 +289,97 @@ const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex)
// we should normally never reach this
return m_aEmptyValue;
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL ORowSetBase::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getString" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getBoolean" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int8 SAL_CALL ORowSetBase::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getByte" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int16 SAL_CALL ORowSetBase::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getShort" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL ORowSetBase::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getInt" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
sal_Int64 SAL_CALL ORowSetBase::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getLong" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
float SAL_CALL ORowSetBase::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getFloat" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
double SAL_CALL ORowSetBase::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getDouble" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
Sequence< sal_Int8 > SAL_CALL ORowSetBase::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getBytes" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::Date SAL_CALL ORowSetBase::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getDate" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::Time SAL_CALL ORowSetBase::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getTime" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
::com::sun::star::util::DateTime SAL_CALL ORowSetBase::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getTimestamp" );
::osl::MutexGuard aGuard( *m_pMutex );
return getValue(columnIndex);
}
-// -------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSetBase::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getBinaryStream" );
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
-
+
if ( m_bBeforeFirst || m_bAfterLast )
{
OSL_ENSURE(0,"ORowSetBase::getBinaryStream: Illegal call here (we're before first or after last)!");
@@ -410,13 +407,13 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSetBase::getBinaryS
// we should normally never reach this
return Reference< ::com::sun::star::io::XInputStream >();
}
-// -------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSetBase::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getCharacterStream" );
return getBinaryStream(columnIndex);
}
-// -------------------------------------------------------------------------
+
Any SAL_CALL ORowSetBase::getObject( sal_Int32 columnIndex, const Reference< XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getObject" );
@@ -425,33 +422,33 @@ Any SAL_CALL ORowSetBase::getObject( sal_Int32 columnIndex, const Reference< XNa
return getValue(columnIndex).makeAny();
}
-// -------------------------------------------------------------------------
+
Reference< XRef > SAL_CALL ORowSetBase::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getRef" );
::dbtools::throwFeatureNotImplementedException( "XRow::getRef", *m_pMySelf );
return NULL;
}
-// -------------------------------------------------------------------------
+
Reference< XBlob > SAL_CALL ORowSetBase::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getBlob" );
return Reference< XBlob >(getValue(columnIndex).makeAny(),UNO_QUERY);
}
-// -------------------------------------------------------------------------
+
Reference< XClob > SAL_CALL ORowSetBase::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getClob" );
return Reference< XClob >(getValue(columnIndex).makeAny(),UNO_QUERY);
}
-// -------------------------------------------------------------------------
+
Reference< XArray > SAL_CALL ORowSetBase::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getArray" );
::dbtools::throwFeatureNotImplementedException( "XRow::getArray", *m_pMySelf );
return NULL;
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::sdbcx::XRowLocate
Any SAL_CALL ORowSetBase::getBookmark( ) throw(SQLException, RuntimeException)
{
@@ -460,7 +457,7 @@ Any SAL_CALL ORowSetBase::getBookmark( ) throw(SQLException, RuntimeException)
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
-
+
if ( m_bBeforeFirst || m_bAfterLast )
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_BOOKMARK_BEFORE_OR_AFTER ), SQL_INVALID_CURSOR_POSITION, *m_pMySelf );
@@ -470,7 +467,7 @@ Any SAL_CALL ORowSetBase::getBookmark( ) throw(SQLException, RuntimeException)
OSL_ENSURE( m_aBookmark.hasValue(), "ORowSetBase::getBookmark: bookmark has no value!" );
return m_aBookmark;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::moveToBookmark" );
@@ -522,7 +519,7 @@ sal_Bool SAL_CALL ORowSetBase::moveToBookmark( const Any& bookmark ) throw(SQLEx
DBG_TRACE2("DBACCESS ORowSetBase::moveToBookmark(Any) = %i Clone = %i\n",bRet,m_bClone);
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::moveRelativeToBookmark" );
@@ -566,7 +563,7 @@ sal_Bool SAL_CALL ORowSetBase::moveRelativeToBookmark( const Any& bookmark, sal_
DBG_TRACE3("DBACCESS ORowSetBase::moveRelativeToBookmark(Any,%i) = %i Clone = %i\n",rows,bRet,m_bClone);
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL ORowSetBase::compareBookmarks( const Any& _first, const Any& _second ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::compareBookmarks" );
@@ -574,7 +571,7 @@ sal_Int32 SAL_CALL ORowSetBase::compareBookmarks( const Any& _first, const Any&
checkCache();
return m_pCache->compareBookmarks(_first,_second);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::hasOrderedBookmarks( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::hasOrderedBookmarks" );
@@ -582,7 +579,7 @@ sal_Bool SAL_CALL ORowSetBase::hasOrderedBookmarks( ) throw(SQLException, Runti
checkCache();
return m_pCache->hasOrderedBookmarks();
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL ORowSetBase::hashBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::hashBookmark" );
@@ -590,8 +587,7 @@ sal_Int32 SAL_CALL ORowSetBase::hashBookmark( const Any& bookmark ) throw(SQLExc
checkCache();
return m_pCache->hashBookmark(bookmark);
}
-// -------------------------------------------------------------------------
-// -------------------------------------------------------------------------
+
// XResultSetMetaDataSupplier
Reference< XResultSetMetaData > SAL_CALL ORowSetBase::getMetaData( ) throw(SQLException, RuntimeException)
{
@@ -604,7 +600,6 @@ Reference< XResultSetMetaData > SAL_CALL ORowSetBase::getMetaData( ) throw(SQLE
return xMeta;
}
-// -------------------------------------------------------------------------
// XColumnLocate
sal_Int32 SAL_CALL ORowSetBase::findColumn( const ::rtl::OUString& columnName ) throw(SQLException, RuntimeException)
@@ -616,7 +611,6 @@ sal_Int32 SAL_CALL ORowSetBase::findColumn( const ::rtl::OUString& columnName )
// it is possible to save some time her when we remember the names - position relation in a map
return m_pColumns ? m_pColumns->findColumn(columnName) : sal_Int32(0);
}
-// -------------------------------------------------------------------------
// ::com::sun::star::sdbcx::XColumnsSupplier
Reference< XNameAccess > SAL_CALL ORowSetBase::getColumns( ) throw(RuntimeException)
@@ -634,7 +628,7 @@ Reference< XNameAccess > SAL_CALL ORowSetBase::getColumns( ) throw(RuntimeExcep
return m_pColumns;
}
-// -------------------------------------------------------------------------
+
// XResultSet
sal_Bool SAL_CALL ORowSetBase::next( ) throw(SQLException, RuntimeException)
{
@@ -658,7 +652,6 @@ sal_Bool SAL_CALL ORowSetBase::next( ) throw(SQLException, RuntimeException)
sal_Bool bAfterLast = m_pCache->isAfterLast();
bRet = m_pCache->next();
doCancelModification( );
-
if ( bRet || bAfterLast != m_pCache->isAfterLast() )
{
@@ -685,7 +678,7 @@ sal_Bool SAL_CALL ORowSetBase::next( ) throw(SQLException, RuntimeException)
DBG_TRACE3("DBACCESS ORowSetBase::next() = %i Clone = %i ID = %i\n",bRet,m_bClone,osl_getThreadIdentifier(NULL));
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::isBeforeFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::isBeforeFirst" );
@@ -697,7 +690,7 @@ sal_Bool SAL_CALL ORowSetBase::isBeforeFirst( ) throw(SQLException, RuntimeExce
return m_bBeforeFirst;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::isAfterLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::isAfterLast" );
@@ -708,13 +701,13 @@ sal_Bool SAL_CALL ORowSetBase::isAfterLast( ) throw(SQLException, RuntimeExcept
return m_bAfterLast;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetBase::isOnFirst()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::isOnFirst" );
return isFirst();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::isFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::isFirst" );
@@ -736,13 +729,13 @@ sal_Bool SAL_CALL ORowSetBase::isFirst( ) throw(SQLException, RuntimeException)
DBG_TRACE2("DBACCESS ORowSetBase::isFirst() = %i Clone = %i\n",bIsFirst,m_bClone);
return bIsFirst;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetBase::isOnLast()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::isOnLast" );
return isLast();
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::isLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::isLast" );
@@ -768,7 +761,7 @@ sal_Bool SAL_CALL ORowSetBase::isLast( ) throw(SQLException, RuntimeException)
DBG_TRACE2("DBACCESS ORowSetBase::isLast() = %i Clone = %i\n",bIsLast,m_bClone);
return bIsLast;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSetBase::beforeFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::beforeFirst" );
@@ -810,7 +803,7 @@ void SAL_CALL ORowSetBase::beforeFirst( ) throw(SQLException, RuntimeException)
}
DBG_TRACE2("DBACCESS ORowSetBase::beforeFirst() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSetBase::afterLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::afterLast" );
@@ -850,7 +843,7 @@ void SAL_CALL ORowSetBase::afterLast( ) throw(SQLException, RuntimeException)
}
DBG_TRACE2("DBACCESS ORowSetBase::afterLast() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::move( ::std::mem_fun_t<sal_Bool,ORowSetBase>& _aCheckFunctor,
::std::mem_fun_t<sal_Bool,ORowSetCache>& _aMovementFunctor)
{
@@ -898,7 +891,7 @@ sal_Bool SAL_CALL ORowSetBase::move( ::std::mem_fun_t<sal_Bool,ORowSetBase>& _aC
DBG_TRACE2("DBACCESS ORowSetBase::move() = %i Clone = %i\n",bRet,m_bClone);
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::first( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::first" );
@@ -907,7 +900,7 @@ sal_Bool SAL_CALL ORowSetBase::first( ) throw(SQLException, RuntimeException)
::std::mem_fun_t<sal_Bool,ORowSetCache> F_tmp(&ORowSetCache::first);
return move(ioF_tmp,F_tmp);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::last( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::last" );
@@ -916,19 +909,19 @@ sal_Bool SAL_CALL ORowSetBase::last( ) throw(SQLException, RuntimeException)
::std::mem_fun_t<sal_Bool,ORowSetCache> L_tmp(&ORowSetCache::last);
return move(ioL_tmp,L_tmp);
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL ORowSetBase::getRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getRow" );
DBG_TRACE2("DBACCESS ORowSetBase::getRow() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::osl::MutexGuard aGuard( *m_pMutex );
-
+
checkCache();
return impl_getRow();
}
-// -------------------------------------------------------------------------
+
sal_Int32 ORowSetBase::impl_getRow()
-{
+{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::impl_getRow" );
sal_Int32 nPos = 0;
if ( m_bBeforeFirst )
@@ -953,7 +946,7 @@ sal_Int32 ORowSetBase::impl_getRow()
DBG_TRACE3("DBACCESS ORowSetBase::impl_getRow() = %i Clone = %i ID = %i\n",nPos,m_bClone,osl_getThreadIdentifier(NULL));
return nPos;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::absolute( sal_Int32 row ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::absolute" );
@@ -999,7 +992,7 @@ sal_Bool SAL_CALL ORowSetBase::absolute( sal_Int32 row ) throw(SQLException, Run
DBG_TRACE3("DBACCESS ORowSetBase::absolute(%i) = %i Clone = %i\n",row,bRet,m_bClone);
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::relative( sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::relative" );
@@ -1055,7 +1048,7 @@ sal_Bool SAL_CALL ORowSetBase::relative( sal_Int32 rows ) throw(SQLException, Ru
DBG_TRACE3("DBACCESS ORowSetBase::relative(%i) = %i Clone = %i\n",rows,bRet,m_bClone);
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::previous( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::previous" );
@@ -1108,7 +1101,7 @@ sal_Bool SAL_CALL ORowSetBase::previous( ) throw(SQLException, RuntimeException
DBG_TRACE2("DBACCESS ORowSetBase::previous() = %i Clone = %i\n",bRet,m_bClone);
return bRet;
}
-// -----------------------------------------------------------------------------
+
void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const ORowSetRow& _rOldValues, ::osl::ResettableMutexGuard& _rGuard )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::setCurrentRow" );
@@ -1174,20 +1167,20 @@ void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const OR
DBG_TRACE2("DBACCESS ORowSetBase::setCurrentRow() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
-// -----------------------------------------------------------------------------
+
void ORowSetBase::checkPositioningAllowed() throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::checkPositioningAllowed" );
if(!m_pCache || m_nResultSetType == ResultSetType::FORWARD_ONLY)
throwFunctionSequenceException(*m_pMySelf);
}
-//------------------------------------------------------------------------------
+
Reference< XInterface > ORowSetBase::getStatement(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getStatement" );
return NULL;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSetBase::refreshRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::refreshRow" );
@@ -1203,32 +1196,32 @@ void SAL_CALL ORowSetBase::refreshRow( ) throw(SQLException, RuntimeException)
m_pCache->refreshRow();
}
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::rowUpdated( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::rowUpdated" );
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
-
+
if ( impl_rowDeleted() )
return sal_False;
return m_pCache->rowUpdated();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::rowInserted( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::rowInserted" );
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
-
+
if ( impl_rowDeleted() )
return sal_False;
return m_pCache->rowInserted();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL ORowSetBase::rowDeleted( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::rowDeleted" );
@@ -1236,12 +1229,12 @@ sal_Bool SAL_CALL ORowSetBase::rowDeleted( ) throw(SQLException, RuntimeExcepti
checkCache();
return impl_rowDeleted();
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetBase::impl_rowDeleted( )
{
return !m_aBookmark.hasValue() && !m_bBeforeFirst && !m_bAfterLast;
}
-// -------------------------------------------------------------------------
+
// XWarningsSupplier
Any SAL_CALL ORowSetBase::getWarnings( ) throw(SQLException, RuntimeException)
{
@@ -1257,7 +1250,7 @@ Any SAL_CALL ORowSetBase::getWarnings( ) throw(SQLException, RuntimeException)
return Any();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL ORowSetBase::clearWarnings( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::clearWarnings" );
@@ -1270,7 +1263,7 @@ void SAL_CALL ORowSetBase::clearWarnings( ) throw(SQLException, RuntimeExceptio
xWarnings->clearWarnings();
}
}
-// -------------------------------------------------------------------------
+
void ORowSetBase::firePropertyChange(const ORowSetRow& _rOldRow)
{
if (!isPropertyChangeNotificationEnabled())
@@ -1298,44 +1291,39 @@ void ORowSetBase::firePropertyChange(const ORowSetRow& _rOldRow)
}
DBG_TRACE2("DBACCESS ORowSetBase::firePropertyChange() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
-// -------------------------------------------------------------------------
+
void ORowSetBase::firePropertyChange(sal_Int32 _nPos,const ::connectivity::ORowSetValue& _rOldValue)
{
OSL_ENSURE(_nPos < (sal_Int32)m_aDataColumns.size(),"nPos is invalid!");
m_aDataColumns[_nPos]->fireValueChange(_rOldValue);
}
-// -----------------------------------------------------------------------------
+
void ORowSetBase::fireRowcount()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::fireRowcount" );
}
-// -----------------------------------------------------------------------------
sal_Bool ORowSetBase::notifyAllListenersCursorBeforeMove(::osl::ResettableMutexGuard& /*_rGuard*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::notifyAllListenersCursorBeforeMove" );
return sal_True;
}
-// -----------------------------------------------------------------------------
void ORowSetBase::notifyAllListenersCursorMoved(::osl::ResettableMutexGuard& /*_rGuard*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::notifyAllListenersCursorMoved" );
}
-// -----------------------------------------------------------------------------
void ORowSetBase::notifyAllListeners(::osl::ResettableMutexGuard& /*_rGuard*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::notifyAllListeners" );
}
-// -----------------------------------------------------------------------------
sal_Bool ORowSetBase::isPropertyChangeNotificationEnabled() const
{
return sal_True;
}
-// -----------------------------------------------------------------------------
void ORowSetBase::fireProperty( sal_Int32 _nProperty, sal_Bool _bNew, sal_Bool _bOld )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::fireProperty" );
@@ -1344,7 +1332,6 @@ void ORowSetBase::fireProperty( sal_Int32 _nProperty, sal_Bool _bNew, sal_Bool _
fire( &_nProperty, &aNew, &aOld, 1, sal_False );
}
-// -----------------------------------------------------------------------------
void ORowSetBase::positionCache( CursorMoveDirection _ePrepareForDirection )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::positionCache" );
@@ -1400,7 +1387,7 @@ void ORowSetBase::positionCache( CursorMoveDirection _ePrepareForDirection )
DBG_TRACE2("DBACCESS ORowSetBase::positionCache() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
-// -----------------------------------------------------------------------------
+
void ORowSetBase::checkCache()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::checkCache" );
@@ -1408,7 +1395,7 @@ void ORowSetBase::checkCache()
if(!m_pCache)
throwFunctionSequenceException(*m_pMySelf);
}
-// -----------------------------------------------------------------------------
+
void ORowSetBase::movementFailed()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::movementFailed" );
@@ -1422,7 +1409,7 @@ void ORowSetBase::movementFailed()
OSL_ENSURE(m_bBeforeFirst || m_bAfterLast,"BeforeFirst or AfterLast is wrong!");
DBG_TRACE2("DBACCESS ORowSetBase::movementFailed() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
-// -----------------------------------------------------------------------------
+
ORowSetRow ORowSetBase::getOldRow(sal_Bool _bWasNew)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getOldRow" );
@@ -1432,13 +1419,13 @@ ORowSetRow ORowSetBase::getOldRow(sal_Bool _bWasNew)
aOldValues = new ORowSetValueVector( m_aOldRow->getRow().getBody()); // remember the old values
return aOldValues;
}
-// -----------------------------------------------------------------------------
+
void ORowSetBase::getPropertyDefaultByHandle( sal_Int32 /*_nHandle*/, Any& _rDefault ) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getPropertyDefaultByHandle" );
_rDefault.clear();
}
-// -----------------------------------------------------------------------------
+
void ORowSetBase::onDeleteRow( const Any& _rBookmark )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::onDeleteRow" );
@@ -1454,7 +1441,7 @@ void ORowSetBase::onDeleteRow( const Any& _rBookmark )
m_nDeletedPosition = m_pCache->getRow();
}
}
-// -----------------------------------------------------------------------------
+
void ORowSetBase::onDeletedRow( const Any& _rBookmark, sal_Int32 _nPos )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::onDeletedRow" );
@@ -1477,7 +1464,7 @@ void ORowSetBase::onDeletedRow( const Any& _rBookmark, sal_Int32 _nPos )
m_aCurrentRow.setBookmark( m_aBookmark );
}
}
-// -----------------------------------------------------------------------------
+
sal_Int32 ORowSetBase::impl_getRowCount() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::impl_getRowCount" );
@@ -1495,7 +1482,7 @@ struct ORowSetNotifierImpl
};
DBG_NAME(ORowSetNotifier)
-// -----------------------------------------------------------------------------
+
ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet )
:m_pRowSet( _pRowSet )
,m_bWasNew( sal_False )
@@ -1516,7 +1503,7 @@ ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet )
if ( m_pRowSet->isModification( ORowSetBase::GrantNotifierAccess() ) )
m_pRowSet->doCancelModification( ORowSetBase::GrantNotifierAccess() );
}
-// -----------------------------------------------------------------------------
+
ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet,const ORowSetValueVector::Vector& i_aRow )
:m_pImpl(new ORowSetNotifierImpl)
,m_pRowSet( _pRowSet )
@@ -1531,14 +1518,13 @@ ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet,const ORowSetValueVector
OSL_ENSURE( m_pRowSet, "ORowSetNotifier::ORowSetNotifier: invalid row set. This wil crash." );
m_pImpl->aRow = i_aRow; // yes, create a copy to store the old values
}
-// -----------------------------------------------------------------------------
+
ORowSetNotifier::~ORowSetNotifier( )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetNotifier::~ORowSetNotifier" );
DBG_DTOR(ORowSetNotifier,NULL);
}
-// -----------------------------------------------------------------------------
void ORowSetNotifier::fire()
{
// we're not interested in firing changes FALSE->TRUE, only TRUE->FALSE.
@@ -1558,19 +1544,19 @@ void ORowSetNotifier::fire()
m_bNotifyCalled = sal_True;
#endif
}
-// -----------------------------------------------------------------------------
+
::std::vector<sal_Int32>& ORowSetNotifier::getChangedColumns() const
{
OSL_ENSURE(m_pImpl.get(),"Illegal CTor call, use the other one!");
return m_pImpl->aChangedColumns;
}
-// -----------------------------------------------------------------------------
+
::std::vector<Any>& ORowSetNotifier::getChangedBookmarks() const
{
OSL_ENSURE(m_pImpl.get(),"Illegal CTor call, use the other one!");
return m_pImpl->aChangedBookmarks;
}
-// -----------------------------------------------------------------------------
+
void ORowSetNotifier::firePropertyChange()
{
OSL_ENSURE(m_pImpl.get(),"Illegal CTor call, use the other one!");
diff --git a/dbaccess/source/core/api/RowSetBase.hxx b/dbaccess/source/core/api/RowSetBase.hxx
index f653d3b3f..4fff4d551 100644
--- a/dbaccess/source/core/api/RowSetBase.hxx
+++ b/dbaccess/source/core/api/RowSetBase.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -54,7 +54,7 @@
#include <functional>
-namespace com { namespace sun { namespace star {
+namespace com { namespace sun { namespace star {
namespace sdb { struct RowChangeEvent; }
namespace lang { struct Locale; }
} } }
@@ -189,7 +189,7 @@ namespace dbaccess
const connectivity::ORowSetValue& getValue(sal_Int32 columnIndex);
// the cache has to be checked before calling this method
const connectivity::ORowSetValue& impl_getValue(sal_Int32 columnIndex);
- // sets the current and the bookmark
+ // sets the current and the bookmark
void setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const ORowSetRow& _rOldValues, ::osl::ResettableMutexGuard& _rGuard);
void checkPositioningAllowed() throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
// checks if the cache is null
@@ -373,7 +373,7 @@ namespace dbaccess
// a method of ORowSetBase (or derivees)
sal_Bool m_bWasNew;
sal_Bool m_bWasModified;
-
+
#ifdef DBG_UTIL
sal_Bool m_bNotifyCalled;
#endif
@@ -415,10 +415,9 @@ namespace dbaccess
*/
::std::vector<sal_Int32>& getChangedColumns() const;
::std::vector<com::sun::star::uno::Any>& getChangedBookmarks() const;
-
+
};
} // end of namespace
#endif // DBACCESS_CORE_API_ROWSETBASE_HXX
-
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index 1df4d51d6..0714c9d53 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -81,7 +81,7 @@ using namespace ::osl;
#define CHECK_MATRIX_POS(M) OSL_ENSURE(((M) >= static_cast<ORowSetMatrix::difference_type>(0)) && ((M) < static_cast<sal_Int32>(m_pMatrix->size())),"Position is invalid!")
DBG_NAME(ORowSetCache)
-// -------------------------------------------------------------------------
+
ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
const Reference< XSingleSelectQueryAnalyzer >& _xAnalyzer,
const ::comphelper::ComponentContext& _rContext,
@@ -347,7 +347,6 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
m_nPrivileges = Privilege::SELECT;
}
-// -------------------------------------------------------------------------
ORowSetCache::~ORowSetCache()
{
m_pCacheSet = NULL;
@@ -370,7 +369,6 @@ ORowSetCache::~ORowSetCache()
DBG_DTOR(ORowSetCache,NULL);
}
-// -------------------------------------------------------------------------
void ORowSetCache::setMaxRowSize(sal_Int32 _nSize)
{
@@ -440,14 +438,13 @@ void ORowSetCache::setMaxRowSize(sal_Int32 _nSize)
m_nEndPos = _nSize;
}
}
-// -------------------------------------------------------------------------
// XResultSetMetaDataSupplier
Reference< XResultSetMetaData > ORowSetCache::getMetaData( )
{
return m_xMetaData;
}
-// -------------------------------------------------------------------------
+
Any lcl_getBookmark(ORowSetValue& i_aValue,OCacheSet* i_pCacheSet)
{
switch ( i_aValue.getTypeKind() )
@@ -462,7 +459,7 @@ Any lcl_getBookmark(ORowSetValue& i_aValue,OCacheSet* i_pCacheSet)
return i_aValue.getAny();
}
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::sdbcx::XRowLocate
Any ORowSetCache::getBookmark( )
{
@@ -477,7 +474,7 @@ Any ORowSetCache::getBookmark( )
return lcl_getBookmark(((*m_aMatrixIter)->get())[0],m_pCacheSet);
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::moveToBookmark( const Any& bookmark )
{
if ( m_pCacheSet->moveToBookmark(bookmark) )
@@ -507,7 +504,7 @@ sal_Bool ORowSetCache::moveToBookmark( const Any& bookmark )
return m_aMatrixIter != m_pMatrix->end() && (*m_aMatrixIter).isValid();
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows )
{
sal_Bool bRet( moveToBookmark( bookmark ) );
@@ -522,23 +519,23 @@ sal_Bool ORowSetCache::moveRelativeToBookmark( const Any& bookmark, sal_Int32 ro
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Int32 ORowSetCache::compareBookmarks( const Any& _first, const Any& _second )
{
return (!_first.hasValue() || !_second.hasValue()) ? CompareBookmark::NOT_COMPARABLE : m_pCacheSet->compareBookmarks(_first,_second);
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::hasOrderedBookmarks( )
{
return m_pCacheSet->hasOrderedBookmarks();
}
-// -------------------------------------------------------------------------
+
sal_Int32 ORowSetCache::hashBookmark( const Any& bookmark )
{
return m_pCacheSet->hashBookmark(bookmark);
}
+
// XRowUpdate
-// -----------------------------------------------------------------------------
void ORowSetCache::updateNull(sal_Int32 columnIndex,ORowSetValueVector::Vector& io_aRow
,::std::vector<sal_Int32>& o_ChangedColumns
)
@@ -554,7 +551,7 @@ void ORowSetCache::updateNull(sal_Int32 columnIndex,ORowSetValueVector::Vector&
m_pCacheSet->mergeColumnValues(columnIndex,rInsert,io_aRow,o_ChangedColumns);
impl_updateRowFromCache_throw(io_aRow,o_ChangedColumns);
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::updateValue(sal_Int32 columnIndex,const ORowSetValue& x
,ORowSetValueVector::Vector& io_aRow
,::std::vector<sal_Int32>& o_ChangedColumns
@@ -571,7 +568,7 @@ void ORowSetCache::updateValue(sal_Int32 columnIndex,const ORowSetValue& x
m_pCacheSet->mergeColumnValues(columnIndex,rInsert,io_aRow,o_ChangedColumns);
impl_updateRowFromCache_throw(io_aRow,o_ChangedColumns);
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::updateCharacterStream( sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x
, sal_Int32 length,ORowSetValueVector::Vector& io_aRow
,::std::vector<sal_Int32>& o_ChangedColumns
@@ -592,7 +589,7 @@ void ORowSetCache::updateCharacterStream( sal_Int32 columnIndex, const Reference
m_pCacheSet->mergeColumnValues(columnIndex,rInsert,io_aRow,o_ChangedColumns);
impl_updateRowFromCache_throw(io_aRow,o_ChangedColumns);
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::updateObject( sal_Int32 columnIndex, const Any& x
,ORowSetValueVector::Vector& io_aRow
,::std::vector<sal_Int32>& o_ChangedColumns
@@ -609,7 +606,7 @@ void ORowSetCache::updateObject( sal_Int32 columnIndex, const Any& x
m_pCacheSet->mergeColumnValues(columnIndex,rInsert,io_aRow,o_ChangedColumns);
impl_updateRowFromCache_throw(io_aRow,o_ChangedColumns);
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal_Int32 /*scale*/
,ORowSetValueVector::Vector& io_aRow
,::std::vector<sal_Int32>& o_ChangedColumns
@@ -626,7 +623,7 @@ void ORowSetCache::updateNumericObject( sal_Int32 columnIndex, const Any& x, sal
m_pCacheSet->mergeColumnValues(columnIndex,rInsert,io_aRow,o_ChangedColumns);
impl_updateRowFromCache_throw(io_aRow,o_ChangedColumns);
}
-// -------------------------------------------------------------------------
+
// XResultSet
sal_Bool ORowSetCache::next( )
{
@@ -649,33 +646,33 @@ sal_Bool ORowSetCache::next( )
return !m_bAfterLast;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::isBeforeFirst( )
{
// return !m_nPosition;
return m_bBeforeFirst;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::isAfterLast( )
{
return m_bAfterLast;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::isFirst( )
{
return m_nPosition == 1; // ask resultset for
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::isLast( )
{
// return m_bRowCountFinal ? (m_nPosition==m_nRowCount) : m_pCacheSet->isLast();
return m_nPosition == m_nRowCount;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::beforeFirst( )
{
@@ -691,7 +688,7 @@ sal_Bool ORowSetCache::beforeFirst( )
}
return sal_True;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::afterLast( )
{
@@ -714,7 +711,7 @@ sal_Bool ORowSetCache::afterLast( )
}
return sal_True;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos,sal_Int32 _nNewEndPos)
{
OSL_ENSURE(_nNewStartPos != _nNewEndPos,"ORowSetCache::fillMatrix: StartPos and EndPos can not be equal!");
@@ -784,7 +781,7 @@ sal_Bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos,sal_Int32 _nNewEndPos
}
return bCheck;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::moveWindow()
{
@@ -1022,7 +1019,7 @@ sal_Bool ORowSetCache::moveWindow()
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::first( )
{
// first move to the first row
@@ -1047,7 +1044,7 @@ sal_Bool ORowSetCache::first( )
}
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::last( )
{
sal_Bool bRet = m_pCacheSet->last();
@@ -1082,12 +1079,12 @@ sal_Bool ORowSetCache::last( )
return bRet;
}
-// -------------------------------------------------------------------------
+
sal_Int32 ORowSetCache::getRow( )
{
return (isBeforeFirst() || isAfterLast()) ? 0 : m_nPosition;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::absolute( sal_Int32 row )
{
if(!row )
@@ -1140,7 +1137,7 @@ sal_Bool ORowSetCache::absolute( sal_Int32 row )
return !(m_bAfterLast || m_bBeforeFirst);
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::relative( sal_Int32 rows )
{
sal_Bool bErg = sal_True;
@@ -1168,7 +1165,7 @@ sal_Bool ORowSetCache::relative( sal_Int32 rows )
}
return bErg;
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::previous( )
{
sal_Bool bRet = sal_False;
@@ -1199,7 +1196,7 @@ sal_Bool ORowSetCache::previous( )
}
return bRet;
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::refreshRow( )
{
if(isAfterLast())
@@ -1212,17 +1209,17 @@ void ORowSetCache::refreshRow( )
cancelRowModification();
}
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::rowUpdated( )
{
return m_pCacheSet->rowUpdated();
}
-// -------------------------------------------------------------------------
+
sal_Bool ORowSetCache::rowInserted( )
{
return m_pCacheSet->rowInserted();
}
-// -------------------------------------------------------------------------
+
// XResultSetUpdate
sal_Bool ORowSetCache::insertRow(::std::vector< Any >& o_aBookmarks)
{
@@ -1258,7 +1255,7 @@ sal_Bool ORowSetCache::insertRow(::std::vector< Any >& o_aBookmarks)
}
return bRet;
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::resetInsertRow(sal_Bool _bClearInsertRow)
{
if ( _bClearInsertRow )
@@ -1266,7 +1263,7 @@ void ORowSetCache::resetInsertRow(sal_Bool _bClearInsertRow)
m_bNew = sal_False;
m_bModified = sal_False;
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::cancelRowModification()
{
// clear the insertrow references -> implies that the current row of the rowset changes as well
@@ -1279,7 +1276,7 @@ void ORowSetCache::cancelRowModification()
} // for(;aCacheIter != aCacheEnd;++aCacheIter)
resetInsertRow(sal_False);
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::updateRow( ORowSetMatrix::iterator& _rUpdateRow,::std::vector< Any >& o_aBookmarks )
{
if(isAfterLast() || isBeforeFirst())
@@ -1310,7 +1307,7 @@ void ORowSetCache::updateRow( ORowSetMatrix::iterator& _rUpdateRow,::std::vector
m_bModified = sal_False;
}
-// -------------------------------------------------------------------------
+
bool ORowSetCache::deleteRow( )
{
if(isAfterLast() || isBeforeFirst())
@@ -1337,7 +1334,7 @@ bool ORowSetCache::deleteRow( )
--m_nPosition;
return true;
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::cancelRowUpdates( )
{
m_bNew = m_bModified = sal_False;
@@ -1355,7 +1352,7 @@ void ORowSetCache::cancelRowUpdates( )
::dbtools::throwFunctionSequenceException(NULL);
}
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::moveToInsertRow( )
{
m_bNew = sal_True;
@@ -1376,7 +1373,7 @@ void ORowSetCache::moveToInsertRow( )
aIter->setTypeKind(m_xMetaData->getColumnType(i));
}
}
-// -------------------------------------------------------------------------
+
ORowSetCacheIterator ORowSetCache::createIterator(ORowSetBase* _pRowSet)
{
@@ -1385,7 +1382,7 @@ ORowSetCacheIterator ORowSetCache::createIterator(ORowSetBase* _pRowSet)
aHelper.pRowSet = _pRowSet;
return ORowSetCacheIterator(m_aCacheIterators.insert(m_aCacheIterators.begin(),ORowSetCacheMap::value_type(m_aCacheIterators.size()+1,aHelper)),this,_pRowSet);
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::deleteIterator(const ORowSetBase* _pRowSet)
{
ORowSetCacheMap::iterator aCacheIter = m_aCacheIterators.begin();
@@ -1400,7 +1397,7 @@ void ORowSetCache::deleteIterator(const ORowSetBase* _pRowSet)
++aCacheIter;
}
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::rotateCacheIterator(ORowSetMatrix::difference_type _nDist)
{
if(_nDist)
@@ -1429,7 +1426,7 @@ void ORowSetCache::rotateCacheIterator(ORowSetMatrix::difference_type _nDist)
}
}
}
-// -------------------------------------------------------------------------
+
void ORowSetCache::setUpdateIterator(const ORowSetMatrix::iterator& _rOriginalRow)
{
m_aInsertRow = m_pInsertMatrix->begin();
@@ -1443,7 +1440,7 @@ void ORowSetCache::setUpdateIterator(const ORowSetMatrix::iterator& _rOriginalRo
for(;aIter != aEnd;++aIter)
aIter->setModified(sal_False);
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::checkPositionFlags()
{
if(m_bRowCountFinal)
@@ -1453,13 +1450,13 @@ void ORowSetCache::checkPositionFlags()
m_nPosition = 0;//m_nRowCount;
}
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::checkUpdateConditions(sal_Int32 columnIndex)
{
if(m_bAfterLast || columnIndex >= (sal_Int32)(*m_aInsertRow)->get().size())
throwFunctionSequenceException(m_xSet.get());
}
-//------------------------------------------------------------------------------
+
sal_Bool ORowSetCache::checkInnerJoin(const ::connectivity::OSQLParseNode *pNode,const Reference< XConnection>& _xConnection,const ::rtl::OUString& _sUpdateTableName)
{
sal_Bool bOk = sal_False;
@@ -1498,7 +1495,7 @@ sal_Bool ORowSetCache::checkInnerJoin(const ::connectivity::OSQLParseNode *pNode
}
return bOk;
}
-// -----------------------------------------------------------------------------
+
sal_Bool ORowSetCache::checkJoin(const Reference< XConnection>& _xConnection,
const Reference< XSingleSelectQueryAnalyzer >& _xAnalyzer,
const ::rtl::OUString& _sUpdateTableName )
@@ -1558,7 +1555,7 @@ sal_Bool ORowSetCache::checkJoin(const Reference< XConnection>& _xConnection,
}
return bOk;
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::clearInsertRow()
{
// we don't unbound the bookmark column
@@ -1574,14 +1571,14 @@ void ORowSetCache::clearInsertRow()
} // for(;aIter != (*m_aInsertRow)->end();++aIter)
}
}
-// -----------------------------------------------------------------------------
+
ORowSetMatrix::iterator ORowSetCache::calcPosition() const
{
sal_Int32 nValue = (m_nPosition - m_nStartPos) - 1;
CHECK_MATRIX_POS(nValue);
return ( nValue < 0 || nValue >= static_cast<sal_Int32>(m_pMatrix->size()) ) ? m_pMatrix->end() : (m_pMatrix->begin() + nValue);
}
-// -----------------------------------------------------------------------------
+
TORowSetOldRowHelperRef ORowSetCache::registerOldRow()
{
@@ -1589,7 +1586,7 @@ TORowSetOldRowHelperRef ORowSetCache::registerOldRow()
m_aOldRows.push_back(pRef);
return pRef;
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::deregisterOldRow(const TORowSetOldRowHelperRef& _rRow)
{
TOldRowSetRows::iterator aOldRowEnd = m_aOldRows.end();
@@ -1603,7 +1600,7 @@ void ORowSetCache::deregisterOldRow(const TORowSetOldRowHelperRef& _rRow)
}
}
-// -----------------------------------------------------------------------------
+
sal_Bool ORowSetCache::reFillMatrix(sal_Int32 _nNewStartPos,sal_Int32 _nNewEndPos)
{
TOldRowSetRows::iterator aOldRowEnd = m_aOldRows.end();
@@ -1618,7 +1615,7 @@ sal_Bool ORowSetCache::reFillMatrix(sal_Int32 _nNewStartPos,sal_Int32 _nNewEndPo
rotateCacheIterator(static_cast<sal_Int16>(m_nFetchSize+1)); // forces that every iterator will be set to null
return bRet;
}
-// -----------------------------------------------------------------------------
+
sal_Bool ORowSetCache::fill(ORowSetMatrix::iterator& _aIter,const ORowSetMatrix::iterator& _aEnd,sal_Int32& _nPos,sal_Bool _bCheck)
{
sal_Int32 nColumnCount = m_xMetaData->getColumnCount();
@@ -1640,12 +1637,12 @@ sal_Bool ORowSetCache::fill(ORowSetMatrix::iterator& _aIter,const ORowSetMatrix:
}
return _bCheck;
}
-// -----------------------------------------------------------------------------
+
bool ORowSetCache::isResultSetChanged() const
{
return m_pCacheSet->isResultSetChanged();
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::reset(const Reference< XResultSet>& _xDriverSet)
{
m_xMetaData.set(Reference< XResultSetMetaDataSupplier >(_xDriverSet,UNO_QUERY)->getMetaData());
@@ -1655,7 +1652,7 @@ void ORowSetCache::reset(const Reference< XResultSet>& _xDriverSet)
m_nRowCount = 0;
reFillMatrix(m_nStartPos+1,m_nEndPos+1);
}
-// -----------------------------------------------------------------------------
+
void ORowSetCache::impl_updateRowFromCache_throw(ORowSetValueVector::Vector& io_aRow
,::std::vector<sal_Int32>& o_ChangedColumns)
{
@@ -1676,6 +1673,4 @@ void ORowSetCache::impl_updateRowFromCache_throw(ORowSetValueVector::Vector& io_
}
}
}
-// -----------------------------------------------------------------------------
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/RowSetCache.hxx b/dbaccess/source/core/api/RowSetCache.hxx
index 24d09dfb0..f161f5186 100644
--- a/dbaccess/source/core/api/RowSetCache.hxx
+++ b/dbaccess/source/core/api/RowSetCache.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/api/RowSetCacheIterator.cxx b/dbaccess/source/core/api/RowSetCacheIterator.cxx
index 744935cda..986a9bb5d 100644
--- a/dbaccess/source/core/api/RowSetCacheIterator.cxx
+++ b/dbaccess/source/core/api/RowSetCacheIterator.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,12 +41,12 @@ ORowSetCacheIterator::ORowSetCacheIterator(const ORowSetCacheIterator& _rRH)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetCacheIterator::ORowSetCacheIterator" );
}
-// -----------------------------------------------------------------------------
+
ORowSetCacheIterator::operator ORowSetMatrix::iterator()
{
return m_aIter->second.aIterator;
}
-// -----------------------------------------------------------------------------
+
ORowSetCacheIterator& ORowSetCacheIterator::operator =(const ORowSetCacheIterator& _rRH)
{
if(this == &_rRH)
@@ -58,18 +58,18 @@ ORowSetCacheIterator& ORowSetCacheIterator::operator =(const ORowSetCacheIterato
return *this;
}
-// -----------------------------------------------------------------------------
+
ORowSetCacheIterator& ORowSetCacheIterator::operator =(const ORowSetMatrix::iterator& _rIter)
{
m_aIter->second.aIterator = _rIter;
return *this;
}
-// -----------------------------------------------------------------------------
+
ORowSetRow& ORowSetCacheIterator::operator *()
{
return *m_aIter->second.aIterator;
}
-// -----------------------------------------------------------------------------
+
const ORowSetRow& ORowSetCacheIterator::operator *() const
{
if ( !m_pRowSet->isInsertRow() && m_aIter->second.aIterator == m_pCache->m_pMatrix->end() )
@@ -80,12 +80,12 @@ const ORowSetRow& ORowSetCacheIterator::operator *() const
}
return *m_aIter->second.aIterator;
}
-// -----------------------------------------------------------------------------
+
ORowSetMatrix::iterator& ORowSetCacheIterator::operator ->()
{
return m_aIter->second.aIterator;
}
-// -----------------------------------------------------------------------------
+
const ORowSetMatrix::iterator& ORowSetCacheIterator::operator ->() const
{
if ( !m_pRowSet->isInsertRow() && m_aIter->second.aIterator == m_pCache->m_pMatrix->end() )
@@ -96,33 +96,33 @@ const ORowSetMatrix::iterator& ORowSetCacheIterator::operator ->() const
}
return m_aIter->second.aIterator;
}
-// -----------------------------------------------------------------------------
+
bool ORowSetCacheIterator::operator <=(const ORowSetMatrix::iterator& _rRH) const
{
return m_aIter->second.aIterator <= _rRH;
}
-// -----------------------------------------------------------------------------
+
bool ORowSetCacheIterator::operator <(const ORowSetMatrix::iterator& _rRH) const
{
return m_aIter->second.aIterator < _rRH;
}
-// -----------------------------------------------------------------------------
+
bool ORowSetCacheIterator::operator !=(const ORowSetMatrix::iterator& _rRH) const
{
return m_aIter->second.aIterator != _rRH;
}
-// -----------------------------------------------------------------------------
+
bool ORowSetCacheIterator::operator ==(const ORowSetMatrix::iterator& _rRH) const
{
return m_aIter->second.aIterator == _rRH;
}
-// -----------------------------------------------------------------------------
+
void ORowSetCacheIterator::setBookmark(const ::com::sun::star::uno::Any& _rBookmark)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetCacheIterator::setBookmark" );
m_aIter->second.aBookmark = _rBookmark;
}
-// -----------------------------------------------------------------------------
+
sal_Bool ORowSetCacheIterator::isNull() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetCacheIterator::isNull" );
@@ -131,7 +131,7 @@ sal_Bool ORowSetCacheIterator::isNull() const
{
ORowSetCacheIterator_Helper aHelper = m_aIter->second;
bRet = ( m_pRowSet->isInsertRow()
- ?
+ ?
m_aIter->second.aIterator == m_pCache->m_pInsertMatrix->end()
:
m_aIter->second.aIterator == m_pCache->m_pMatrix->end()
@@ -139,7 +139,7 @@ sal_Bool ORowSetCacheIterator::isNull() const
}
return bRet;
}
-// -----------------------------------------------------------------------------
+
::osl::Mutex* ORowSetCacheIterator::getMutex() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetCacheIterator::getMutex" );
diff --git a/dbaccess/source/core/api/RowSetCacheIterator.hxx b/dbaccess/source/core/api/RowSetCacheIterator.hxx
index c7ea4bd2f..8ef2f2295 100644
--- a/dbaccess/source/core/api/RowSetCacheIterator.hxx
+++ b/dbaccess/source/core/api/RowSetCacheIterator.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,7 +39,7 @@ namespace dbaccess
::com::sun::star::uno::Any aBookmark;
ORowSetBase* pRowSet;
} ORowSetCacheIterator_Helper;
-
+
DECLARE_STL_STDKEY_MAP(sal_Int32,ORowSetCacheIterator_Helper,ORowSetCacheMap);
class ORowSetCache;
@@ -50,7 +50,7 @@ namespace dbaccess
ORowSetCache* m_pCache;
ORowSetBase* m_pRowSet;
protected:
- ORowSetCacheIterator(const ORowSetCacheMap::iterator& _rIter,ORowSetCache* _pCache,ORowSetBase* _pRowSet)
+ ORowSetCacheIterator(const ORowSetCacheMap::iterator& _rIter,ORowSetCache* _pCache,ORowSetBase* _pRowSet)
: m_aIter(_rIter)
,m_pCache(_pCache)
,m_pRowSet(_pRowSet)
@@ -67,7 +67,7 @@ namespace dbaccess
ORowSetRow& operator *();
const ORowSetRow& operator *() const;
-
+
ORowSetMatrix::iterator& operator ->();
const ORowSetMatrix::iterator& operator ->() const;
@@ -84,5 +84,3 @@ namespace dbaccess
};
}
#endif // DBACCESS_ROWSETCACHEITERATOR_HXX
-
-
diff --git a/dbaccess/source/core/api/RowSetRow.hxx b/dbaccess/source/core/api/RowSetRow.hxx
index ec7786e70..52ecb818c 100644
--- a/dbaccess/source/core/api/RowSetRow.hxx
+++ b/dbaccess/source/core/api/RowSetRow.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,14 +47,10 @@ namespace dbaccess
ORowSetOldRowHelper(const ORowSetOldRowHelper& _rRh);
public:
ORowSetOldRowHelper() : m_refCount(0){}
- ORowSetOldRowHelper(const ORowSetRow& _rRow)
+ ORowSetOldRowHelper(const ORowSetRow& _rRow)
: m_refCount(0)
, m_aRow(_rRow)
{}
-// ORowSetOldRowHelper(const ORowSetOldRowHelper& _rRh)
-// : m_refCount(0)
-// , m_aRow(_rRh.m_aRow)
-// {}
void acquire()
{
@@ -97,4 +93,3 @@ namespace dbaccess
};
}
#endif // DBACCESS_CORE_API_ROWSETROW_HXX
-
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 2840b0fe8..733c3520a 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -104,10 +104,8 @@ namespace BooleanComparisonMode = ::com::sun::star::sdb::BooleanComparisonMode;
#define R_BRACKET ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")"))
#define COMMA ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(","))
-// -------------------------------------------------------------------------
namespace
{
- // .....................................................................
/** parses the given statement, using the given parser, returns a parse node representing
the statement
@@ -241,7 +239,7 @@ namespace
}
DBG_NAME(OSingleSelectQueryComposer)
-// -------------------------------------------------------------------------
+
OSingleSelectQueryComposer::OSingleSelectQueryComposer(const Reference< XNameAccess>& _rxTables,
const Reference< XConnection>& _xConnection,
const ::comphelper::ComponentContext& _rContext )
@@ -292,7 +290,7 @@ OSingleSelectQueryComposer::OSingleSelectQueryComposer(const Reference< XNameAcc
{
}
}
-// -------------------------------------------------------------------------
+
OSingleSelectQueryComposer::~OSingleSelectQueryComposer()
{
DBG_DTOR(OSingleSelectQueryComposer,NULL);
@@ -306,7 +304,7 @@ OSingleSelectQueryComposer::~OSingleSelectQueryComposer()
for(;aTabIter != aTabEnd;++aTabIter)
delete *aTabIter;
}
-// -------------------------------------------------------------------------
+
// OComponentHelper
void SAL_CALL OSingleSelectQueryComposer::disposing(void)
{
@@ -328,7 +326,6 @@ IMPLEMENT_SERVICE_INFO1(OSingleSelectQueryComposer,"org.openoffice.comp.dba.OSin
IMPLEMENT_TYPEPROVIDER3(OSingleSelectQueryComposer,OSubComponent,OSingleSelectQueryComposer_BASE,OPropertyContainer)
IMPLEMENT_PROPERTYCONTAINER_DEFAULTS(OSingleSelectQueryComposer)
-// -------------------------------------------------------------------------
// com::sun::star::lang::XUnoTunnel
sal_Int64 SAL_CALL OSingleSelectQueryComposer::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
@@ -339,7 +336,6 @@ sal_Int64 SAL_CALL OSingleSelectQueryComposer::getSomething( const Sequence< sal
return sal_Int64(0);
}
-// -------------------------------------------------------------------------
// XSingleSelectQueryAnalyzer
::rtl::OUString SAL_CALL OSingleSelectQueryComposer::getQuery( ) throw(RuntimeException)
{
@@ -351,7 +347,6 @@ sal_Int64 SAL_CALL OSingleSelectQueryComposer::getSomething( const Sequence< sal
return getStatementPart(F_tmp,m_aSqlIterator);
}
-// -------------------------------------------------------------------------
void SAL_CALL OSingleSelectQueryComposer::setQuery( const ::rtl::OUString& command ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "frank.schoenheit@sun.com", "OSingleSelectQueryComposer::setQuery" );
@@ -372,9 +367,9 @@ void SAL_CALL OSingleSelectQueryComposer::setQuery( const ::rtl::OUString& comma
for ( SQLPart eLoopParts = Where; eLoopParts != SQLPartCount; incSQLPart( eLoopParts ) )
m_aElementaryParts[ eLoopParts ] = ::rtl::OUString();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OSingleSelectQueryComposer::setCommand( const ::rtl::OUString& Command,sal_Int32 _nCommandType ) throw(SQLException, RuntimeException)
-{
+{
::rtl::OUStringBuffer sSQL;
switch(_nCommandType)
{
@@ -400,7 +395,7 @@ void SAL_CALL OSingleSelectQueryComposer::setCommand( const ::rtl::OUString& Com
{
DBG_UNHANDLED_EXCEPTION();
}
-
+
sSQL.append(dbtools::composeTableNameForSelect(m_xConnection,xTable));
}
else
@@ -413,7 +408,7 @@ void SAL_CALL OSingleSelectQueryComposer::setCommand( const ::rtl::OUString& Com
case CommandType::QUERY:
if ( m_xConnectionQueries->hasByName(Command) )
{
-
+
Reference<XPropertySet> xQuery(m_xConnectionQueries->getByName(Command),UNO_QUERY);
::rtl::OUString sCommand;
xQuery->getPropertyValue(PROPERTY_COMMAND) >>= sCommand;
@@ -425,7 +420,7 @@ void SAL_CALL OSingleSelectQueryComposer::setCommand( const ::rtl::OUString& Com
sMessage.SearchAndReplaceAscii( "$table$", Command );
throwGenericSQLException(sMessage,*this);
}
-
+
break;
default:
break;
@@ -441,16 +436,8 @@ void SAL_CALL OSingleSelectQueryComposer::setCommand( const ::rtl::OUString& Com
::rtl::OUString sCommand = sSQL.makeStringAndClear();
setElementaryQuery(sCommand);
m_sOrignal = sCommand;
-/*
- // reset the additive iterator to the same statement
- parseAndCheck_throwError( m_aSqlParser, m_sOrignal, m_aAdditiveIterator, *this );
-
- // we have no "elementary" parts anymore (means filter/groupby/having/order clauses)
- for ( SQLPart eLoopParts = Where; eLoopParts != SQLPartCount; incSQLPart( eLoopParts ) )
- m_aElementaryParts[ eLoopParts ] = ::rtl::OUString();
-*/
}
-// -----------------------------------------------------------------------------
+
void OSingleSelectQueryComposer::setQuery_Impl( const ::rtl::OUString& command )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "frank.schoenheit@sun.com", "OSingleSelectQueryComposer::setQuery_Impl" );
@@ -460,41 +447,38 @@ void OSingleSelectQueryComposer::setQuery_Impl( const ::rtl::OUString& command )
// strip it from all clauses, to have the pure SELECT statement
m_aPureSelectSQL = getPureSelectStatement( m_aSqlIterator.getParseTree(), m_xConnection );
- // update columns and tables
- // why? Shouldn't this be done on request only?
- // otherwise nothing is working anymore :-)
-// getColumns();
+ // update tables
getTables();
}
-// -----------------------------------------------------------------------------
+
Sequence< Sequence< PropertyValue > > SAL_CALL OSingleSelectQueryComposer::getStructuredHavingClause( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getStructuredHavingClause" );
TGetParseNode F_tmp(&OSQLParseTreeIterator::getSimpleHavingTree);
return getStructuredCondition(F_tmp);
}
-// -------------------------------------------------------------------------
+
Sequence< Sequence< PropertyValue > > SAL_CALL OSingleSelectQueryComposer::getStructuredFilter( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getStructuredFilter" );
TGetParseNode F_tmp(&OSQLParseTreeIterator::getSimpleWhereTree);
return getStructuredCondition(F_tmp);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OSingleSelectQueryComposer::appendHavingClauseByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw (SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::appendHavingClauseByColumn" );
::std::mem_fun1_t<bool,OSingleSelectQueryComposer,::rtl::OUString> F_tmp(&OSingleSelectQueryComposer::implSetHavingClause);
setConditionByColumn(column,andCriteria,F_tmp,filterOperator);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OSingleSelectQueryComposer::appendFilterByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria,sal_Int32 filterOperator ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::appendFilterByColumn" );
::std::mem_fun1_t<bool,OSingleSelectQueryComposer,::rtl::OUString> F_tmp(&OSingleSelectQueryComposer::implSetFilter);
setConditionByColumn(column,andCriteria,F_tmp,filterOperator);
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OSingleSelectQueryComposer::impl_getColumnName_throw(const Reference< XPropertySet >& column)
{
::connectivity::checkDisposed(OSubComponent::rBHelper.bDisposed);
@@ -564,7 +548,7 @@ void SAL_CALL OSingleSelectQueryComposer::appendFilterByColumn( const Reference<
aNewName = getTableAlias(column) + ::dbtools::quoteName(aQuote,aName);
return aNewName;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OSingleSelectQueryComposer::appendOrderByColumn( const Reference< XPropertySet >& column, sal_Bool ascending ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::appendOrderByColumn" );
@@ -580,7 +564,6 @@ void SAL_CALL OSingleSelectQueryComposer::appendOrderByColumn( const Reference<
setOrder(sOrder);
}
-// -------------------------------------------------------------------------
void SAL_CALL OSingleSelectQueryComposer::appendGroupByColumn( const Reference< XPropertySet >& column) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::appendGroupByColumn" );
@@ -591,7 +574,7 @@ void SAL_CALL OSingleSelectQueryComposer::appendGroupByColumn( const Reference<
aComposer.append( sColumnName );
setGroup( aComposer.getComposedAndClear() );
}
-// -------------------------------------------------------------------------
+
::rtl::OUString OSingleSelectQueryComposer::composeStatementFromParts( const ::std::vector< ::rtl::OUString >& _rParts )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::composeStatementFromParts" );
@@ -608,14 +591,12 @@ void SAL_CALL OSingleSelectQueryComposer::appendGroupByColumn( const Reference<
return aSql.makeStringAndClear();
}
-// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL OSingleSelectQueryComposer::getElementaryQuery() throw (::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getElementaryQuery" );
return composeStatementFromParts( m_aElementaryParts );
}
-// -------------------------------------------------------------------------
void SAL_CALL OSingleSelectQueryComposer::setElementaryQuery( const ::rtl::OUString& _rElementary ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "frank.schoenheit@sun.com", "OSingleSelectQueryComposer::setElementaryQuery" );
@@ -650,7 +631,6 @@ void SAL_CALL OSingleSelectQueryComposer::setElementaryQuery( const ::rtl::OUStr
}
}
-// -------------------------------------------------------------------------
namespace
{
::rtl::OUString getComposedClause( const ::rtl::OUString _rElementaryClause, const ::rtl::OUString _rAdditionalClause,
@@ -666,7 +646,6 @@ namespace
}
}
-// -------------------------------------------------------------------------
void OSingleSelectQueryComposer::setSingleAdditiveClause( SQLPart _ePart, const ::rtl::OUString& _rClause )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setSingleAdditiveClause" );
@@ -730,33 +709,30 @@ void OSingleSelectQueryComposer::setSingleAdditiveClause( SQLPart _ePart, const
}
}
-// -------------------------------------------------------------------------
void SAL_CALL OSingleSelectQueryComposer::setFilter( const ::rtl::OUString& filter ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setFilter" );
setSingleAdditiveClause( Where, filter );
}
-// -------------------------------------------------------------------------
void SAL_CALL OSingleSelectQueryComposer::setOrder( const ::rtl::OUString& order ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setOrder" );
setSingleAdditiveClause( Order, order );
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OSingleSelectQueryComposer::setGroup( const ::rtl::OUString& group ) throw (SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setGroup" );
setSingleAdditiveClause( Group, group );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OSingleSelectQueryComposer::setHavingClause( const ::rtl::OUString& filter ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setHavingClause" );
setSingleAdditiveClause( Having, filter );
}
-// -------------------------------------------------------------------------
// XTablesSupplier
Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getTables( ) throw(RuntimeException)
{
@@ -777,7 +753,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getTables( ) thro
return m_pTables;
}
-// -------------------------------------------------------------------------
+
// XColumnsSupplier
Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) throw(RuntimeException)
{
@@ -861,10 +837,10 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
xResultSetMeta.set( xResMetaDataSup->getMetaData(), UNO_QUERY_THROW );
}
}
- catch( const Exception& )
- {
- //@see issue http://qa.openoffice.org/issues/show_bug.cgi?id=110111
- // access returns a different order of column names when executing select * from
+ catch( const Exception& )
+ {
+ //@see issue http://qa.openoffice.org/issues/show_bug.cgi?id=110111
+ // access returns a different order of column names when executing select * from
// and asking the columns from the metadata.
Reference< XParameters > xParameters( xPreparedStatement, UNO_QUERY_THROW );
Reference< XIndexAccess > xPara = getParameters();
@@ -959,11 +935,10 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
if ( !sColumnName.getLength() )
xProp->getPropertyValue(PROPERTY_NAME) >>= sColumnName;
-
aFindName = ::std::find_if(aNames.begin(),aNames.end(),::std::bind2nd(aCaseCompareFunctor,sColumnName));
sal_Int32 j = 0;
while ( aFindName != aNames.end() )
- {
+ {
sColumnName += ::rtl::OUString::valueOf(++j);
aFindName = ::std::find_if(aNames.begin(),aNames.end(),::std::bind2nd(aCaseCompareFunctor,sColumnName));
}
@@ -971,7 +946,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
pColumn->setName(sColumnName);
pColumn->setRealName(sRealName);
pColumn->setTableName(::comphelper::getString(xProp->getPropertyValue(PROPERTY_TABLENAME)));
-
+
(aSelectColumns->get())[i-1] = pColumn;
}
else
@@ -994,7 +969,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
return m_aCurrentColumns[SelectColumns];
}
-// -------------------------------------------------------------------------
+
sal_Bool OSingleSelectQueryComposer::setORCriteria(OSQLParseNode* pCondition, OSQLParseTreeIterator& _rIterator,
::std::vector< ::std::vector < PropertyValue > >& rFilters, const Reference< ::com::sun::star::util::XNumberFormatter > & xFormatter) const
{
@@ -1033,7 +1008,6 @@ sal_Bool OSingleSelectQueryComposer::setORCriteria(OSQLParseNode* pCondition, OS
}
}
-//--------------------------------------------------------------------------------------------------
sal_Bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode * pCondition,
OSQLParseTreeIterator& _rIterator, ::std::vector < PropertyValue >& rFilter, const Reference< XNumberFormatter > & xFormatter) const
{
@@ -1124,7 +1098,7 @@ sal_Bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode * pCondition,
return sal_True;
}
-// -----------------------------------------------------------------------------
+
sal_Int32 OSingleSelectQueryComposer::getPredicateType(OSQLParseNode * _pPredicate) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getPredicateType" );
@@ -1154,7 +1128,7 @@ sal_Int32 OSingleSelectQueryComposer::getPredicateType(OSQLParseNode * _pPredica
}
return nPredicate;
}
-//------------------------------------------------------------------------------
+
sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCondition, OSQLParseTreeIterator& _rIterator,
::std::vector < PropertyValue >& rFilter, const Reference< ::com::sun::star::util::XNumberFormatter > & xFormatter) const
{
@@ -1281,8 +1255,8 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
}
return sal_True;
}
+
// functions for analysing SQL
-//--------------------------------------------------------------------------------------------------
::rtl::OUString OSingleSelectQueryComposer::getColumnName( ::connectivity::OSQLParseNode* pColumnRef, OSQLParseTreeIterator& _rIterator ) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getColumnName" );
@@ -1290,7 +1264,7 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
_rIterator.getColumnRange(pColumnRef,aColumnName,aTableRange);
return aColumnName;
}
-//------------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OSingleSelectQueryComposer::getFilter( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getFilter" );
@@ -1298,7 +1272,7 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
::osl::MutexGuard aGuard( m_aMutex );
return getSQLPart(Where,m_aAdditiveIterator,sal_False);
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OSingleSelectQueryComposer::getOrder( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getOrder" );
@@ -1306,7 +1280,7 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
::osl::MutexGuard aGuard( m_aMutex );
return getSQLPart(Order,m_aAdditiveIterator,sal_False);
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OSingleSelectQueryComposer::getGroup( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getGroup" );
@@ -1314,7 +1288,7 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
::osl::MutexGuard aGuard( m_aMutex );
return getSQLPart(Group,m_aAdditiveIterator,sal_False);
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OSingleSelectQueryComposer::getHavingClause() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getHavingClause" );
@@ -1322,7 +1296,7 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
::osl::MutexGuard aGuard( m_aMutex );
return getSQLPart(Having,m_aAdditiveIterator,sal_False);
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OSingleSelectQueryComposer::getTableAlias(const Reference< XPropertySet >& column) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getTableAlias" );
@@ -1397,7 +1371,7 @@ sal_Bool OSingleSelectQueryComposer::setComparsionPredicate(OSQLParseNode * pCon
}
return sReturn;
}
-// -----------------------------------------------------------------------------
+
Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getParameters( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getParameters" );
@@ -1406,7 +1380,7 @@ Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getParameters( )
{
::vos::ORef< OSQLColumns> aCols = m_aSqlIterator.getParameters();
::std::vector< ::rtl::OUString> aNames;
- OSQLColumns::Vector::const_iterator aEnd = aCols->get().end();
+ OSQLColumns::Vector::const_iterator aEnd = aCols->get().end();
for(OSQLColumns::Vector::const_iterator aIter = aCols->get().begin(); aIter != aEnd;++aIter)
aNames.push_back(getString((*aIter)->getPropertyValue(PROPERTY_NAME)));
m_aCurrentColumns[ParameterColumns] = new OPrivateColumns(aCols,m_xMetaData->supportsMixedCaseQuotedIdentifiers(),*this,m_aMutex,aNames,sal_True);
@@ -1414,7 +1388,7 @@ Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getParameters( )
return m_aCurrentColumns[ParameterColumns];
}
-// -----------------------------------------------------------------------------
+
void OSingleSelectQueryComposer::clearColumns( const EColumnType _eType )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::clearColumns" );
@@ -1426,7 +1400,7 @@ void OSingleSelectQueryComposer::clearColumns( const EColumnType _eType )
m_aCurrentColumns[ _eType ] = NULL;
}
}
-// -----------------------------------------------------------------------------
+
void OSingleSelectQueryComposer::clearCurrentCollections()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::clearCurrentCollections" );
@@ -1449,7 +1423,7 @@ void OSingleSelectQueryComposer::clearCurrentCollections()
m_pTables = NULL;
}
}
-// -----------------------------------------------------------------------------
+
Reference< XIndexAccess > OSingleSelectQueryComposer::setCurrentColumns( EColumnType _eType,
const ::vos::ORef< OSQLColumns >& _rCols )
{
@@ -1461,7 +1435,7 @@ Reference< XIndexAccess > OSingleSelectQueryComposer::setCurrentColumns( EColumn
if ( !m_aCurrentColumns[_eType] )
{
::std::vector< ::rtl::OUString> aNames;
- OSQLColumns::Vector::const_iterator aEnd = _rCols->get().end();
+ OSQLColumns::Vector::const_iterator aEnd = _rCols->get().end();
for(OSQLColumns::Vector::const_iterator aIter = _rCols->get().begin(); aIter != aEnd;++aIter)
aNames.push_back(getString((*aIter)->getPropertyValue(PROPERTY_NAME)));
m_aCurrentColumns[_eType] = new OPrivateColumns(_rCols,m_xMetaData->supportsMixedCaseQuotedIdentifiers(),*this,m_aMutex,aNames,sal_True);
@@ -1469,19 +1443,19 @@ Reference< XIndexAccess > OSingleSelectQueryComposer::setCurrentColumns( EColumn
return m_aCurrentColumns[_eType];
}
-// -----------------------------------------------------------------------------
+
Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getGroupColumns( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getGroupColumns" );
return setCurrentColumns( GroupByColumns, m_aAdditiveIterator.getGroupColumns() );
}
-// -------------------------------------------------------------------------
+
Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getOrderColumns( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getOrderColumns" );
return setCurrentColumns( OrderColumns, m_aAdditiveIterator.getOrderColumns() );
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OSingleSelectQueryComposer::getQueryWithSubstitution( ) throw (SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getQueryWithSubstitution" );
@@ -1500,7 +1474,7 @@ Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getOrderColumns(
return sSqlStatement;
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OSingleSelectQueryComposer::getStatementPart( TGetParseNode& _aGetFunctor, OSQLParseTreeIterator& _rIterator )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getStatementPart" );
@@ -1512,7 +1486,7 @@ Reference< XIndexAccess > SAL_CALL OSingleSelectQueryComposer::getOrderColumns(
return sResult;
}
-// -----------------------------------------------------------------------------
+
namespace
{
::rtl::OUString lcl_getCondition(const Sequence< Sequence< PropertyValue > >& filter )
@@ -1546,19 +1520,19 @@ namespace
return sRet.makeStringAndClear();
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OSingleSelectQueryComposer::setStructuredFilter( const Sequence< Sequence< PropertyValue > >& filter ) throw (SQLException, ::com::sun::star::lang::IllegalArgumentException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setStructuredFilter" );
setFilter(lcl_getCondition(filter));
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OSingleSelectQueryComposer::setStructuredHavingClause( const Sequence< Sequence< PropertyValue > >& filter ) throw (SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setStructuredHavingClause" );
setHavingClause(lcl_getCondition(filter));
}
-// -----------------------------------------------------------------------------
+
void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropertySet >& column, sal_Bool andCriteria ,::std::mem_fun1_t<bool,OSingleSelectQueryComposer,::rtl::OUString>& _aSetFunctor,sal_Int32 filterOperator)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::setConditionByColumn" );
@@ -1624,7 +1598,6 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
aSQL.append( ::dbtools::quoteName( aQuote, aName ) );
}
-
if ( aValue.hasValue() )
{
if( !m_xTypeConverter.is() )
@@ -1636,7 +1609,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
::rtl::OUString sEmpty;
lcl_addFilterCriteria_throw(filterOperator,sEmpty,aSQL);
}
-
+
switch(nType)
{
case DataType::VARCHAR:
@@ -1729,7 +1702,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
// add the filter and the sort order
_aSetFunctor(this,sFilter);
}
-// -----------------------------------------------------------------------------
+
Sequence< Sequence< PropertyValue > > OSingleSelectQueryComposer::getStructuredCondition( TGetParseNode& _aGetFunctor )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getStructuredCondition" );
@@ -1818,7 +1791,7 @@ Sequence< Sequence< PropertyValue > > OSingleSelectQueryComposer::getStructuredC
}
return aFilterSeq;
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OSingleSelectQueryComposer::getKeyword( SQLPart _ePart ) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getKeyword" );
@@ -1844,7 +1817,6 @@ Sequence< Sequence< PropertyValue > > OSingleSelectQueryComposer::getStructuredC
return sKeyword;
}
-// -----------------------------------------------------------------------------
::rtl::OUString OSingleSelectQueryComposer::getSQLPart( SQLPart _ePart, OSQLParseTreeIterator& _rIterator, sal_Bool _bWithKeyword )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getSQLPart" );
@@ -1873,6 +1845,4 @@ Sequence< Sequence< PropertyValue > > OSingleSelectQueryComposer::getStructuredC
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 c93f98e8d..1249dcfdb 100644
--- a/dbaccess/source/core/api/StaticSet.cxx
+++ b/dbaccess/source/core/api/StaticSet.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,34 +52,33 @@ using namespace ::com::sun::star::lang;
// using namespace ::cppu;
using namespace ::osl;
-// -------------------------------------------------------------------------
void OStaticSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 /*_nPosition*/)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::fillValueRow" );
_rRow = *m_aSetIter;
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::sdbcx::XRowLocate
Any SAL_CALL OStaticSet::getBookmark() throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::getBookmark" );
return makeAny(getRow());
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::moveToBookmark" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
return absolute(::comphelper::getINT32(bookmark));
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::moveRelativeToBookmark" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
return absolute(::comphelper::getINT32(bookmark)+rows);
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OStaticSet::compareBookmarks( const Any& _first, const Any& _second ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::compareBookmarks" );
@@ -88,19 +87,19 @@ sal_Int32 SAL_CALL OStaticSet::compareBookmarks( const Any& _first, const Any& _
_second >>= nSecond;
return (nFirst < nSecond) ? CompareBookmark::LESS : ((nFirst > nSecond) ? CompareBookmark::GREATER : CompareBookmark::EQUAL);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::hasOrderedBookmarks" );
return sal_True;
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OStaticSet::hashBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::hashBookmark" );
return ::comphelper::getINT32(bookmark);
}
-// -------------------------------------------------------------------------
+
sal_Bool OStaticSet::fetchRow()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::fetchRow" );
@@ -118,7 +117,7 @@ sal_Bool OStaticSet::fetchRow()
m_bEnd = sal_True;
return bRet;
}
-// -------------------------------------------------------------------------
+
void OStaticSet::fillAllRows()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::fillAllRows" );
@@ -135,7 +134,7 @@ void OStaticSet::fillAllRows()
m_bEnd = sal_True;
}
}
-// -------------------------------------------------------------------------
+
// XResultSet
sal_Bool SAL_CALL OStaticSet::next( ) throw(SQLException, RuntimeException)
{
@@ -154,38 +153,38 @@ sal_Bool SAL_CALL OStaticSet::next( ) throw(SQLException, RuntimeException)
++m_aSetIter;
return !isAfterLast();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::isBeforeFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::isBeforeFirst" );
return m_aSetIter == m_aSet.begin();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::isAfterLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::isAfterLast" );
return m_aSetIter == m_aSet.end() && m_bEnd;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::isFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::isFirst" );
return m_aSetIter == m_aSet.begin()+1;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::isLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::isLast" );
return m_aSetIter == m_aSet.end()-1 && m_bEnd;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::beforeFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::beforeFirst" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
m_aSetIter = m_aSet.begin();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::afterLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::afterLast" );
@@ -193,7 +192,7 @@ void SAL_CALL OStaticSet::afterLast( ) throw(SQLException, RuntimeException)
fillAllRows();
m_aSetIter = m_aSet.end();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::first( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::first" );
@@ -204,17 +203,17 @@ sal_Bool SAL_CALL OStaticSet::first( ) throw(SQLException, RuntimeException)
return m_aSetIter != m_aSet.end();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::last( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::last" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
fillAllRows();
m_aSetIter = m_aSet.end()-1;
-
+
return !isBeforeFirst() && !isAfterLast();
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OStaticSet::getRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::getRow" );
@@ -225,7 +224,7 @@ sal_Int32 SAL_CALL OStaticSet::getRow( ) throw(SQLException, RuntimeException)
OSL_ENSURE(nPos > 0,"RowPos is < 0");
return nPos;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::absolute( sal_Int32 row ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::absolute" );
@@ -255,7 +254,7 @@ sal_Bool SAL_CALL OStaticSet::absolute( sal_Int32 row ) throw(SQLException, Runt
bNext = fetchRow();
}
- if(row > (sal_Int32)m_aSet.size())
+ if(row > (sal_Int32)m_aSet.size())
m_aSetIter = m_aSet.end(); // check again
else
m_aSetIter = m_aSet.begin() + row;
@@ -266,7 +265,7 @@ sal_Bool SAL_CALL OStaticSet::absolute( sal_Int32 row ) throw(SQLException, Runt
return m_aSetIter != m_aSet.end() && m_aSetIter != m_aSet.begin();
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::relative( sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::relative" );
@@ -276,41 +275,41 @@ sal_Bool SAL_CALL OStaticSet::relative( sal_Int32 rows ) throw(SQLException, Run
sal_Int32 nCurPos = getRow();
return absolute(nCurPos+rows);
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::previous( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::previous" );
m_bInserted = m_bUpdated = m_bDeleted = sal_False;
-
+
if(m_aSetIter != m_aSet.begin())
--m_aSetIter;
return m_aSetIter != m_aSet.begin();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::refreshRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::refreshRow" );
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::rowUpdated( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::rowUpdated" );
return m_bUpdated;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::rowInserted( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::rowInserted" );
return m_bInserted;
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL OStaticSet::rowDeleted( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::rowDeleted" );
return m_bDeleted;
}
-// -------------------------------------------------------------------------
+
Sequence< sal_Int32 > SAL_CALL OStaticSet::deleteRows( const Sequence< Any >& rows,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::deleteRows" );
@@ -324,7 +323,7 @@ Sequence< sal_Int32 > SAL_CALL OStaticSet::deleteRows( const Sequence< Any >& ro
}
return aRet;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::insertRow" );
@@ -337,13 +336,13 @@ void SAL_CALL OStaticSet::insertRow( const ORowSetRow& _rInsertRow,const connect
m_bEnd = sal_False;
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::updateRow" );
OCacheSet::updateRow( _rInsertRow,_rOrginalRow,_xTable);
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::deleteRow(const ORowSetRow& _rDeleteRow ,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::deleteRow" );
@@ -356,21 +355,19 @@ void SAL_CALL OStaticSet::deleteRow(const ORowSetRow& _rDeleteRow ,const connect
m_aSet.erase(aPos);
}
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::cancelRowUpdates( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::cancelRowUpdates" );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::moveToInsertRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::moveToInsertRow" );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OStaticSet::moveToCurrentRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStaticSet::moveToCurrentRow" );
}
-// -------------------------------------------------------------------------
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/StaticSet.hxx b/dbaccess/source/core/api/StaticSet.hxx
index b6d41d4f3..f47040908 100644
--- a/dbaccess/source/core/api/StaticSet.hxx
+++ b/dbaccess/source/core/api/StaticSet.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -88,4 +88,3 @@ namespace dbaccess
};
}
#endif //DBACCESS_CORE_API_STATICSET_HXX
-
diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx
index 1ee6be2ac..7fed7d09c 100644
--- a/dbaccess/source/core/api/TableDeco.cxx
+++ b/dbaccess/source/core/api/TableDeco.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -71,7 +71,7 @@ using namespace ::cppu;
//= ODBTableDecorator
//==========================================================================
DBG_NAME(ODBTableDecorator)
-// -----------------------------------------------------------------------------
+
ODBTableDecorator::ODBTableDecorator( const Reference< XConnection >& _rxConnection, const Reference< XColumnsSupplier >& _rxNewTable,
const Reference< XNumberFormatsSupplier >& _rxNumberFormats, const Reference< XNameAccess >& _xColumnDefinitions ) throw(SQLException)
:OTableDescriptor_BASE(m_aMutex)
@@ -88,7 +88,7 @@ ODBTableDecorator::ODBTableDecorator( const Reference< XConnection >& _rxConnect
DBG_CTOR(ODBTableDecorator, NULL);
ODataSettings::registerPropertiesFor(this);
}
-// -------------------------------------------------------------------------
+
ODBTableDecorator::~ODBTableDecorator()
{
DBG_DTOR(ODBTableDecorator, NULL);
@@ -96,7 +96,6 @@ ODBTableDecorator::~ODBTableDecorator()
delete m_pColumns;
}
-//--------------------------------------------------------------------------
Sequence< sal_Int8 > ODBTableDecorator::getImplementationId() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getImplementationId" );
@@ -114,7 +113,6 @@ Sequence< sal_Int8 > ODBTableDecorator::getImplementationId() throw (RuntimeExce
}
// OComponentHelper
-//------------------------------------------------------------------------------
void SAL_CALL ODBTableDecorator::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::disposing" );
@@ -131,7 +129,7 @@ void SAL_CALL ODBTableDecorator::disposing()
m_pColumns->disposing();
m_xColumnMediator = NULL;
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODBTableDecorator::convertFastPropertyValue(
Any & rConvertedValue,
Any & rOldValue,
@@ -139,7 +137,6 @@ sal_Bool SAL_CALL ODBTableDecorator::convertFastPropertyValue(
const Any& rValue )
throw (::com::sun::star::lang::IllegalArgumentException)
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::convertFastPropertyValue" );
sal_Bool bRet = sal_True;
switch(nHandle)
{
@@ -153,25 +150,25 @@ sal_Bool SAL_CALL ODBTableDecorator::convertFastPropertyValue(
case PROPERTY_ID_TEXTLINECOLOR:
case PROPERTY_ID_TEXTEMPHASIS:
case PROPERTY_ID_TEXTRELIEF:
- case PROPERTY_ID_FONTCHARWIDTH:
- case PROPERTY_ID_FONTCHARSET:
- case PROPERTY_ID_FONTFAMILY:
- case PROPERTY_ID_FONTHEIGHT:
- case PROPERTY_ID_FONTKERNING:
- case PROPERTY_ID_FONTNAME:
- case PROPERTY_ID_FONTORIENTATION:
- case PROPERTY_ID_FONTPITCH:
- case PROPERTY_ID_FONTSLANT:
- case PROPERTY_ID_FONTSTRIKEOUT:
- case PROPERTY_ID_FONTSTYLENAME:
- case PROPERTY_ID_FONTUNDERLINE:
- case PROPERTY_ID_FONTWEIGHT:
- case PROPERTY_ID_FONTWIDTH:
+ case PROPERTY_ID_FONTCHARWIDTH:
+ case PROPERTY_ID_FONTCHARSET:
+ case PROPERTY_ID_FONTFAMILY:
+ case PROPERTY_ID_FONTHEIGHT:
+ case PROPERTY_ID_FONTKERNING:
+ case PROPERTY_ID_FONTNAME:
+ case PROPERTY_ID_FONTORIENTATION:
+ case PROPERTY_ID_FONTPITCH:
+ case PROPERTY_ID_FONTSLANT:
+ case PROPERTY_ID_FONTSTRIKEOUT:
+ case PROPERTY_ID_FONTSTYLENAME:
+ case PROPERTY_ID_FONTUNDERLINE:
+ case PROPERTY_ID_FONTWEIGHT:
+ case PROPERTY_ID_FONTWIDTH:
case PROPERTY_ID_FONTWORDLINEMODE:
- case PROPERTY_ID_FONTTYPE:
+ case PROPERTY_ID_FONTTYPE:
bRet = ODataSettings::convertFastPropertyValue(rConvertedValue, rOldValue,nHandle,rValue);
break;
-
+
default:
{
Any aValue;
@@ -182,14 +179,14 @@ sal_Bool SAL_CALL ODBTableDecorator::convertFastPropertyValue(
}
return bRet;
}
-// -----------------------------------------------------------------------------
+
void ODBTableDecorator::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const Any& _rValue) throw (Exception)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::setFastPropertyValue_NoBroadcast" );
switch(_nHandle)
{
case PROPERTY_ID_PRIVILEGES:
- OSL_ENSURE(0,"Property is readonly!");
+ OSL_ENSURE(0,"Property is readonly!");
case PROPERTY_ID_FILTER:
case PROPERTY_ID_ORDER:
case PROPERTY_ID_APPLYFILTER:
@@ -199,22 +196,22 @@ void ODBTableDecorator::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, con
case PROPERTY_ID_TEXTLINECOLOR:
case PROPERTY_ID_TEXTEMPHASIS:
case PROPERTY_ID_TEXTRELIEF:
- case PROPERTY_ID_FONTCHARWIDTH:
- case PROPERTY_ID_FONTCHARSET:
- case PROPERTY_ID_FONTFAMILY:
- case PROPERTY_ID_FONTHEIGHT:
- case PROPERTY_ID_FONTKERNING:
- case PROPERTY_ID_FONTNAME:
- case PROPERTY_ID_FONTORIENTATION:
- case PROPERTY_ID_FONTPITCH:
- case PROPERTY_ID_FONTSLANT:
- case PROPERTY_ID_FONTSTRIKEOUT:
- case PROPERTY_ID_FONTSTYLENAME:
- case PROPERTY_ID_FONTUNDERLINE:
- case PROPERTY_ID_FONTWEIGHT:
- case PROPERTY_ID_FONTWIDTH:
+ case PROPERTY_ID_FONTCHARWIDTH:
+ case PROPERTY_ID_FONTCHARSET:
+ case PROPERTY_ID_FONTFAMILY:
+ case PROPERTY_ID_FONTHEIGHT:
+ case PROPERTY_ID_FONTKERNING:
+ case PROPERTY_ID_FONTNAME:
+ case PROPERTY_ID_FONTORIENTATION:
+ case PROPERTY_ID_FONTPITCH:
+ case PROPERTY_ID_FONTSLANT:
+ case PROPERTY_ID_FONTSTRIKEOUT:
+ case PROPERTY_ID_FONTSTYLENAME:
+ case PROPERTY_ID_FONTUNDERLINE:
+ case PROPERTY_ID_FONTWEIGHT:
+ case PROPERTY_ID_FONTWIDTH:
case PROPERTY_ID_FONTWORDLINEMODE:
- case PROPERTY_ID_FONTTYPE:
+ case PROPERTY_ID_FONTTYPE:
ODataSettings::setFastPropertyValue_NoBroadcast(_nHandle, _rValue);
break;
@@ -250,10 +247,10 @@ void ODBTableDecorator::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, con
break;
}
}
-//------------------------------------------------------------------------------
+
void ODBTableDecorator::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getFastPropertyValue" );
+
switch(_nHandle)
{
case PROPERTY_ID_PRIVILEGES:
@@ -269,7 +266,7 @@ void ODBTableDecorator::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) c
}
}
// run through
-
+
case PROPERTY_ID_FILTER:
case PROPERTY_ID_ORDER:
case PROPERTY_ID_APPLYFILTER:
@@ -279,22 +276,22 @@ void ODBTableDecorator::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) c
case PROPERTY_ID_TEXTLINECOLOR:
case PROPERTY_ID_TEXTEMPHASIS:
case PROPERTY_ID_TEXTRELIEF:
- case PROPERTY_ID_FONTCHARWIDTH:
- case PROPERTY_ID_FONTCHARSET:
- case PROPERTY_ID_FONTFAMILY:
- case PROPERTY_ID_FONTHEIGHT:
- case PROPERTY_ID_FONTKERNING:
- case PROPERTY_ID_FONTNAME:
- case PROPERTY_ID_FONTORIENTATION:
- case PROPERTY_ID_FONTPITCH:
- case PROPERTY_ID_FONTSLANT:
- case PROPERTY_ID_FONTSTRIKEOUT:
- case PROPERTY_ID_FONTSTYLENAME:
- case PROPERTY_ID_FONTUNDERLINE:
- case PROPERTY_ID_FONTWEIGHT:
- case PROPERTY_ID_FONTWIDTH:
+ case PROPERTY_ID_FONTCHARWIDTH:
+ case PROPERTY_ID_FONTCHARSET:
+ case PROPERTY_ID_FONTFAMILY:
+ case PROPERTY_ID_FONTHEIGHT:
+ case PROPERTY_ID_FONTKERNING:
+ case PROPERTY_ID_FONTNAME:
+ case PROPERTY_ID_FONTORIENTATION:
+ case PROPERTY_ID_FONTPITCH:
+ case PROPERTY_ID_FONTSLANT:
+ case PROPERTY_ID_FONTSTRIKEOUT:
+ case PROPERTY_ID_FONTSTYLENAME:
+ case PROPERTY_ID_FONTUNDERLINE:
+ case PROPERTY_ID_FONTWEIGHT:
+ case PROPERTY_ID_FONTWIDTH:
case PROPERTY_ID_FONTWORDLINEMODE:
- case PROPERTY_ID_FONTTYPE:
+ case PROPERTY_ID_FONTTYPE:
ODataSettings::getFastPropertyValue(_rValue, _nHandle);
break;
case PROPERTY_ID_CATALOGNAME:
@@ -331,7 +328,7 @@ void ODBTableDecorator::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) c
OSL_ENSURE(0,"Invalid Handle for table");
}
}
-// -------------------------------------------------------------------------
+
void ODBTableDecorator::construct()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::construct" );
@@ -346,13 +343,12 @@ void ODBTableDecorator::construct()
registerProperty(PROPERTY_PRIVILEGES, PROPERTY_ID_PRIVILEGES, PropertyAttribute::BOUND | PropertyAttribute::READONLY,
&m_nPrivileges, ::getCppuType(static_cast<sal_Int32*>(NULL)));
}
-// -----------------------------------------------------------------------------
+
::cppu::IPropertyArrayHelper* ODBTableDecorator::createArrayHelper(sal_Int32 /*_nId*/) const
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::createArrayHelper" );
Reference<XPropertySet> xProp(m_xTable,UNO_QUERY);
Reference<XPropertySetInfo> xInfo = xProp->getPropertySetInfo();
-
+
Sequence< Property > aTableProps = xInfo->getProperties();
Property* pIter = aTableProps.getArray();
Property* pEnd = pIter + aTableProps.getLength();
@@ -373,13 +369,12 @@ void ODBTableDecorator::construct()
}
describeProperties(aTableProps);
-
- return new ::cppu::OPropertyArrayHelper(aTableProps);
+
+ return new ::cppu::OPropertyArrayHelper(aTableProps);
}
-// -----------------------------------------------------------------------------
-::cppu::IPropertyArrayHelper & SAL_CALL ODBTableDecorator::getInfoHelper()
+
+::cppu::IPropertyArrayHelper & SAL_CALL ODBTableDecorator::getInfoHelper()
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getInfoHelper" );
Reference<XPropertySet> xProp(m_xTable,UNO_QUERY);
Reference<XPropertySetInfo> xInfo = xProp->getPropertySetInfo();
@@ -395,39 +390,35 @@ void ODBTableDecorator::construct()
// property set infos: Depending on the table for which we act as decorator, different property
// sets might exist.
}
-// -------------------------------------------------------------------------
+
// XServiceInfo
IMPLEMENT_SERVICE_INFO1(ODBTableDecorator, "com.sun.star.sdb.dbaccess.ODBTableDecorator", SERVICE_SDBCX_TABLE)
-// -------------------------------------------------------------------------
+
Any SAL_CALL ODBTableDecorator::queryInterface( const Type & rType ) throw(RuntimeException)
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::queryInterface" );
Any aRet;
if(m_xTable.is())
{
aRet = m_xTable->queryInterface(rType);
- if(aRet.hasValue())
+ if(aRet.hasValue())
{ // now we know that our table supports this type so we return ourself
aRet = OTableDescriptor_BASE::queryInterface(rType);
if(!aRet.hasValue())
- aRet = ODataSettings::queryInterface(rType);
+ aRet = ODataSettings::queryInterface(rType);
}
}
return aRet;
}
-// -------------------------------------------------------------------------
+
Sequence< Type > SAL_CALL ODBTableDecorator::getTypes( ) throw(RuntimeException)
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getTypes" );
Reference<XTypeProvider> xTypes(m_xTable,UNO_QUERY);
OSL_ENSURE(xTypes.is(),"Table must be a TypePropvider!");
return xTypes->getTypes();
}
-// -----------------------------------------------------------------------------
// XRename,
-//------------------------------------------------------------------------------
void SAL_CALL ODBTableDecorator::rename( const ::rtl::OUString& _rNewName ) throw(SQLException, ElementExistException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::rename" );
@@ -446,7 +437,6 @@ void SAL_CALL ODBTableDecorator::rename( const ::rtl::OUString& _rNewName ) thro
}
// XAlterTable,
-//------------------------------------------------------------------------------
void SAL_CALL ODBTableDecorator::alterColumnByName( const ::rtl::OUString& _rName, const Reference< XPropertySet >& _rxDescriptor ) throw(SQLException, NoSuchElementException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::alterColumnByName" );
@@ -463,7 +453,6 @@ void SAL_CALL ODBTableDecorator::alterColumnByName( const ::rtl::OUString& _rNam
m_pColumns->refresh();
}
-//------------------------------------------------------------------------------
void SAL_CALL ODBTableDecorator::alterColumnByIndex( sal_Int32 _nIndex, const Reference< XPropertySet >& _rxDescriptor ) throw(SQLException, IndexOutOfBoundsException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::alterColumnByIndex" );
@@ -479,7 +468,7 @@ void SAL_CALL ODBTableDecorator::alterColumnByIndex( sal_Int32 _nIndex, const Re
else // not supported
throw SQLException(DBACORE_RESSTRING(RID_STR_COLUMN_ALTER_BY_INDEX),*this,SQLSTATE_GENERAL,1000,Any() );
}
-// -----------------------------------------------------------------------------
+
Reference< XNameAccess> ODBTableDecorator::getIndexes() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getIndexes" );
@@ -487,7 +476,7 @@ Reference< XNameAccess> ODBTableDecorator::getIndexes() throw (RuntimeException)
::connectivity::checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
return Reference< XIndexesSupplier>(m_xTable,UNO_QUERY)->getIndexes();
}
-// -------------------------------------------------------------------------
+
Reference< XIndexAccess> ODBTableDecorator::getKeys() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getKeys" );
@@ -495,7 +484,7 @@ Reference< XIndexAccess> ODBTableDecorator::getKeys() throw (RuntimeException)
::connectivity::checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
return Reference< XKeysSupplier>(m_xTable,UNO_QUERY)->getKeys();
}
-// -------------------------------------------------------------------------
+
Reference< XNameAccess> ODBTableDecorator::getColumns() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getColumns" );
@@ -507,7 +496,7 @@ Reference< XNameAccess> ODBTableDecorator::getColumns() throw (RuntimeException)
return m_pColumns;
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL ODBTableDecorator::getName() throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getName" );
@@ -517,7 +506,7 @@ Reference< XNameAccess> ODBTableDecorator::getColumns() throw (RuntimeException)
OSL_ENSURE(xName.is(),"Table should support the XNamed interface");
return xName->getName();
}
-// -----------------------------------------------------------------------------
+
sal_Int64 SAL_CALL ODBTableDecorator::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getSomething" );
@@ -530,7 +519,7 @@ sal_Int64 SAL_CALL ODBTableDecorator::getSomething( const Sequence< sal_Int8 >&
nRet = xTunnel->getSomething(rId);
return nRet;
}
-// -----------------------------------------------------------------------------
+
Sequence< sal_Int8 > ODBTableDecorator::getUnoTunnelImplementationId()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getUnoTunnelImplementationId" );
@@ -546,7 +535,7 @@ Sequence< sal_Int8 > ODBTableDecorator::getUnoTunnelImplementationId()
}
return pId->getImplementationId();
}
-// -----------------------------------------------------------------------------
+
void ODBTableDecorator::fillPrivileges() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::fillPrivileges" );
@@ -577,7 +566,7 @@ void ODBTableDecorator::fillPrivileges() const
DBG_ERROR("ODBTableDecorator::ODBTableDecorator : could not collect the privileges !");
}
}
-// -----------------------------------------------------------------------------
+
Reference< XPropertySet > SAL_CALL ODBTableDecorator::createDataDescriptor( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::createDataDescriptor" );
@@ -597,13 +586,13 @@ Reference< XPropertySet > SAL_CALL ODBTableDecorator::createDataDescriptor( ) t
NULL
);
}
-// -----------------------------------------------------------------------------
+
Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL ODBTableDecorator::getPropertySetInfo( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getPropertySetInfo" );
return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
}
-// -----------------------------------------------------------------------------
+
void ODBTableDecorator::refreshColumns()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::refreshColumns" );
@@ -611,7 +600,7 @@ void ODBTableDecorator::refreshColumns()
::connectivity::checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
::std::vector< ::rtl::OUString> aVector;
-
+
Reference<XNameAccess> xNames;
if(m_xTable.is())
{
@@ -636,12 +625,12 @@ void ODBTableDecorator::refreshColumns()
OContainerMediator* pMediator = new OContainerMediator( pCol, m_xColumnDefinitions, m_xConnection, OContainerMediator::eColumns );
m_xColumnMediator = pMediator;
pCol->setMediator( pMediator );
- m_pColumns = pCol;
+ m_pColumns = pCol;
}
else
m_pColumns->reFill(aVector);
}
-// -----------------------------------------------------------------------------
+
OColumn* ODBTableDecorator::createColumn(const ::rtl::OUString& _rName) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::createColumn" );
@@ -665,13 +654,13 @@ OColumn* ODBTableDecorator::createColumn(const ::rtl::OUString& _rName) const
}
return pReturn;
}
-// -----------------------------------------------------------------------------
+
void ODBTableDecorator::columnAppended( const Reference< XPropertySet >& /*_rxSourceDescriptor*/ )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::columnAppended" );
// not interested in
}
-// -----------------------------------------------------------------------------
+
void ODBTableDecorator::columnDropped(const ::rtl::OUString& _sName)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::columnDropped" );
@@ -680,7 +669,6 @@ void ODBTableDecorator::columnDropped(const ::rtl::OUString& _sName)
xDrop->dropByName(_sName);
}
-// -----------------------------------------------------------------------------
Reference< XPropertySet > ODBTableDecorator::createColumnDescriptor()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::createColumnDescriptor" );
@@ -692,25 +680,20 @@ Reference< XPropertySet > ODBTableDecorator::createColumnDescriptor()
xRet = new OTableColumnDescriptorWrapper( xNames->createDataDescriptor(), false, true );
return xRet;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODBTableDecorator::acquire() throw()
{
OTableDescriptor_BASE::acquire();
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODBTableDecorator::release() throw()
{
OTableDescriptor_BASE::release();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODBTableDecorator::setName( const ::rtl::OUString& /*aName*/ ) throw (::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "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 60b508851..9557f195a 100644
--- a/dbaccess/source/core/api/View.cxx
+++ b/dbaccess/source/core/api/View.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,10 +48,8 @@
#include <tools/diagnose_ex.h>
#include <unotools/sharedunocomponent.hxx>
-//........................................................................
namespace dbaccess
{
-//........................................................................
/** === begin UNO using === **/
using namespace ::com::sun::star::uno;
@@ -79,7 +77,6 @@ namespace dbaccess
//====================================================================
//= View
//====================================================================
- //--------------------------------------------------------------------
View::View( const Reference< XConnection >& _rxConnection, sal_Bool _bCaseSensitive,
const ::rtl::OUString& _rCatalogName,const ::rtl::OUString& _rSchemaName, const ::rtl::OUString& _rName )
:View_Base( _bCaseSensitive, _rName, _rxConnection->getMetaData(), 0, ::rtl::OUString(), _rSchemaName, _rCatalogName )
@@ -97,15 +94,13 @@ namespace dbaccess
}
}
- //--------------------------------------------------------------------
View::~View()
{
}
- //--------------------------------------------------------------------
IMPLEMENT_FORWARD_REFCOUNT( View, View_Base )
IMPLEMENT_GET_IMPLEMENTATION_ID( View )
- // -------------------------------------------------------------------------
+
Any SAL_CALL View::queryInterface( const Type & _rType ) throw(RuntimeException)
{
if(_rType == getCppuType( (Reference<XAlterView>*)0) && !m_xViewAccess.is() )
@@ -115,14 +110,14 @@ namespace dbaccess
aReturn = View_IBASE::queryInterface( _rType );
return aReturn;
}
- // -------------------------------------------------------------------------
+
Sequence< Type > SAL_CALL View::getTypes( ) throw(RuntimeException)
{
Type aAlterType = getCppuType( (Reference<XAlterView>*)0);
Sequence< Type > aTypes( ::comphelper::concatSequences(View_Base::getTypes(),View_IBASE::getTypes()) );
::std::vector<Type> aOwnTypes;
- aOwnTypes.reserve(aTypes.getLength());
+ aOwnTypes.reserve(aTypes.getLength());
const Type* pIter = aTypes.getConstArray();
const Type* pEnd = pIter + aTypes.getLength();
@@ -131,19 +126,17 @@ namespace dbaccess
if( (*pIter != aAlterType || m_xViewAccess.is()) )
aOwnTypes.push_back(*pIter);
}
-
+
Type* pTypes = aOwnTypes.empty() ? 0 : &aOwnTypes[0];
return Sequence< Type >(pTypes, aOwnTypes.size());
}
- //--------------------------------------------------------------------
void SAL_CALL View::alterCommand( const ::rtl::OUString& _rNewCommand ) throw (SQLException, RuntimeException)
{
OSL_ENSURE(m_xViewAccess.is(),"Illegal call to AlterView!");
m_xViewAccess->alterCommand(this,_rNewCommand);
}
- //--------------------------------------------------------------------
void SAL_CALL View::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
{
if ( _nHandle == m_nCommandHandle && m_xViewAccess.is() )
@@ -156,9 +149,6 @@ namespace dbaccess
View_Base::getFastPropertyValue( _rValue, _nHandle );
}
- // -----------------------------------------------------------------------------
-//........................................................................
-} // 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 6872b3a96..3634b2853 100644
--- a/dbaccess/source/core/api/WrappedResultSet.cxx
+++ b/dbaccess/source/core/api/WrappedResultSet.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -61,7 +61,7 @@ void WrappedResultSet::construct(const Reference< XResultSet>& _xDriverSet,const
m_xRowLocate.set(_xDriverSet,UNO_QUERY_THROW);
m_xUpdRow.set(_xDriverSet,UNO_QUERY_THROW);
}
-// -----------------------------------------------------------------------------
+
Any SAL_CALL WrappedResultSet::getBookmark() throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::getBookmark" );
@@ -71,37 +71,37 @@ Any SAL_CALL WrappedResultSet::getBookmark() throw(SQLException, RuntimeExceptio
}
return makeAny(m_xDriverSet->getRow());
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL WrappedResultSet::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::moveToBookmark" );
return m_xRowLocate->moveToBookmark( bookmark );
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL WrappedResultSet::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::moveRelativeToBookmark" );
return m_xRowLocate->moveRelativeToBookmark( bookmark,rows );
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL WrappedResultSet::compareBookmarks( const Any& _first, const Any& _second ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::compareBookmarks" );
return m_xRowLocate->compareBookmarks( _first,_second );
}
-// -------------------------------------------------------------------------
+
sal_Bool SAL_CALL WrappedResultSet::hasOrderedBookmarks( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::hasOrderedBookmarks" );
return m_xRowLocate->hasOrderedBookmarks();
}
-// -------------------------------------------------------------------------
+
sal_Int32 SAL_CALL WrappedResultSet::hashBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::hashBookmark" );
return m_xRowLocate->hashBookmark(bookmark);
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::sdbcx::XDeleteRows
Sequence< sal_Int32 > SAL_CALL WrappedResultSet::deleteRows( const Sequence< Any >& rows ,const connectivity::OSQLTable& /*_xTable*/) throw(SQLException, RuntimeException)
{
@@ -113,7 +113,7 @@ Sequence< sal_Int32 > SAL_CALL WrappedResultSet::deleteRows( const Sequence< Any
}
return Sequence< sal_Int32 >();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL WrappedResultSet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::insertRow" );
@@ -129,7 +129,7 @@ void SAL_CALL WrappedResultSet::insertRow( const ORowSetRow& _rInsertRow,const c
m_xUpd->insertRow();
(*_rInsertRow->get().begin()) = getBookmark();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL WrappedResultSet::updateRow(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rOrginalRow,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::updateRow" );
@@ -143,37 +143,37 @@ void SAL_CALL WrappedResultSet::updateRow(const ORowSetRow& _rInsertRow ,const O
}
m_xUpd->updateRow();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL WrappedResultSet::deleteRow(const ORowSetRow& /*_rDeleteRow*/ ,const connectivity::OSQLTable& /*_xTable*/ ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::deleteRow" );
m_xUpd->deleteRow();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL WrappedResultSet::cancelRowUpdates( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::cancelRowUpdates" );
m_xUpd->cancelRowUpdates();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL WrappedResultSet::moveToInsertRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::moveToInsertRow" );
m_xUpd->moveToInsertRow();
}
-// -------------------------------------------------------------------------
+
void SAL_CALL WrappedResultSet::moveToCurrentRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::moveToCurrentRow" );
m_xUpd->moveToCurrentRow();
}
-// -------------------------------------------------------------------------
+
void WrappedResultSet::fillValueRow(ORowSetRow& _rRow,sal_Int32 _nPosition)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::fillValueRow" );
OCacheSet::fillValueRow(_rRow,_nPosition);
}
-// -------------------------------------------------------------------------
+
void WrappedResultSet::updateColumn(sal_Int32 nPos,Reference< XRowUpdate > _xParameter,const ORowSetValue& _rValue)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "WrappedResultSet::updateColumn" );
@@ -253,5 +253,4 @@ void WrappedResultSet::updateColumn(sal_Int32 nPos,Reference< XRowUpdate > _xPar
}
}
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/WrappedResultSet.hxx b/dbaccess/source/core/api/WrappedResultSet.hxx
index df4353042..1bba37764 100644
--- a/dbaccess/source/core/api/WrappedResultSet.hxx
+++ b/dbaccess/source/core/api/WrappedResultSet.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/api/callablestatement.cxx b/dbaccess/source/core/api/callablestatement.cxx
index 287254163..bced7ba11 100644
--- a/dbaccess/source/core/api/callablestatement.cxx
+++ b/dbaccess/source/core/api/callablestatement.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,7 +46,6 @@ using namespace ::cppu;
using namespace ::osl;
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > OCallableStatement::getTypes() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getTypes" );
@@ -57,7 +56,6 @@ Sequence< Type > OCallableStatement::getTypes() throw (RuntimeException)
return aTypes.getTypes();
}
-//--------------------------------------------------------------------------
Sequence< sal_Int8 > OCallableStatement::getImplementationId() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getImplementationId" );
@@ -75,7 +73,6 @@ Sequence< sal_Int8 > OCallableStatement::getImplementationId() throw (RuntimeExc
}
// com::sun::star::uno::XInterface
-//--------------------------------------------------------------------------
Any OCallableStatement::queryInterface( const Type & rType ) throw (RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::queryInterface" );
@@ -88,27 +85,23 @@ Any OCallableStatement::queryInterface( const Type & rType ) throw (RuntimeExcep
return aIface;
}
-//--------------------------------------------------------------------------
void OCallableStatement::acquire() throw ()
{
OPreparedStatement::acquire();
}
-//--------------------------------------------------------------------------
void OCallableStatement::release() throw ()
{
OPreparedStatement::release();
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OCallableStatement::getImplementationName( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getImplementationName" );
return rtl::OUString::createFromAscii("com.sun.star.sdb.OCallableStatement");
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OCallableStatement::getSupportedServiceNames( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getSupportedServiceNames" );
@@ -119,19 +112,16 @@ Sequence< ::rtl::OUString > OCallableStatement::getSupportedServiceNames( ) thr
}
// XOutParameters
-//------------------------------------------------------------------------------
void SAL_CALL OCallableStatement::registerOutParameter( sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& typeName ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::registerOutParameter" );
MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(OComponentHelper::rBHelper.bDisposed);
-
Reference< XOutParameters >(m_xAggregateAsSet, UNO_QUERY)->registerOutParameter( parameterIndex, sqlType, typeName );
}
-//------------------------------------------------------------------------------
void SAL_CALL OCallableStatement::registerNumericOutParameter( sal_Int32 parameterIndex, sal_Int32 sqlType, sal_Int32 scale ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::registerNumericOutParameter" );
@@ -142,7 +132,6 @@ void SAL_CALL OCallableStatement::registerNumericOutParameter( sal_Int32 paramet
}
// XRow
-//------------------------------------------------------------------------------
sal_Bool SAL_CALL OCallableStatement::wasNull( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::wasNull" );
@@ -152,7 +141,6 @@ sal_Bool SAL_CALL OCallableStatement::wasNull( ) throw(SQLException, RuntimeExc
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->wasNull();
}
-//------------------------------------------------------------------------------
::rtl::OUString SAL_CALL OCallableStatement::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getString" );
@@ -162,7 +150,6 @@ sal_Bool SAL_CALL OCallableStatement::wasNull( ) throw(SQLException, RuntimeExc
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getString( columnIndex );
}
-//------------------------------------------------------------------------------
sal_Bool SAL_CALL OCallableStatement::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getBoolean" );
@@ -172,7 +159,6 @@ sal_Bool SAL_CALL OCallableStatement::getBoolean( sal_Int32 columnIndex ) throw(
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getBoolean( columnIndex );
}
-//------------------------------------------------------------------------------
sal_Int8 SAL_CALL OCallableStatement::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getByte" );
@@ -182,7 +168,6 @@ sal_Int8 SAL_CALL OCallableStatement::getByte( sal_Int32 columnIndex ) throw(SQL
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getByte( columnIndex );
}
-//------------------------------------------------------------------------------
sal_Int16 SAL_CALL OCallableStatement::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getShort" );
@@ -191,7 +176,6 @@ sal_Int16 SAL_CALL OCallableStatement::getShort( sal_Int32 columnIndex ) throw(S
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getShort( columnIndex );
}
-//------------------------------------------------------------------------------
sal_Int32 SAL_CALL OCallableStatement::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getInt" );
@@ -200,7 +184,6 @@ sal_Int32 SAL_CALL OCallableStatement::getInt( sal_Int32 columnIndex ) throw(SQL
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getInt( columnIndex );
}
-//------------------------------------------------------------------------------
sal_Int64 SAL_CALL OCallableStatement::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getLong" );
@@ -209,7 +192,6 @@ sal_Int64 SAL_CALL OCallableStatement::getLong( sal_Int32 columnIndex ) throw(SQ
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getLong( columnIndex );
}
-//------------------------------------------------------------------------------
float SAL_CALL OCallableStatement::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getFloat" );
@@ -218,7 +200,6 @@ float SAL_CALL OCallableStatement::getFloat( sal_Int32 columnIndex ) throw(SQLEx
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getFloat( columnIndex );
}
-//------------------------------------------------------------------------------
double SAL_CALL OCallableStatement::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getDouble" );
@@ -227,7 +208,6 @@ double SAL_CALL OCallableStatement::getDouble( sal_Int32 columnIndex ) throw(SQL
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getDouble( columnIndex );
}
-//------------------------------------------------------------------------------
Sequence< sal_Int8 > SAL_CALL OCallableStatement::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getBytes" );
@@ -236,7 +216,6 @@ Sequence< sal_Int8 > SAL_CALL OCallableStatement::getBytes( sal_Int32 columnInde
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getBytes( columnIndex );
}
-//------------------------------------------------------------------------------
::com::sun::star::util::Date SAL_CALL OCallableStatement::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getDate" );
@@ -245,7 +224,6 @@ Sequence< sal_Int8 > SAL_CALL OCallableStatement::getBytes( sal_Int32 columnInde
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getDate( columnIndex );
}
-//------------------------------------------------------------------------------
::com::sun::star::util::Time SAL_CALL OCallableStatement::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getTime" );
@@ -254,7 +232,6 @@ Sequence< sal_Int8 > SAL_CALL OCallableStatement::getBytes( sal_Int32 columnInde
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getTime( columnIndex );
}
-//------------------------------------------------------------------------------
::com::sun::star::util::DateTime SAL_CALL OCallableStatement::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getTimestamp" );
@@ -264,7 +241,6 @@ Sequence< sal_Int8 > SAL_CALL OCallableStatement::getBytes( sal_Int32 columnInde
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getTimestamp( columnIndex );
}
-//------------------------------------------------------------------------------
Reference< ::com::sun::star::io::XInputStream > SAL_CALL OCallableStatement::getBinaryStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getBinaryStream" );
@@ -274,7 +250,6 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL OCallableStatement::get
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getBinaryStream( columnIndex );
}
-//------------------------------------------------------------------------------
Reference< ::com::sun::star::io::XInputStream > SAL_CALL OCallableStatement::getCharacterStream( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getCharacterStream" );
@@ -284,7 +259,6 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL OCallableStatement::get
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getCharacterStream( columnIndex );
}
-//------------------------------------------------------------------------------
Any SAL_CALL OCallableStatement::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& typeMap ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getObject" );
@@ -294,7 +268,6 @@ Any SAL_CALL OCallableStatement::getObject( sal_Int32 columnIndex, const Referen
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getObject( columnIndex, typeMap );
}
-//------------------------------------------------------------------------------
Reference< XRef > SAL_CALL OCallableStatement::getRef( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getRef" );
@@ -303,7 +276,6 @@ Reference< XRef > SAL_CALL OCallableStatement::getRef( sal_Int32 columnIndex ) t
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getRef( columnIndex );
}
-//------------------------------------------------------------------------------
Reference< XBlob > SAL_CALL OCallableStatement::getBlob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getBlob" );
@@ -312,7 +284,6 @@ Reference< XBlob > SAL_CALL OCallableStatement::getBlob( sal_Int32 columnIndex )
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getBlob( columnIndex );
}
-//------------------------------------------------------------------------------
Reference< XClob > SAL_CALL OCallableStatement::getClob( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getClob" );
@@ -321,7 +292,6 @@ Reference< XClob > SAL_CALL OCallableStatement::getClob( sal_Int32 columnIndex )
return Reference< XRow >(m_xAggregateAsSet, UNO_QUERY)->getClob( columnIndex );
}
-//------------------------------------------------------------------------------
Reference< XArray > SAL_CALL OCallableStatement::getArray( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCallableStatement::getArray" );
diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx
index cf6c92d2d..b56bb6acb 100644
--- a/dbaccess/source/core/api/column.cxx
+++ b/dbaccess/source/core/api/column.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -78,7 +78,6 @@ DBG_NAME(OColumn)
//============================================================
//= OColumn
//============================================================
-//--------------------------------------------------------------------------
OColumn::OColumn( const bool _bNameIsReadOnly )
:OColumnBase( m_aMutex )
,::comphelper::OPropertyContainer( OColumnBase::rBHelper )
@@ -89,14 +88,12 @@ OColumn::OColumn( const bool _bNameIsReadOnly )
&m_sName, ::getCppuType( &m_sName ) );
}
-//--------------------------------------------------------------------------
OColumn::~OColumn()
{
DBG_DTOR(OColumn, NULL);
}
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > OColumn::getTypes() throw (RuntimeException)
{
return ::comphelper::concatSequences(
@@ -109,19 +106,16 @@ Sequence< Type > OColumn::getTypes() throw (RuntimeException)
IMPLEMENT_FORWARD_XINTERFACE2( OColumn, OColumnBase, ::comphelper::OPropertyContainer )
// ::com::sun::star::lang::XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OColumn::getImplementationName( ) throw(RuntimeException)
{
return rtl::OUString::createFromAscii("com.sun.star.sdb.OColumn");
}
-//------------------------------------------------------------------------------
sal_Bool OColumn::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OColumn::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 1 );
@@ -130,49 +124,42 @@ Sequence< ::rtl::OUString > OColumn::getSupportedServiceNames( ) throw (Runtime
}
// OComponentHelper
-//------------------------------------------------------------------------------
void OColumn::disposing()
{
OPropertyContainer::disposing();
}
// com::sun::star::beans::XPropertySet
-//------------------------------------------------------------------------------
Reference< XPropertySetInfo > OColumn::getPropertySetInfo() throw (RuntimeException)
{
return createPropertySetInfo( getInfoHelper() ) ;
}
-// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL OColumn::getName( ) throw(::com::sun::star::uno::RuntimeException)
{
return m_sName;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OColumn::setName( const ::rtl::OUString& _rName ) throw(::com::sun::star::uno::RuntimeException)
{
m_sName = _rName;
}
-// -----------------------------------------------------------------------------
void OColumn::fireValueChange(const ::connectivity::ORowSetValue& /*_rOldValue*/)
{
DBG_ERROR( "OColumn::fireValueChange: not implemented!" );
}
-//------------------------------------------------------------------------------
void OColumn::registerProperty( const ::rtl::OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void* _pPointerToMember, const Type& _rMemberType )
{
::comphelper::OPropertyContainer::registerProperty( _rName, _nHandle, _nAttributes, _pPointerToMember, _rMemberType );
}
-//------------------------------------------------------------------------------
void OColumn::registerMayBeVoidProperty( const ::rtl::OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, Any* _pPointerToMember, const Type& _rExpectedType )
{
::comphelper::OPropertyContainer::registerMayBeVoidProperty( _rName, _nHandle, _nAttributes, _pPointerToMember, _rExpectedType );
}
-//------------------------------------------------------------------------------
void OColumn::registerPropertyNoMember( const ::rtl::OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const Type& _rType, const void* _pInitialValue )
{
::comphelper::OPropertyContainer::registerPropertyNoMember( _rName, _nHandle, _nAttributes, _rType, _pInitialValue );
@@ -183,7 +170,6 @@ void OColumn::registerPropertyNoMember( const ::rtl::OUString& _rName, sal_Int32
//============================================================
DBG_NAME(OColumns);
-//--------------------------------------------------------------------------
OColumns::OColumns(::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,
sal_Bool _bCaseSensitive,const ::std::vector< ::rtl::OUString> &_rVector,
@@ -204,7 +190,6 @@ OColumns::OColumns(::cppu::OWeakObject& _rParent,
DBG_CTOR(OColumns, NULL);
}
-// -------------------------------------------------------------------------
OColumns::OColumns(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxDrvColumns,
sal_Bool _bCaseSensitive,const ::std::vector< ::rtl::OUString> &_rVector,
@@ -224,26 +209,23 @@ OColumns::OColumns(::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex,
{
DBG_CTOR(OColumns, NULL);
}
-//--------------------------------------------------------------------------
+
OColumns::~OColumns()
{
DBG_DTOR(OColumns, NULL);
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OColumns::getImplementationName( ) throw(RuntimeException)
{
return rtl::OUString::createFromAscii("com.sun.star.sdb.OColumns");
}
-//------------------------------------------------------------------------------
sal_Bool OColumns::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OColumns::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 1 );
@@ -272,7 +254,6 @@ void OColumns::clearColumns()
disposing();
}
-// -----------------------------------------------------------------------------
void SAL_CALL OColumns::disposing(void)
{
MutexGuard aGuard(m_rMutex);
@@ -282,14 +263,12 @@ void SAL_CALL OColumns::disposing(void)
OColumns_BASE::disposing();
}
-// -------------------------------------------------------------------------
void OColumns::impl_refresh() throw(::com::sun::star::uno::RuntimeException)
{
if (m_pRefreshColumns)
m_pRefreshColumns->refreshColumns();
}
-// -------------------------------------------------------------------------
connectivity::sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _rName)
{
OSL_ENSURE(m_pColFactoryImpl, "OColumns::createObject: no column factory!");
@@ -309,7 +288,7 @@ connectivity::sdbcx::ObjectType OColumns::createObject(const ::rtl::OUString& _r
return xRet;
}
-// -------------------------------------------------------------------------
+
Reference< XPropertySet > OColumns::createDescriptor()
{
if ( m_pColFactoryImpl )
@@ -323,16 +302,16 @@ Reference< XPropertySet > OColumns::createDescriptor()
else
return Reference< XPropertySet >();
}
-// -------------------------------------------------------------------------
+
Any SAL_CALL OColumns::queryInterface( const Type & rType ) throw(RuntimeException)
{
Any aRet;
if(m_xDrvColumns.is())
{
aRet = m_xDrvColumns->queryInterface(rType);
- if ( aRet.hasValue() )
+ if ( aRet.hasValue() )
aRet = OColumns_BASE::queryInterface( rType);
- if ( !aRet.hasValue() )
+ if ( !aRet.hasValue() )
aRet = TXChild::queryInterface( rType);
return aRet;
}
@@ -345,11 +324,11 @@ Any SAL_CALL OColumns::queryInterface( const Type & rType ) throw(RuntimeExcepti
}
aRet = OColumns_BASE::queryInterface( rType);
- if ( !aRet.hasValue() )
+ if ( !aRet.hasValue() )
aRet = TXChild::queryInterface( rType);
return aRet;
}
-// -------------------------------------------------------------------------
+
Sequence< Type > SAL_CALL OColumns::getTypes( ) throw(RuntimeException)
{
sal_Bool bAppendFound = sal_False,bDropFound = sal_False;
@@ -400,7 +379,7 @@ Sequence< Type > SAL_CALL OColumns::getTypes( ) throw(RuntimeException)
}
return aRet;
}
-// -------------------------------------------------------------------------
+
// XAppend
sdbcx::ObjectType OColumns::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
@@ -438,7 +417,7 @@ sdbcx::ObjectType OColumns::appendObject( const ::rtl::OUString& _rForName, cons
return xReturn;
}
-// -------------------------------------------------------------------------
+
// XDrop
void OColumns::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
{
@@ -466,19 +445,16 @@ void OColumns::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
::dbaccess::notifyDataSourceModified(m_xParent,sal_True);
}
-// -----------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OColumns::getParent( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_rMutex);
return m_xParent;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OColumns::setParent( const Reference< XInterface >& _xParent ) throw (NoSupportException, RuntimeException)
{
::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 b6a0e5328..ca978e39a 100644
--- a/dbaccess/source/core/api/columnsettings.cxx
+++ b/dbaccess/source/core/api/columnsettings.cxx
@@ -1,7 +1,7 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -68,20 +68,18 @@ namespace dbaccess
//= OColumnSettings
//==============================================================================
DBG_NAME( OColumnSettings )
- //------------------------------------------------------------------------------
+
OColumnSettings::OColumnSettings()
:m_bHidden(sal_False)
{
DBG_CTOR( OColumnSettings, NULL );
}
- //------------------------------------------------------------------------------
OColumnSettings::~OColumnSettings()
{
DBG_DTOR( OColumnSettings, NULL );
}
- //------------------------------------------------------------------------------
void OColumnSettings::registerProperties( IPropertyContainer& _rPropertyContainer )
{
const sal_Int32 nBoundAttr = PropertyAttribute::BOUND;
@@ -100,7 +98,6 @@ namespace dbaccess
_rPropertyContainer.registerProperty( PROPERTY_HIDDEN, PROPERTY_ID_HIDDEN, nBoundAttr, &m_bHidden, ::getCppuType( &m_bHidden ) );
}
- //------------------------------------------------------------------------------
bool OColumnSettings::isColumnSettingProperty( const sal_Int32 _nPropertyHandle )
{
return ( _nPropertyHandle == PROPERTY_ID_ALIGN )
@@ -113,7 +110,6 @@ namespace dbaccess
|| ( _nPropertyHandle == PROPERTY_ID_HIDDEN );
}
- //------------------------------------------------------------------------------
bool OColumnSettings::isDefaulted( const sal_Int32 _nPropertyHandle, const Any& _rPropertyValue )
{
switch ( _nPropertyHandle )
@@ -140,7 +136,6 @@ namespace dbaccess
return sal_False;
}
- //------------------------------------------------------------------------------
bool OColumnSettings::hasDefaultSettings( const Reference< XPropertySet >& _rxColumn )
{
ENSURE_OR_THROW( _rxColumn.is(), "illegal column" );
diff --git a/dbaccess/source/core/api/datacolumn.cxx b/dbaccess/source/core/api/datacolumn.cxx
index f837fd5e3..706ecace3 100644
--- a/dbaccess/source/core/api/datacolumn.cxx
+++ b/dbaccess/source/core/api/datacolumn.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,7 +50,7 @@ using namespace ::comphelper;
using namespace ::cppu;
DBG_NAME(ODataColumn)
-//--------------------------------------------------------------------------
+
ODataColumn::ODataColumn(
const Reference < XResultSetMetaData >& _xMetaData,
const Reference < XRow >& _xRow,
@@ -63,14 +63,13 @@ ODataColumn::ODataColumn(
{
DBG_CTOR(ODataColumn,NULL);
}
-// -----------------------------------------------------------------------------
+
ODataColumn::~ODataColumn()
{
DBG_DTOR(ODataColumn,NULL);
}
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > ODataColumn::getTypes() throw (RuntimeException)
{
OTypeCollection aTypes(::getCppuType( (const Reference< XColumn > *)0 ),
@@ -79,7 +78,6 @@ Sequence< Type > ODataColumn::getTypes() throw (RuntimeException)
return aTypes.getTypes();
}
-//--------------------------------------------------------------------------
Sequence< sal_Int8 > ODataColumn::getImplementationId() throw (RuntimeException)
{
static OImplementationId * pId = 0;
@@ -95,7 +93,6 @@ Sequence< sal_Int8 > ODataColumn::getImplementationId() throw (RuntimeException)
return pId->getImplementationId();
}
-//------------------------------------------------------------------------------
Any SAL_CALL ODataColumn::queryInterface( const Type & _rType ) throw (RuntimeException)
{
Any aReturn = OResultColumn::queryInterface(_rType);
@@ -108,13 +105,11 @@ Any SAL_CALL ODataColumn::queryInterface( const Type & _rType ) throw (RuntimeEx
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString ODataColumn::getImplementationName( ) throw(RuntimeException)
{
return rtl::OUString::createFromAscii("com.sun.star.sdb.ODataColumn");
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > ODataColumn::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 3 );
@@ -125,7 +120,6 @@ Sequence< ::rtl::OUString > ODataColumn::getSupportedServiceNames( ) throw (Run
}
// OComponentHelper
-//------------------------------------------------------------------------------
void ODataColumn::disposing()
{
OResultColumn::disposing();
@@ -135,16 +129,14 @@ void ODataColumn::disposing()
}
// ::com::sun::star::sdb::XColumn
-//------------------------------------------------------------------------------
sal_Bool ODataColumn::wasNull(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(!m_xRow.is());
-
+
return m_xRow->wasNull();
}
-//------------------------------------------------------------------------------
rtl::OUString ODataColumn::getString(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -153,7 +145,6 @@ rtl::OUString ODataColumn::getString(void) throw( SQLException, RuntimeException
return m_xRow->getString(m_nPos);
}
-//------------------------------------------------------------------------------
sal_Bool ODataColumn::getBoolean(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -162,7 +153,6 @@ sal_Bool ODataColumn::getBoolean(void) throw( SQLException, RuntimeException )
return m_xRow->getBoolean(m_nPos);
}
-//------------------------------------------------------------------------------
sal_Int8 ODataColumn::getByte(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -171,7 +161,6 @@ sal_Int8 ODataColumn::getByte(void) throw( SQLException, RuntimeException )
return m_xRow->getByte(m_nPos);
}
-//------------------------------------------------------------------------------
sal_Int16 ODataColumn::getShort(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -180,7 +169,6 @@ sal_Int16 ODataColumn::getShort(void) throw( SQLException, RuntimeException )
return m_xRow->getShort(m_nPos);
}
-//------------------------------------------------------------------------------
sal_Int32 ODataColumn::getInt(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -189,7 +177,6 @@ sal_Int32 ODataColumn::getInt(void) throw( SQLException, RuntimeException )
return m_xRow->getInt(m_nPos);
}
-//------------------------------------------------------------------------------
sal_Int64 ODataColumn::getLong(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -198,7 +185,6 @@ sal_Int64 ODataColumn::getLong(void) throw( SQLException, RuntimeException )
return m_xRow->getLong(m_nPos);
}
-//------------------------------------------------------------------------------
float ODataColumn::getFloat(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -206,7 +192,7 @@ float ODataColumn::getFloat(void) throw( SQLException, RuntimeException )
return m_xRow->getFloat(m_nPos);
}
-//------------------------------------------------------------------------------
+
double ODataColumn::getDouble(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -215,7 +201,6 @@ double ODataColumn::getDouble(void) throw( SQLException, RuntimeException )
return m_xRow->getDouble(m_nPos);
}
-//------------------------------------------------------------------------------
Sequence< sal_Int8 > ODataColumn::getBytes(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -223,7 +208,7 @@ Sequence< sal_Int8 > ODataColumn::getBytes(void) throw( SQLException, RuntimeExc
return m_xRow->getBytes(m_nPos);
}
-//------------------------------------------------------------------------------
+
com::sun::star::util::Date ODataColumn::getDate(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -232,7 +217,6 @@ com::sun::star::util::Date ODataColumn::getDate(void) throw( SQLException, Runti
return m_xRow->getDate(m_nPos);
}
-//------------------------------------------------------------------------------
com::sun::star::util::Time ODataColumn::getTime(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -240,7 +224,7 @@ com::sun::star::util::Time ODataColumn::getTime(void) throw( SQLException, Runti
return m_xRow->getTime(m_nPos);
}
-//------------------------------------------------------------------------------
+
com::sun::star::util::DateTime ODataColumn::getTimestamp(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -249,7 +233,6 @@ com::sun::star::util::DateTime ODataColumn::getTimestamp(void) throw( SQLExcepti
return m_xRow->getTimestamp(m_nPos);
}
-//------------------------------------------------------------------------------
Reference< ::com::sun::star::io::XInputStream > ODataColumn::getBinaryStream(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -258,7 +241,6 @@ Reference< ::com::sun::star::io::XInputStream > ODataColumn::getBinaryStream(vo
return m_xRow->getBinaryStream(m_nPos);
}
-//------------------------------------------------------------------------------
Reference< ::com::sun::star::io::XInputStream > ODataColumn::getCharacterStream(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -267,7 +249,6 @@ Reference< ::com::sun::star::io::XInputStream > ODataColumn::getCharacterStream
return m_xRow->getCharacterStream(m_nPos);
}
-//------------------------------------------------------------------------------
Any ODataColumn::getObject(const Reference< ::com::sun::star::container::XNameAccess > & typeMap) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -276,7 +257,6 @@ Any ODataColumn::getObject(const Reference< ::com::sun::star::container::XNameAc
return m_xRow->getObject(m_nPos, typeMap);
}
-//------------------------------------------------------------------------------
Reference< XRef > ODataColumn::getRef(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -285,7 +265,6 @@ Reference< XRef > ODataColumn::getRef(void) throw( SQLException, RuntimeExcepti
return m_xRow->getRef(m_nPos);
}
-//------------------------------------------------------------------------------
Reference< XBlob > ODataColumn::getBlob(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -294,7 +273,6 @@ Reference< XBlob > ODataColumn::getBlob(void) throw( SQLException, RuntimeExcep
return m_xRow->getBlob(m_nPos);
}
-//------------------------------------------------------------------------------
Reference< XClob > ODataColumn::getClob(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -303,7 +281,6 @@ Reference< XClob > ODataColumn::getClob(void) throw( SQLException, RuntimeExcep
return m_xRow->getClob(m_nPos);
}
-//------------------------------------------------------------------------------
Reference< XArray > ODataColumn::getArray(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -313,7 +290,6 @@ Reference< XArray > ODataColumn::getArray(void) throw( SQLException, RuntimeExc
}
// ::com::sun::star::sdb::XColumnUpdate
-//------------------------------------------------------------------------------
void ODataColumn::updateNull(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -322,7 +298,6 @@ void ODataColumn::updateNull(void) throw( SQLException, RuntimeException )
m_xRowUpdate->updateNull(m_nPos);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateBoolean(sal_Bool x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -331,7 +306,6 @@ void ODataColumn::updateBoolean(sal_Bool x) throw( SQLException, RuntimeExceptio
m_xRowUpdate->updateBoolean(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateByte(sal_Int8 x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -340,7 +314,6 @@ void ODataColumn::updateByte(sal_Int8 x) throw( SQLException, RuntimeException )
m_xRowUpdate->updateByte(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateShort(sal_Int16 x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -349,7 +322,6 @@ void ODataColumn::updateShort(sal_Int16 x) throw( SQLException, RuntimeException
m_xRowUpdate->updateShort(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateInt(sal_Int32 x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -358,7 +330,6 @@ void ODataColumn::updateInt(sal_Int32 x) throw( SQLException, RuntimeException )
m_xRowUpdate->updateInt(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateLong(sal_Int64 x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -367,7 +338,6 @@ void ODataColumn::updateLong(sal_Int64 x) throw( SQLException, RuntimeException
m_xRowUpdate->updateLong(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateFloat(float x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -376,7 +346,6 @@ void ODataColumn::updateFloat(float x) throw( SQLException, RuntimeException )
m_xRowUpdate->updateFloat(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateDouble(double x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -385,7 +354,6 @@ void ODataColumn::updateDouble(double x) throw( SQLException, RuntimeException )
m_xRowUpdate->updateDouble(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateString(const rtl::OUString& x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -394,7 +362,6 @@ void ODataColumn::updateString(const rtl::OUString& x) throw( SQLException, Runt
m_xRowUpdate->updateString(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateBytes(const Sequence< sal_Int8 >& x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -403,7 +370,6 @@ void ODataColumn::updateBytes(const Sequence< sal_Int8 >& x) throw( SQLException
m_xRowUpdate->updateBytes(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateDate(const com::sun::star::util::Date& x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -412,7 +378,6 @@ void ODataColumn::updateDate(const com::sun::star::util::Date& x) throw( SQLExce
m_xRowUpdate->updateDate(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateTime(const ::com::sun::star::util::Time& x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -421,7 +386,6 @@ void ODataColumn::updateTime(const ::com::sun::star::util::Time& x) throw( SQLEx
m_xRowUpdate->updateTime(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateTimestamp(const ::com::sun::star::util::DateTime& x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -430,7 +394,6 @@ void ODataColumn::updateTimestamp(const ::com::sun::star::util::DateTime& x) thr
m_xRowUpdate->updateTimestamp(m_nPos, x);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateCharacterStream(const Reference< ::com::sun::star::io::XInputStream > & x, sal_Int32 length) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -439,7 +402,6 @@ void ODataColumn::updateCharacterStream(const Reference< ::com::sun::star::io::X
m_xRowUpdate->updateCharacterStream(m_nPos, x, length);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateBinaryStream(const Reference< ::com::sun::star::io::XInputStream > & x, sal_Int32 length) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -448,7 +410,6 @@ void ODataColumn::updateBinaryStream(const Reference< ::com::sun::star::io::XInp
m_xRowUpdate->updateBinaryStream(m_nPos, x, length);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateNumericObject(const Any& x, sal_Int32 scale) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
@@ -457,13 +418,11 @@ void ODataColumn::updateNumericObject(const Any& x, sal_Int32 scale) throw( SQLE
m_xRowUpdate->updateNumericObject(m_nPos, x, scale);
}
-//------------------------------------------------------------------------------
void ODataColumn::updateObject(const Any& x) throw( SQLException, RuntimeException )
{
MutexGuard aGuard( m_aMutex );
::connectivity::checkDisposed(!m_xRowUpdate.is());
-
+
m_xRowUpdate->updateObject(m_nPos, x);
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/datacolumn.hxx b/dbaccess/source/core/api/datacolumn.hxx
index 6e772a5c5..c4a132470 100644
--- a/dbaccess/source/core/api/datacolumn.hxx
+++ b/dbaccess/source/core/api/datacolumn.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/api/datasettings.cxx b/dbaccess/source/core/api/datasettings.cxx
index 85d10b5c5..085f99ecf 100644
--- a/dbaccess/source/core/api/datasettings.cxx
+++ b/dbaccess/source/core/api/datasettings.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,13 +51,11 @@ using namespace ::com::sun::star::beans;
using namespace ::comphelper;
using namespace ::cppu;
-//........................................................................
namespace dbaccess
{
//==========================================================================
//= ODataSettings
//==========================================================================
-//--------------------------------------------------------------------------
void ODataSettings::registerPropertiesFor(ODataSettings_Base* _pItem)
{
if ( m_bQuery )
@@ -113,7 +111,6 @@ void ODataSettings::registerPropertiesFor(ODataSettings_Base* _pItem)
registerProperty(PROPERTY_FONTTYPE, PROPERTY_ID_FONTTYPE, PropertyAttribute::BOUND,&_pItem->m_aFont.Type, ::getCppuType(&_pItem->m_aFont.Type));
}
-//--------------------------------------------------------------------------
ODataSettings::ODataSettings(OBroadcastHelper& _rBHelper,sal_Bool _bQuery)
:OPropertyStateContainer(_rBHelper)
,ODataSettings_Base()
@@ -121,7 +118,6 @@ ODataSettings::ODataSettings(OBroadcastHelper& _rBHelper,sal_Bool _bQuery)
{
}
-//--------------------------------------------------------------------------
ODataSettings_Base::ODataSettings_Base()
:m_bApplyFilter(sal_False)
,m_aFont(::comphelper::getDefaultFont())
@@ -130,7 +126,6 @@ ODataSettings_Base::ODataSettings_Base()
{
}
-//--------------------------------------------------------------------------
ODataSettings_Base::ODataSettings_Base(const ODataSettings_Base& _rSource)
:m_sFilter( _rSource.m_sFilter )
,m_sHavingClause( _rSource.m_sHavingClause )
@@ -146,12 +141,10 @@ ODataSettings_Base::ODataSettings_Base(const ODataSettings_Base& _rSource)
{
}
-// -----------------------------------------------------------------------------
ODataSettings_Base::~ODataSettings_Base()
{
}
-// -----------------------------------------------------------------------------
void ODataSettings::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefault ) const
{
static ::com::sun::star::awt::FontDescriptor aFD = ::comphelper::getDefaultFont();
@@ -203,7 +196,7 @@ void ODataSettings::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefau
_rDefault <<= aFD.Weight;
break;
case PROPERTY_ID_FONTSLANT:
- _rDefault <<= aFD.Slant;
+ _rDefault <<= aFD.Slant;
break;
case PROPERTY_ID_FONTUNDERLINE:
_rDefault <<= aFD.Underline;
@@ -225,8 +218,6 @@ void ODataSettings::getPropertyDefaultByHandle( sal_Int32 _nHandle, Any& _rDefau
break;
}
}
-//........................................................................
-} // namespace dbaccess
-//........................................................................
+} // 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 c1be4188b..a85fb9190 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -68,7 +68,6 @@ using namespace dbaccess;
//============================================================
IMPLEMENT_FORWARD_XINTERFACE2(OTableColumnDescriptor,OColumn,TXChild)
-//------------------------------------------------------------------------------
void OTableColumnDescriptor::impl_registerProperties()
{
sal_Int32 nDefaultAttr = m_bActAsDescriptor ? 0 : PropertyAttribute::READONLY;
@@ -91,17 +90,14 @@ void OTableColumnDescriptor::impl_registerProperties()
OColumnSettings::registerProperties( *this );
}
-//--------------------------------------------------------------------------
IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnDescriptor )
// ::com::sun::star::lang::XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OTableColumnDescriptor::getImplementationName( ) throw (RuntimeException)
{
return rtl::OUString::createFromAscii("com.sun.star.sdb.OTableColumnDescriptor");
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OTableColumnDescriptor::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 2 );
@@ -111,7 +107,6 @@ Sequence< ::rtl::OUString > OTableColumnDescriptor::getSupportedServiceNames( )
}
// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OTableColumnDescriptor::createArrayHelper( ) const
{
Sequence< Property > aProps;
@@ -120,26 +115,23 @@ Sequence< ::rtl::OUString > OTableColumnDescriptor::getSupportedServiceNames( )
}
// cppu::OPropertySetHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OTableColumnDescriptor::getInfoHelper()
{
return *static_cast< ::comphelper::OPropertyArrayUsageHelper< OTableColumnDescriptor >* >(this)->getArrayHelper();
}
-//------------------------------------------------------------------------------
void OTableColumnDescriptor::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception)
{
OColumn::setFastPropertyValue_NoBroadcast( nHandle, rValue );
::dbaccess::notifyDataSourceModified( m_xParent, sal_True );
}
-// -----------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OTableColumnDescriptor::getParent( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
return m_xParent;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OTableColumnDescriptor::setParent( const Reference< XInterface >& _xParent ) throw (NoSupportException, RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -150,7 +142,6 @@ void SAL_CALL OTableColumnDescriptor::setParent( const Reference< XInterface >&
//============================================================
DBG_NAME(OTableColumn);
-// -------------------------------------------------------------------------
OTableColumn::OTableColumn( const ::rtl::OUString& _rName )
:OTableColumnDescriptor( false /* do not act as descriptor */ )
{
@@ -158,28 +149,23 @@ OTableColumn::OTableColumn( const ::rtl::OUString& _rName )
m_sName = _rName;
}
-// -----------------------------------------------------------------------------
OTableColumn::~OTableColumn()
{
DBG_DTOR(OTableColumn,NULL);
}
-//--------------------------------------------------------------------------
IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumn )
-//------------------------------------------------------------------------------
rtl::OUString OTableColumn::getImplementationName( ) throw (RuntimeException)
{
return rtl::OUString::createFromAscii("com.sun.star.sdb.OTableColumn");
}
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& SAL_CALL OTableColumn::getInfoHelper()
{
return *OTableColumn_PBase::getArrayHelper();
}
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OTableColumn::createArrayHelper( ) const
{
return OTableColumnDescriptor::createArrayHelper();
@@ -190,7 +176,6 @@ rtl::OUString OTableColumn::getImplementationName( ) throw (RuntimeException)
// =========================================================================
DBG_NAME( OQueryColumn );
-// -------------------------------------------------------------------------
OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, const Reference< XConnection >& _rxConnection,const ::rtl::OUString i_sLabel )
:OTableColumnDescriptor( false /* do not act as descriptor */ )
,m_sLabel(i_sLabel)
@@ -212,7 +197,7 @@ OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, co
OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_ISAUTOINCREMENT ) >>= m_bAutoIncrement );
OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_ISCURRENCY ) >>= m_bCurrency );
OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_NAME ) >>= m_sName );
-
+
m_bRowVersion = sal_False;
Reference< XPropertySetInfo > xPSI( _rxParserColumn->getPropertySetInfo(), UNO_SET_THROW );
@@ -246,13 +231,11 @@ OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, co
osl_decrementInterlockedCount( &m_refCount );
}
-//--------------------------------------------------------------------------
OQueryColumn::~OQueryColumn()
{
DBG_DTOR( OQueryColumn, NULL );
}
-//--------------------------------------------------------------------------
Reference< XPropertySet > OQueryColumn::impl_determineOriginalTableColumn( const Reference< XConnection >& _rxConnection )
{
OSL_PRECOND( _rxConnection.is(), "OQueryColumn::impl_determineOriginalTableColumn: illegal connection!" );
@@ -297,28 +280,23 @@ Reference< XPropertySet > OQueryColumn::impl_determineOriginalTableColumn( const
return xOriginalTableColumn;
}
-//--------------------------------------------------------------------------
IMPLEMENT_GET_IMPLEMENTATION_ID( OQueryColumn )
-//--------------------------------------------------------------------------
::rtl::OUString SAL_CALL OQueryColumn::getImplementationName( ) throw(RuntimeException)
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.dbaccess.OQueryColumn" ) );
}
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& SAL_CALL OQueryColumn::getInfoHelper()
{
return *OQueryColumn_PBase::getArrayHelper();
}
-//--------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OQueryColumn::createArrayHelper() const
{
return OTableColumnDescriptor::createArrayHelper();
}
-//--------------------------------------------------------------------------
void SAL_CALL OQueryColumn::getFastPropertyValue( Any& _rValue, sal_Int32 _nHandle ) const
{
OTableColumnDescriptor::getFastPropertyValue( _rValue, _nHandle );
@@ -355,7 +333,7 @@ void SAL_CALL OQueryColumn::getFastPropertyValue( Any& _rValue, sal_Int32 _nHand
//= OColumnWrapper
//==========================================================================
DBG_NAME(OColumnWrapper);
-//--------------------------------------------------------------------------
+
OColumnWrapper::OColumnWrapper( const Reference< XPropertySet > & rCol, const bool _bNameIsReadOnly )
:OColumn( _bNameIsReadOnly )
,m_xAggregate(rCol)
@@ -376,13 +354,12 @@ OColumnWrapper::OColumnWrapper( const Reference< XPropertySet > & rCol, const bo
m_xAggregate->getPropertyValue(PROPERTY_NAME) >>= m_sName;
}
}
-// -----------------------------------------------------------------------------
+
OColumnWrapper::~OColumnWrapper()
{
DBG_DTOR(OColumnWrapper,NULL);
}
-//------------------------------------------------------------------------------
::rtl::OUString OColumnWrapper::impl_getPropertyNameFromHandle( const sal_Int32 _nHandle ) const
{
::rtl::OUString sPropName;
@@ -392,7 +369,6 @@ OColumnWrapper::~OColumnWrapper()
return sPropName;
}
-//------------------------------------------------------------------------------
void OColumnWrapper::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
// derived classes are free to either use the OPropertyContainer(Helper) mechanisms for properties,
@@ -408,7 +384,6 @@ void OColumnWrapper::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons
}
}
-//------------------------------------------------------------------------------
sal_Bool OColumnWrapper::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle,
const Any& rValue ) throw (IllegalArgumentException)
{
@@ -429,7 +404,6 @@ sal_Bool OColumnWrapper::convertFastPropertyValue( Any & rConvertedValue, Any &
return bModified;
}
-//------------------------------------------------------------------------------
void OColumnWrapper::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception)
{
if ( OColumn::isRegisteredProperty( nHandle ) )
@@ -442,7 +416,6 @@ void OColumnWrapper::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const
}
}
-// -----------------------------------------------------------------------------
sal_Int64 SAL_CALL OColumnWrapper::getSomething( const Sequence< sal_Int8 >& aIdentifier ) throw(RuntimeException)
{
Reference< XUnoTunnel > xTunnel( m_xAggregate, UNO_QUERY);
@@ -454,7 +427,6 @@ sal_Int64 SAL_CALL OColumnWrapper::getSomething( const Sequence< sal_Int8 >& aId
//============================================================
//= OTableColumnDescriptorWrapper
//============================================================
-//--------------------------------------------------------------------------
OTableColumnDescriptorWrapper::OTableColumnDescriptorWrapper( const Reference< XPropertySet >& _rCol, const bool _bPureWrap, const bool _bIsDescriptor )
:OColumnWrapper( _rCol, !_bIsDescriptor )
,m_bPureWrap( _bPureWrap )
@@ -465,17 +437,14 @@ OTableColumnDescriptorWrapper::OTableColumnDescriptorWrapper( const Reference< X
}
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnDescriptorWrapper )
// ::com::sun::star::lang::XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OTableColumnDescriptorWrapper::getImplementationName( ) throw (RuntimeException)
{
return rtl::OUString::createFromAscii("com.sun.star.sdb.OTableColumnDescriptorWrapper");
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 2 );
@@ -485,7 +454,6 @@ Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNa
}
// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OTableColumnDescriptorWrapper::createArrayHelper( sal_Int32 nId ) const
{
const sal_Int32 nHaveAlways = 7;
@@ -553,13 +521,11 @@ Sequence< ::rtl::OUString > OTableColumnDescriptorWrapper::getSupportedServiceNa
}
// cppu::OPropertySetHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OTableColumnDescriptorWrapper::getInfoHelper()
{
return *static_cast< OIdPropertyArrayUsageHelper< OTableColumnDescriptorWrapper >* >(this)->getArrayHelper(m_nColTypeID);
}
-//------------------------------------------------------------------------------
void OTableColumnDescriptorWrapper::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
if ( m_bPureWrap )
@@ -572,7 +538,6 @@ void OTableColumnDescriptorWrapper::getFastPropertyValue( Any& rValue, sal_Int32
}
}
-//------------------------------------------------------------------------------
sal_Bool OTableColumnDescriptorWrapper::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle, const Any& rValue ) throw (IllegalArgumentException)
{
sal_Bool bModified(sal_False);
@@ -597,7 +562,6 @@ sal_Bool OTableColumnDescriptorWrapper::convertFastPropertyValue( Any & rConvert
return bModified;
}
-//------------------------------------------------------------------------------
void OTableColumnDescriptorWrapper::setFastPropertyValue_NoBroadcast(
sal_Int32 nHandle,
const Any& rValue
@@ -617,7 +581,6 @@ void OTableColumnDescriptorWrapper::setFastPropertyValue_NoBroadcast(
//============================================================
//= OTableColumnWrapper
//============================================================
-//--------------------------------------------------------------------------
OTableColumnWrapper::OTableColumnWrapper( const Reference< XPropertySet >& rCol, const Reference< XPropertySet >& _xColDefintion,
const bool _bPureWrap )
:OTableColumnDescriptorWrapper( rCol, _bPureWrap, false )
@@ -637,21 +600,17 @@ OTableColumnWrapper::OTableColumnWrapper( const Reference< XPropertySet >& rCol,
osl_decrementInterlockedCount( &m_refCount );
}
-//--------------------------------------------------------------------------
OTableColumnWrapper::~OTableColumnWrapper()
{
}
-//--------------------------------------------------------------------------
IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnWrapper )
-//------------------------------------------------------------------------------
rtl::OUString OTableColumnWrapper::getImplementationName( ) throw (RuntimeException)
{
return rtl::OUString::createFromAscii( "com.sun.star.sdb.OTableColumnWrapper" );
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OTableColumnWrapper::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 2 );
@@ -660,17 +619,14 @@ Sequence< ::rtl::OUString > OTableColumnWrapper::getSupportedServiceNames( ) th
return aSNS;
}
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OTableColumnWrapper::getInfoHelper()
{
return *static_cast< OIdPropertyArrayUsageHelper< OTableColumnWrapper >* >(this)->getArrayHelper(m_nColTypeID);
}
// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OTableColumnWrapper::createArrayHelper( sal_Int32 nId ) const
{
return OTableColumnDescriptorWrapper::createArrayHelper( nId );
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/makefile.mk b/dbaccess/source/core/api/makefile.mk
index 9a4dc9d8e..8ceda2fdb 100644
--- a/dbaccess/source/core/api/makefile.mk
+++ b/dbaccess/source/core/api/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/api/preparedstatement.cxx b/dbaccess/source/core/api/preparedstatement.cxx
index 4427c423f..c9cf33e6c 100644
--- a/dbaccess/source/core/api/preparedstatement.cxx
+++ b/dbaccess/source/core/api/preparedstatement.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,7 +55,6 @@ using namespace dbaccess;
DBG_NAME(OPreparedStatement)
-//--------------------------------------------------------------------------
OPreparedStatement::OPreparedStatement(const Reference< XConnection > & _xConn,
const Reference< XInterface > & _xStatement)
:OStatementBase(_xConn, _xStatement)
@@ -67,7 +66,6 @@ OPreparedStatement::OPreparedStatement(const Reference< XConnection > & _xConn,
m_pColumns = new OColumns(*this, m_aMutex, xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers(),::std::vector< ::rtl::OUString>(), NULL,NULL);
}
-//--------------------------------------------------------------------------
OPreparedStatement::~OPreparedStatement()
{
m_pColumns->acquire();
@@ -78,7 +76,6 @@ OPreparedStatement::~OPreparedStatement()
}
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > OPreparedStatement::getTypes() throw (RuntimeException)
{
OTypeCollection aTypes(::getCppuType( (const Reference< XServiceInfo > *)0 ),
@@ -91,7 +88,6 @@ Sequence< Type > OPreparedStatement::getTypes() throw (RuntimeException)
return aTypes.getTypes();
}
-//--------------------------------------------------------------------------
Sequence< sal_Int8 > OPreparedStatement::getImplementationId() throw (RuntimeException)
{
static OImplementationId * pId = 0;
@@ -108,7 +104,6 @@ Sequence< sal_Int8 > OPreparedStatement::getImplementationId() throw (RuntimeExc
}
// com::sun::star::uno::XInterface
-//--------------------------------------------------------------------------
Any OPreparedStatement::queryInterface( const Type & rType ) throw (RuntimeException)
{
Any aIface = OStatementBase::queryInterface( rType );
@@ -125,32 +120,27 @@ Any OPreparedStatement::queryInterface( const Type & rType ) throw (RuntimeExcep
return aIface;
}
-//--------------------------------------------------------------------------
void OPreparedStatement::acquire() throw ()
{
OStatementBase::acquire();
}
-//--------------------------------------------------------------------------
void OPreparedStatement::release() throw ()
{
OStatementBase::release();
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OPreparedStatement::getImplementationName( ) throw(RuntimeException)
{
return rtl::OUString::createFromAscii("com.sun.star.sdb.OPreparedStatement");
}
-//------------------------------------------------------------------------------
sal_Bool OPreparedStatement::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OPreparedStatement::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 2 );
@@ -160,7 +150,6 @@ Sequence< ::rtl::OUString > OPreparedStatement::getSupportedServiceNames( ) thr
}
// OComponentHelper
-//------------------------------------------------------------------------------
void OPreparedStatement::disposing()
{
{
@@ -172,7 +161,6 @@ void OPreparedStatement::disposing()
}
// ::com::sun::star::sdbcx::XColumnsSupplier
-//------------------------------------------------------------------------------
Reference< ::com::sun::star::container::XNameAccess > OPreparedStatement::getColumns(void) throw( RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -207,7 +195,6 @@ Reference< ::com::sun::star::container::XNameAccess > OPreparedStatement::getCol
}
// XResultSetMetaDataSupplier
-//------------------------------------------------------------------------------
Reference< XResultSetMetaData > OPreparedStatement::getMetaData(void) throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -216,7 +203,6 @@ Reference< XResultSetMetaData > OPreparedStatement::getMetaData(void) throw( SQL
}
// XPreparedStatement
-//------------------------------------------------------------------------------
Reference< XResultSet > OPreparedStatement::executeQuery() throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -236,7 +222,6 @@ Reference< XResultSet > OPreparedStatement::executeQuery() throw( SQLException,
return xResultSet;
}
-//------------------------------------------------------------------------------
sal_Int32 OPreparedStatement::executeUpdate() throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -247,7 +232,6 @@ sal_Int32 OPreparedStatement::executeUpdate() throw( SQLException, RuntimeExcept
return Reference< XPreparedStatement >( m_xAggregateAsSet, UNO_QUERY_THROW )->executeUpdate();
}
-//------------------------------------------------------------------------------
sal_Bool OPreparedStatement::execute() throw( SQLException, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -258,14 +242,12 @@ sal_Bool OPreparedStatement::execute() throw( SQLException, RuntimeException )
return Reference< XPreparedStatement >( m_xAggregateAsSet, UNO_QUERY_THROW )->execute();
}
-//------------------------------------------------------------------------------
Reference< XConnection > OPreparedStatement::getConnection(void) throw( SQLException, RuntimeException )
{
return Reference< XConnection > (m_xParent, UNO_QUERY);
}
// XParameters
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 sqlType ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -274,7 +256,6 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 s
m_xAggregateAsParameters->setNull(parameterIndex, sqlType);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& typeName ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -283,7 +264,6 @@ void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_I
m_xAggregateAsParameters->setObjectNull(parameterIndex, sqlType, typeName);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -292,7 +272,6 @@ void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool
m_xAggregateAsParameters->setBoolean(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -301,7 +280,6 @@ void SAL_CALL OPreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x
m_xAggregateAsParameters->setByte(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16 x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -310,7 +288,6 @@ void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16
m_xAggregateAsParameters->setShort(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -319,7 +296,6 @@ void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x
m_xAggregateAsParameters->setInt(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -328,7 +304,6 @@ void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 x
m_xAggregateAsParameters->setLong(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -337,7 +312,6 @@ void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x )
m_xAggregateAsParameters->setFloat(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -346,7 +320,6 @@ void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x
m_xAggregateAsParameters->setDouble(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const ::rtl::OUString& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -355,7 +328,6 @@ void SAL_CALL OPreparedStatement::setString( sal_Int32 parameterIndex, const ::r
m_xAggregateAsParameters->setString(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -364,7 +336,6 @@ void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequ
m_xAggregateAsParameters->setBytes(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const ::com::sun::star::util::Date& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -373,7 +344,6 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const ::com
m_xAggregateAsParameters->setDate(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const ::com::sun::star::util::Time& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -382,7 +352,6 @@ void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const ::com
m_xAggregateAsParameters->setTime(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const ::com::sun::star::util::DateTime& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -391,7 +360,6 @@ void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const
m_xAggregateAsParameters->setTimestamp(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -400,7 +368,6 @@ void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, con
m_xAggregateAsParameters->setBinaryStream(parameterIndex, x, length);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -409,7 +376,6 @@ void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex,
m_xAggregateAsParameters->setCharacterStream(parameterIndex, x, length);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -418,7 +384,6 @@ void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any
m_xAggregateAsParameters->setObject(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 targetSqlType, sal_Int32 scale ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -427,7 +392,6 @@ void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, c
m_xAggregateAsParameters->setObjectWithInfo(parameterIndex, x, targetSqlType, scale);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setRef( sal_Int32 parameterIndex, const Reference< XRef >& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -436,7 +400,6 @@ void SAL_CALL OPreparedStatement::setRef( sal_Int32 parameterIndex, const Refere
m_xAggregateAsParameters->setRef(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Reference< XBlob >& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -445,7 +408,6 @@ void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Refer
m_xAggregateAsParameters->setBlob(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setClob( sal_Int32 parameterIndex, const Reference< XClob >& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -454,7 +416,6 @@ void SAL_CALL OPreparedStatement::setClob( sal_Int32 parameterIndex, const Refer
m_xAggregateAsParameters->setClob(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setArray( sal_Int32 parameterIndex, const Reference< XArray >& x ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -463,7 +424,6 @@ void SAL_CALL OPreparedStatement::setArray( sal_Int32 parameterIndex, const Refe
m_xAggregateAsParameters->setArray(parameterIndex, x);
}
-//------------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::clearParameters( ) throw(SQLException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -471,5 +431,4 @@ 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 0c4267765..ec3b8623a 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -75,16 +75,14 @@ using namespace ::osl;
using namespace ::cppu;
using namespace ::utl;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OQuery
//==========================================================================
DBG_NAME(OQuery)
-//--------------------------------------------------------------------------
+
OQuery::OQuery( const Reference< XPropertySet >& _rxCommandDefinition
,const Reference< XConnection >& _rxConn
,const Reference< XMultiServiceFactory >& _xORB)
@@ -123,16 +121,15 @@ OQuery::OQuery( const Reference< XPropertySet >& _rxCommandDefinition
osl_decrementInterlockedCount(&m_refCount);
}
-//--------------------------------------------------------------------------
OQuery::~OQuery()
{
DBG_DTOR(OQuery, NULL);
}
-// -----------------------------------------------------------------------------
+
IMPLEMENT_IMPLEMENTATION_ID(OQuery);
IMPLEMENT_GETTYPES3(OQuery,OQueryDescriptor_Base,ODataSettings,OContentHelper);
IMPLEMENT_FORWARD_XINTERFACE3( OQuery,OContentHelper,OQueryDescriptor_Base,ODataSettings)
-//--------------------------------------------------------------------------
+
void OQuery::rebuildColumns()
{
OSL_PRECOND( getColumnCount() == 0, "OQuery::rebuildColumns: column container should be empty!" );
@@ -232,11 +229,9 @@ void OQuery::rebuildColumns()
}
// XServiceInfo
-//--------------------------------------------------------------------------
IMPLEMENT_SERVICE_INFO3(OQuery, "com.sun.star.sdb.dbaccess.OQuery", SERVICE_SDB_DATASETTINGS, SERVICE_SDB_QUERY, SERVICE_SDB_QUERYDEFINITION)
// ::com::sun::star::beans::XPropertyChangeListener
-//--------------------------------------------------------------------------
void SAL_CALL OQuery::propertyChange( const PropertyChangeEvent& _rSource ) throw(RuntimeException)
{
sal_Int32 nOwnHandle = -1;
@@ -269,7 +264,6 @@ void SAL_CALL OQuery::propertyChange( const PropertyChangeEvent& _rSource ) thro
fire(&nOwnHandle, &_rSource.NewValue, &_rSource.OldValue, 1, sal_False);
}
-//--------------------------------------------------------------------------
void SAL_CALL OQuery::disposing( const EventObject& _rSource ) throw (RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -283,14 +277,12 @@ void SAL_CALL OQuery::disposing( const EventObject& _rSource ) throw (RuntimeExc
}
// XDataDescriptorFactory
-//--------------------------------------------------------------------------
Reference< XPropertySet > SAL_CALL OQuery::createDataDescriptor( ) throw(RuntimeException)
{
return new OQueryDescriptor(*this);
}
// pseudo-XComponent
-//--------------------------------------------------------------------------
void SAL_CALL OQuery::disposing()
{
MutexGuard aGuard(m_aMutex);
@@ -304,13 +296,12 @@ void SAL_CALL OQuery::disposing()
m_pWarnings = NULL;
}
-//--------------------------------------------------------------------------
void OQuery::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _rValue ) throw (Exception)
{
ODataSettings::setFastPropertyValue_NoBroadcast(_nHandle, _rValue);
::rtl::OUString sAggPropName;
sal_Int16 nAttr = 0;
- if (getInfoHelper().fillPropertyMembersByHandle(&sAggPropName,&nAttr,_nHandle) &&
+ if (getInfoHelper().fillPropertyMembersByHandle(&sAggPropName,&nAttr,_nHandle) &&
m_xCommandPropInfo.is() &&
m_xCommandPropInfo->hasPropertyByName(sAggPropName))
{ // the base class holds the property values itself, but we have to forward this to our CommandDefinition
@@ -325,19 +316,16 @@ void OQuery::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _r
}
}
-//--------------------------------------------------------------------------
Reference< XPropertySetInfo > SAL_CALL OQuery::getPropertySetInfo( ) throw(RuntimeException)
{
return createPropertySetInfo( getInfoHelper() ) ;
}
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OQuery::getInfoHelper()
{
return *getArrayHelper();
}
-//--------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OQuery::createArrayHelper( ) const
{
Sequence< Property > aProps;
@@ -345,12 +333,12 @@ Reference< XPropertySetInfo > SAL_CALL OQuery::getPropertySetInfo( ) throw(Runti
describeProperties(aProps);
return new ::cppu::OPropertyArrayHelper(aProps);
}
-// -----------------------------------------------------------------------------
+
OColumn* OQuery::createColumn(const ::rtl::OUString& /*_rName*/) const
{
return NULL;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OQuery::rename( const ::rtl::OUString& newName ) throw (SQLException, ElementExistException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -359,7 +347,7 @@ void SAL_CALL OQuery::rename( const ::rtl::OUString& newName ) throw (SQLExcepti
if(xRename.is())
xRename->rename(newName);
}
-// -----------------------------------------------------------------------------
+
void OQuery::registerProperties()
{
// the properties which OCommandBase supplies (it has no own registration, as it's not derived from
@@ -386,15 +374,10 @@ void OQuery::registerProperties()
&m_aLayoutInformation, ::getCppuType(&m_aLayoutInformation));
}
-// -----------------------------------------------------------------------------
::rtl::OUString OQuery::determineContentType() const
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.org.openoffice.DatabaseQuery" ) );
}
-// -----------------------------------------------------------------------------
-//........................................................................
} // 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 449e2dbb7..346a70f4e 100644
--- a/dbaccess/source/core/api/query.hxx
+++ b/dbaccess/source/core/api/query.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -69,7 +69,7 @@ class OQuery :public OContentHelper
friend struct TRelease;
public:
- typedef ::std::map< ::rtl::OUString,OColumn*,::comphelper::UStringMixLess> TNameColumnMap;
+ typedef ::std::map< ::rtl::OUString,OColumn*,::comphelper::UStringMixLess> TNameColumnMap;
protected:
// TNameColumnMap m_aColumnMap; // contains all columnnames to columns
diff --git a/dbaccess/source/core/api/querycomposer.cxx b/dbaccess/source/core/api/querycomposer.cxx
index fce69436d..9bf2e3400 100644
--- a/dbaccess/source/core/api/querycomposer.cxx
+++ b/dbaccess/source/core/api/querycomposer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -75,7 +75,7 @@ using namespace ::utl;
DBG_NAME(OQueryComposer)
-// -------------------------------------------------------------------------
+
OQueryComposer::OQueryComposer(const Reference< XConnection>& _xConnection)
: OSubComponent(m_aMutex,_xConnection)
{
@@ -87,26 +87,26 @@ OQueryComposer::OQueryComposer(const Reference< XConnection>& _xConnection)
m_xComposer.set( xFac->createInstance( SERVICE_NAME_SINGLESELECTQUERYCOMPOSER ), UNO_QUERY_THROW );
m_xComposerHelper.set( xFac->createInstance( SERVICE_NAME_SINGLESELECTQUERYCOMPOSER ), UNO_QUERY_THROW );
}
-// -------------------------------------------------------------------------
+
OQueryComposer::~OQueryComposer()
{
DBG_DTOR(OQueryComposer,NULL);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OQueryComposer::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::disposing" );
::comphelper::disposeComponent(m_xComposerHelper);
::comphelper::disposeComponent(m_xComposer);
}
-// -------------------------------------------------------------------------
+
// ::com::sun::star::lang::XTypeProvider
Sequence< Type > SAL_CALL OQueryComposer::getTypes() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getTypes" );
return ::comphelper::concatSequences(OSubComponent::getTypes(),OQueryComposer_BASE::getTypes());
}
-// -------------------------------------------------------------------------
+
Sequence< sal_Int8 > SAL_CALL OQueryComposer::getImplementationId() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getImplementationId" );
@@ -122,7 +122,7 @@ Sequence< sal_Int8 > SAL_CALL OQueryComposer::getImplementationId() throw (Runti
}
return pId->getImplementationId();
}
-// -------------------------------------------------------------------------
+
// com::sun::star::lang::XUnoTunnel
sal_Int64 SAL_CALL OQueryComposer::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
@@ -132,7 +132,7 @@ sal_Int64 SAL_CALL OQueryComposer::getSomething( const Sequence< sal_Int8 >& rId
return 0;
}
-// -------------------------------------------------------------------------
+
Any SAL_CALL OQueryComposer::queryInterface( const Type & rType ) throw(RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::queryInterface" );
@@ -141,21 +141,20 @@ Any SAL_CALL OQueryComposer::queryInterface( const Type & rType ) throw(RuntimeE
aRet = OQueryComposer_BASE::queryInterface(rType);
return aRet;
}
-// -------------------------------------------------------------------------
+
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OQueryComposer::getImplementationName( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getImplementationName" );
return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.dbaccess.OQueryComposer"));
}
-//------------------------------------------------------------------------------
+
sal_Bool OQueryComposer::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::supportsService" );
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > OQueryComposer::getSupportedServiceNames( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getSupportedServiceNames" );
@@ -163,7 +162,7 @@ Sequence< ::rtl::OUString > OQueryComposer::getSupportedServiceNames( ) throw (
aSNS[0] = SERVICE_SDB_SQLQUERYCOMPOSER;
return aSNS;
}
-// -------------------------------------------------------------------------
+
// XSQLQueryComposer
::rtl::OUString SAL_CALL OQueryComposer::getQuery( ) throw(RuntimeException)
{
@@ -177,7 +176,7 @@ Sequence< ::rtl::OUString > OQueryComposer::getSupportedServiceNames( ) throw (
xProp->getPropertyValue(PROPERTY_ORIGINAL) >>= sQuery;
return sQuery;
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OQueryComposer::setQuery( const ::rtl::OUString& command ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::setQuery" );
@@ -189,7 +188,7 @@ void SAL_CALL OQueryComposer::setQuery( const ::rtl::OUString& command ) throw(S
m_sOrgFilter = m_xComposer->getFilter();
m_sOrgOrder = m_xComposer->getOrder();
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OQueryComposer::getComposedQuery( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getComposedQuery" );
@@ -199,7 +198,7 @@ void SAL_CALL OQueryComposer::setQuery( const ::rtl::OUString& command ) throw(S
return m_xComposer->getQuery();
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OQueryComposer::getFilter( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getFilter" );
@@ -209,7 +208,7 @@ void SAL_CALL OQueryComposer::setQuery( const ::rtl::OUString& command ) throw(S
aFilterCreator = ::std::for_each(m_aFilters.begin(),m_aFilters.end(),aFilterCreator);
return aFilterCreator.getComposedAndClear();
}
-// -------------------------------------------------------------------------
+
Sequence< Sequence< PropertyValue > > SAL_CALL OQueryComposer::getStructuredFilter( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getStructuredFilter" );
@@ -218,7 +217,7 @@ Sequence< Sequence< PropertyValue > > SAL_CALL OQueryComposer::getStructuredFilt
MutexGuard aGuard(m_aMutex);
return m_xComposer->getStructuredFilter();
}
-// -------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OQueryComposer::getOrder( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getOrder" );
@@ -229,7 +228,7 @@ Sequence< Sequence< PropertyValue > > SAL_CALL OQueryComposer::getStructuredFilt
aOrderCreator = ::std::for_each(m_aOrders.begin(),m_aOrders.end(),aOrderCreator);
return aOrderCreator.getComposedAndClear();
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OQueryComposer::appendFilterByColumn( const Reference< XPropertySet >& column ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::appendFilterByColumn" );
@@ -262,7 +261,7 @@ void SAL_CALL OQueryComposer::appendFilterByColumn( const Reference< XPropertySe
setFilter( aFilterCreator.getComposedAndClear() );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OQueryComposer::appendOrderByColumn( const Reference< XPropertySet >& column, sal_Bool ascending ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::appendOrderByColumn" );
@@ -279,7 +278,7 @@ void SAL_CALL OQueryComposer::appendOrderByColumn( const Reference< XPropertySet
setOrder(aOrderCreator.getComposedAndClear());
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OQueryComposer::setFilter( const ::rtl::OUString& filter ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::setFilter" );
@@ -296,7 +295,7 @@ void SAL_CALL OQueryComposer::setFilter( const ::rtl::OUString& filter ) throw(S
m_xComposer->setFilter( aFilterCreator.getComposedAndClear() );
}
-// -------------------------------------------------------------------------
+
void SAL_CALL OQueryComposer::setOrder( const ::rtl::OUString& order ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::setOrder" );
@@ -314,7 +313,7 @@ void SAL_CALL OQueryComposer::setOrder( const ::rtl::OUString& order ) throw(SQL
m_xComposer->setOrder(aOrderCreator.getComposedAndClear());
}
-// -------------------------------------------------------------------------
+
// XTablesSupplier
Reference< XNameAccess > SAL_CALL OQueryComposer::getTables( ) throw(RuntimeException)
{
@@ -324,7 +323,7 @@ Reference< XNameAccess > SAL_CALL OQueryComposer::getTables( ) throw(RuntimeExc
::osl::MutexGuard aGuard( m_aMutex );
return Reference<XTablesSupplier>(m_xComposer,UNO_QUERY)->getTables();
}
-// -------------------------------------------------------------------------
+
// XColumnsSupplier
Reference< XNameAccess > SAL_CALL OQueryComposer::getColumns( ) throw(RuntimeException)
{
@@ -334,7 +333,7 @@ Reference< XNameAccess > SAL_CALL OQueryComposer::getColumns( ) throw(RuntimeEx
::osl::MutexGuard aGuard( m_aMutex );
return Reference<XColumnsSupplier>(m_xComposer,UNO_QUERY)->getColumns();
}
-// -------------------------------------------------------------------------
+
Reference< XIndexAccess > SAL_CALL OQueryComposer::getParameters( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getParameters" );
@@ -343,20 +342,14 @@ Reference< XIndexAccess > SAL_CALL OQueryComposer::getParameters( ) throw(Runti
::osl::MutexGuard aGuard( m_aMutex );
return Reference<XParametersSupplier>(m_xComposer,UNO_QUERY)->getParameters();
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OQueryComposer::acquire() throw()
{
OSubComponent::acquire();
}
-// -----------------------------------------------------------------------------
+
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 ff00da47d..229ffa191 100644
--- a/dbaccess/source/core/api/querycontainer.cxx
+++ b/dbaccess/source/core/api/querycontainer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -67,16 +67,14 @@ using namespace ::osl;
using namespace ::comphelper;
using namespace ::cppu;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OQueryContainer
//==========================================================================
DBG_NAME(OQueryContainer)
-//------------------------------------------------------------------------------
+
OQueryContainer::OQueryContainer(
const Reference< XNameContainer >& _rxCommandDefinitions
, const Reference< XConnection >& _rxConn
@@ -93,7 +91,7 @@ OQueryContainer::OQueryContainer(
{
m_pCommandsListener = new OContainerListener( *this, m_aMutex );
m_pCommandsListener->acquire();
-
+
Reference< XContainer > xContainer( m_xCommandDefinitions, UNO_QUERY_THROW );
xContainer->addContainerListener( m_pCommandsListener );
@@ -116,20 +114,17 @@ OQueryContainer::OQueryContainer(
setElementApproval( PContainerApprove( new ObjectNameApproval( _rxConn, ObjectNameApproval::TypeQuery ) ) );
}
-//------------------------------------------------------------------------------
OQueryContainer::~OQueryContainer()
{
DBG_DTOR(OQueryContainer, NULL);
// dispose();
// maybe we're already disposed, but this should be uncritical
}
-// -----------------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XINTERFACE2( OQueryContainer,ODefinitionContainer,OQueryContainer_Base)
-//------------------------------------------------------------------------------
IMPLEMENT_FORWARD_XTYPEPROVIDER2( OQueryContainer,ODefinitionContainer,OQueryContainer_Base)
-//------------------------------------------------------------------------------
void OQueryContainer::disposing()
{
ODefinitionContainer::disposing();
@@ -155,18 +150,15 @@ void OQueryContainer::disposing()
}
// XServiceInfo
-//------------------------------------------------------------------------------
IMPLEMENT_SERVICE_INFO2(OQueryContainer, "com.sun.star.sdb.dbaccess.OQueryContainer", SERVICE_SDBCX_CONTAINER, SERVICE_SDB_QUERIES)
// XDataDescriptorFactory
-//--------------------------------------------------------------------------
Reference< XPropertySet > SAL_CALL OQueryContainer::createDataDescriptor( ) throw(RuntimeException)
{
return new OQueryDescriptor();
}
// XAppend
-//------------------------------------------------------------------------------
void SAL_CALL OQueryContainer::appendByDescriptor( const Reference< XPropertySet >& _rxDesc ) throw(SQLException, ElementExistException, RuntimeException)
{
ResettableMutexGuard aGuard(m_aMutex);
@@ -207,7 +199,6 @@ void SAL_CALL OQueryContainer::appendByDescriptor( const Reference< XPropertySet
}
// XDrop
-//------------------------------------------------------------------------------
void SAL_CALL OQueryContainer::dropByName( const ::rtl::OUString& _rName ) throw(SQLException, NoSuchElementException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -222,7 +213,6 @@ void SAL_CALL OQueryContainer::dropByName( const ::rtl::OUString& _rName ) throw
m_xCommandDefinitions->removeByName(_rName);
}
-//------------------------------------------------------------------------------
void SAL_CALL OQueryContainer::dropByIndex( sal_Int32 _nIndex ) throw(SQLException, IndexOutOfBoundsException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -239,7 +229,7 @@ void SAL_CALL OQueryContainer::dropByIndex( sal_Int32 _nIndex ) throw(SQLExcepti
dropByName(sName);
}
-//------------------------------------------------------------------------------
+
void SAL_CALL OQueryContainer::elementInserted( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException)
{
Reference< XContent > xNewElement;
@@ -262,7 +252,6 @@ void SAL_CALL OQueryContainer::elementInserted( const ::com::sun::star::containe
insertByName(sElementName,makeAny(xNewElement));
}
-//------------------------------------------------------------------------------
void SAL_CALL OQueryContainer::elementRemoved( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException)
{
::rtl::OUString sAccessor;
@@ -276,7 +265,6 @@ void SAL_CALL OQueryContainer::elementRemoved( const ::com::sun::star::container
removeByName(sAccessor);
}
-//------------------------------------------------------------------------------
void SAL_CALL OQueryContainer::elementReplaced( const ::com::sun::star::container::ContainerEvent& _rEvent ) throw(::com::sun::star::uno::RuntimeException)
{
Reference< XPropertySet > xReplacedElement;
@@ -290,14 +278,13 @@ void SAL_CALL OQueryContainer::elementReplaced( const ::com::sun::star::containe
DBG_ASSERT(m_aDocumentMap.find(sAccessor) != m_aDocumentMap.end(), "OQueryContainer::elementReplaced : oops .... we're inconsistent with our master container !");
if (!sAccessor.getLength() || !hasByName(sAccessor))
return;
-
+
xNewElement = implCreateWrapper(sAccessor);
}
replaceByName(sAccessor,makeAny(xNewElement));
}
-//------------------------------------------------------------------------------
Reference< XVeto > SAL_CALL OQueryContainer::approveInsertElement( const ContainerEvent& Event ) throw (WrappedTargetException, RuntimeException)
{
::rtl::OUString sName;
@@ -316,19 +303,16 @@ Reference< XVeto > SAL_CALL OQueryContainer::approveInsertElement( const Contain
return xReturn;
}
-//------------------------------------------------------------------------------
Reference< XVeto > SAL_CALL OQueryContainer::approveReplaceElement( const ContainerEvent& /*Event*/ ) throw (WrappedTargetException, RuntimeException)
{
return NULL;
}
-//------------------------------------------------------------------------------
Reference< XVeto > SAL_CALL OQueryContainer::approveRemoveElement( const ContainerEvent& /*Event*/ ) throw (WrappedTargetException, RuntimeException)
{
return NULL;
}
-//------------------------------------------------------------------------------
void SAL_CALL OQueryContainer::disposing( const ::com::sun::star::lang::EventObject& _rSource ) throw(::com::sun::star::uno::RuntimeException)
{
if (_rSource.Source.get() == Reference< XInterface >(m_xCommandDefinitions, UNO_QUERY).get())
@@ -336,7 +320,7 @@ void SAL_CALL OQueryContainer::disposing( const ::com::sun::star::lang::EventObj
DBG_ERROR("OQueryContainer::disposing : nobody should dispose the CommandDefinition container before disposing my connection !");
dispose();
}
- else
+ else
{
Reference< XContent > xSource(_rSource.Source, UNO_QUERY);
// it's one of our documents ....
@@ -354,20 +338,17 @@ void SAL_CALL OQueryContainer::disposing( const ::com::sun::star::lang::EventObj
}
}
-// -----------------------------------------------------------------------------
::rtl::OUString OQueryContainer::determineContentType() const
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.org.openoffice.DatabaseQueryContainer" ) );
}
-// -----------------------------------------------------------------------------
Reference< XContent > OQueryContainer::implCreateWrapper(const ::rtl::OUString& _rName)
{
Reference< XContent > xObject(m_xCommandDefinitions->getByName(_rName),UNO_QUERY);
return implCreateWrapper(xObject);
}
-//--------------------------------------------------------------------------
Reference< XContent > OQueryContainer::implCreateWrapper(const Reference< XContent >& _rxCommandDesc)
{
Reference<XNameContainer> xContainer(_rxCommandDesc,UNO_QUERY);
@@ -389,12 +370,12 @@ Reference< XContent > OQueryContainer::implCreateWrapper(const Reference< XConte
return xReturn;
}
-//--------------------------------------------------------------------------
+
Reference< XContent > OQueryContainer::createObject( const ::rtl::OUString& _rName)
{
return implCreateWrapper(_rName);
}
-// -----------------------------------------------------------------------------
+
sal_Bool OQueryContainer::checkExistence(const ::rtl::OUString& _rName)
{
sal_Bool bRet = sal_False;
@@ -414,19 +395,19 @@ sal_Bool OQueryContainer::checkExistence(const ::rtl::OUString& _rName)
}
return bRet;
}
-//--------------------------------------------------------------------------
+
sal_Bool SAL_CALL OQueryContainer::hasElements( ) throw (RuntimeException)
{
MutexGuard aGuard(m_aMutex);
return m_xCommandDefinitions->hasElements();
}
-// -----------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OQueryContainer::getCount( ) throw(RuntimeException)
{
MutexGuard aGuard(m_aMutex);
return Reference<XIndexAccess>(m_xCommandDefinitions,UNO_QUERY)->getCount();
}
-// -----------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL OQueryContainer::getElementNames( ) throw(RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -434,8 +415,5 @@ Sequence< ::rtl::OUString > SAL_CALL OQueryContainer::getElementNames( ) throw(
return m_xCommandDefinitions->getElementNames();
}
-//........................................................................
} // 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 f26d77acb..d5e7e6597 100644
--- a/dbaccess/source/core/api/querydescriptor.cxx
+++ b/dbaccess/source/core/api/querydescriptor.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,17 +49,15 @@ using namespace ::comphelper;
using namespace ::osl;
using namespace ::cppu;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OQueryDescriptor
//==========================================================================
DBG_NAME(OQueryDescriptor)
-//--------------------------------------------------------------------------
-OQueryDescriptor::OQueryDescriptor()
+
+OQueryDescriptor::OQueryDescriptor()
:OQueryDescriptor_Base(m_aMutex,*this)
,ODataSettings(m_aBHelper,sal_True)
{
@@ -68,7 +66,6 @@ OQueryDescriptor::OQueryDescriptor()
ODataSettings::registerPropertiesFor(this);
}
-//--------------------------------------------------------------------------
OQueryDescriptor::OQueryDescriptor(const OQueryDescriptor_Base& _rSource)
:OQueryDescriptor_Base(_rSource,*this)
,ODataSettings(m_aBHelper,sal_True)
@@ -77,15 +74,15 @@ OQueryDescriptor::OQueryDescriptor(const OQueryDescriptor_Base& _rSource)
registerProperties();
ODataSettings::registerPropertiesFor(this);
}
-// -----------------------------------------------------------------------------
+
OQueryDescriptor::~OQueryDescriptor()
{
DBG_DTOR(OQueryDescriptor,NULL);
}
-// -----------------------------------------------------------------------------
+
IMPLEMENT_TYPEPROVIDER2(OQueryDescriptor,OQueryDescriptor_Base,ODataSettings);
IMPLEMENT_FORWARD_XINTERFACE3( OQueryDescriptor,OWeakObject,OQueryDescriptor_Base,ODataSettings)
-//--------------------------------------------------------------------------
+
void OQueryDescriptor::registerProperties()
{
// the properties which OCommandBase supplies (it has no own registration, as it's not derived from
@@ -111,19 +108,17 @@ void OQueryDescriptor::registerProperties()
registerProperty(PROPERTY_LAYOUTINFORMATION, PROPERTY_ID_LAYOUTINFORMATION, PropertyAttribute::BOUND,
&m_aLayoutInformation, ::getCppuType(&m_aLayoutInformation));
}
-// -----------------------------------------------------------------------------
-//--------------------------------------------------------------------------
+
Reference< XPropertySetInfo > SAL_CALL OQueryDescriptor::getPropertySetInfo( ) throw(RuntimeException)
{
return createPropertySetInfo( getInfoHelper() ) ;
}
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OQueryDescriptor::getInfoHelper()
{
return *getArrayHelper();
}
-//--------------------------------------------------------------------------
+
::cppu::IPropertyArrayHelper* OQueryDescriptor::createArrayHelper( ) const
{
Sequence< Property > aProps;
@@ -131,9 +126,8 @@ Reference< XPropertySetInfo > SAL_CALL OQueryDescriptor::getPropertySetInfo( )
return new ::cppu::OPropertyArrayHelper(aProps);
}
-// -----------------------------------------------------------------------------
DBG_NAME(OQueryDescriptor_Base);
-//--------------------------------------------------------------------------
+
OQueryDescriptor_Base::OQueryDescriptor_Base(::osl::Mutex& _rMutex,::cppu::OWeakObject& _rMySelf)
:m_bColumnsOutOfDate(sal_True)
,m_rMutex(_rMutex)
@@ -141,7 +135,7 @@ OQueryDescriptor_Base::OQueryDescriptor_Base(::osl::Mutex& _rMutex,::cppu::OWeak
DBG_CTOR(OQueryDescriptor_Base,NULL);
m_pColumns = new OColumns(_rMySelf, m_rMutex, sal_True,::std::vector< ::rtl::OUString>(), this,this);
}
-//--------------------------------------------------------------------------
+
OQueryDescriptor_Base::OQueryDescriptor_Base(const OQueryDescriptor_Base& _rSource,::cppu::OWeakObject& _rMySelf)
:m_bColumnsOutOfDate(sal_True)
,m_rMutex(_rSource.m_rMutex)
@@ -157,7 +151,6 @@ OQueryDescriptor_Base::OQueryDescriptor_Base(const OQueryDescriptor_Base& _rSour
m_aLayoutInformation = _rSource.m_aLayoutInformation;
}
-//--------------------------------------------------------------------------
OQueryDescriptor_Base::~OQueryDescriptor_Base()
{
m_pColumns->acquire();
@@ -166,7 +159,7 @@ OQueryDescriptor_Base::~OQueryDescriptor_Base()
DBG_DTOR(OQueryDescriptor_Base,NULL);
}
-// -----------------------------------------------------------------------------
+
sal_Int64 SAL_CALL OQueryDescriptor_Base::getSomething( const Sequence< sal_Int8 >& _rIdentifier ) throw(RuntimeException)
{
if (_rIdentifier.getLength() != 16)
@@ -177,9 +170,9 @@ sal_Int64 SAL_CALL OQueryDescriptor_Base::getSomething( const Sequence< sal_Int8
return 0;
}
-//--------------------------------------------------------------------------
+
IMPLEMENT_IMPLEMENTATION_ID(OQueryDescriptor_Base)
-//--------------------------------------------------------------------------
+
void OQueryDescriptor_Base::setColumnsOutOfDate( sal_Bool _bOutOfDate )
{
m_bColumnsOutOfDate = _bOutOfDate;
@@ -187,13 +180,11 @@ void OQueryDescriptor_Base::setColumnsOutOfDate( sal_Bool _bOutOfDate )
m_pColumns->setInitialized();
}
-//--------------------------------------------------------------------------
void OQueryDescriptor_Base::implAppendColumn( const ::rtl::OUString& _rName, OColumn* _pColumn )
{
m_pColumns->append( _rName, _pColumn );
}
-//--------------------------------------------------------------------------
void OQueryDescriptor_Base::clearColumns( )
{
m_pColumns->clearColumns();
@@ -201,7 +192,6 @@ void OQueryDescriptor_Base::clearColumns( )
setColumnsOutOfDate();
}
-//--------------------------------------------------------------------------
Reference< XNameAccess > SAL_CALL OQueryDescriptor_Base::getColumns( ) throw (RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -228,23 +218,20 @@ Reference< XNameAccess > SAL_CALL OQueryDescriptor_Base::getColumns( ) throw (Ru
throw;
}
}
-
+
return m_pColumns;
}
-//--------------------------------------------------------------------------
::rtl::OUString SAL_CALL OQueryDescriptor_Base::getImplementationName( ) throw(RuntimeException)
{
return ::rtl::OUString::createFromAscii("com.sun.star.sdb.OQueryDescriptor");
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OQueryDescriptor_Base::supportsService( const ::rtl::OUString& _rServiceName ) throw(RuntimeException)
{
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL OQueryDescriptor_Base::getSupportedServiceNames( ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aSupported(2);
@@ -252,37 +239,32 @@ Sequence< ::rtl::OUString > SAL_CALL OQueryDescriptor_Base::getSupportedServiceN
aSupported.getArray()[1] = SERVICE_SDB_QUERYDESCRIPTOR;
return aSupported;
}
-//--------------------------------------------------------------------------
+
void OQueryDescriptor_Base::disposeColumns()
{
m_pColumns->disposing();
}
-// -----------------------------------------------------------------------------
void OQueryDescriptor_Base::columnAppended( const Reference< XPropertySet >& /*_rxSourceDescriptor*/ )
{
// not interested in
}
-// -----------------------------------------------------------------------------
void OQueryDescriptor_Base::columnDropped(const ::rtl::OUString& /*_sName*/)
{
// not interested in
}
-// -----------------------------------------------------------------------------
Reference< XPropertySet > OQueryDescriptor_Base::createColumnDescriptor()
{
OSL_ENSURE( false, "OQueryDescriptor_Base::createColumnDescriptor: called why?" );
return NULL;
}
-// -----------------------------------------------------------------------------
void OQueryDescriptor_Base::rebuildColumns( )
{
}
-// -----------------------------------------------------------------------------
// IRefreshableColumns
void OQueryDescriptor_Base::refreshColumns()
{
@@ -292,16 +274,12 @@ void OQueryDescriptor_Base::refreshColumns()
rebuildColumns();
}
-//------------------------------------------------------------------------------
OColumn* OQueryDescriptor_Base::createColumn( const ::rtl::OUString& /*_rName*/ ) const
{
// creating a column/descriptor for a query/descriptor does not make sense at all
return NULL;
}
-// -----------------------------------------------------------------------------
-//........................................................................
-} // namespace dbaccess
-//........................................................................
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/querydescriptor.hxx b/dbaccess/source/core/api/querydescriptor.hxx
index 53d75bc2c..c856ea7da 100644
--- a/dbaccess/source/core/api/querydescriptor.hxx
+++ b/dbaccess/source/core/api/querydescriptor.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/api/resultcolumn.cxx b/dbaccess/source/core/api/resultcolumn.cxx
index df4ebfbe7..5c00c3a28 100644
--- a/dbaccess/source/core/api/resultcolumn.cxx
+++ b/dbaccess/source/core/api/resultcolumn.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,7 +53,7 @@ using namespace ::cppu;
using namespace dbaccess;
DBG_NAME(OResultColumn)
-//--------------------------------------------------------------------------
+
OResultColumn::OResultColumn( const Reference < XResultSetMetaData >& _xMetaData, sal_Int32 _nPos,
const Reference< XDatabaseMetaData >& _rxDBMeta )
:OColumn( true )
@@ -63,7 +63,7 @@ OResultColumn::OResultColumn( const Reference < XResultSetMetaData >& _xMetaData
{
DBG_CTOR(OResultColumn,NULL);
}
-// -----------------------------------------------------------------------------
+
void OResultColumn::impl_determineIsRowVersion_nothrow()
{
if ( m_aIsRowVersion.hasValue() )
@@ -73,7 +73,7 @@ void OResultColumn::impl_determineIsRowVersion_nothrow()
OSL_ENSURE( m_xDBMetaData.is(), "OResultColumn::impl_determineIsRowVersion_nothrow: no DBMetaData!" );
if ( !m_xDBMetaData.is() )
return;
-
+
try
{
::rtl::OUString sCatalog, sSchema, sTable, sColumnName;
@@ -108,13 +108,13 @@ void OResultColumn::impl_determineIsRowVersion_nothrow()
DBG_UNHANDLED_EXCEPTION();
}
}
-// -----------------------------------------------------------------------------
+
OResultColumn::~OResultColumn()
{
DBG_DTOR(OResultColumn,NULL);
}
+
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< sal_Int8 > OResultColumn::getImplementationId() throw (RuntimeException)
{
static OImplementationId * pId = 0;
@@ -131,13 +131,11 @@ Sequence< sal_Int8 > OResultColumn::getImplementationId() throw (RuntimeExceptio
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OResultColumn::getImplementationName( ) throw(RuntimeException)
{
return rtl::OUString::createFromAscii("com.sun.star.sdb.OResultColumn");
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OResultColumn::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 2 );
@@ -147,7 +145,6 @@ Sequence< ::rtl::OUString > OResultColumn::getSupportedServiceNames( ) throw (R
}
// OComponentHelper
-//------------------------------------------------------------------------------
void OResultColumn::disposing()
{
OColumn::disposing();
@@ -157,7 +154,6 @@ void OResultColumn::disposing()
}
// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OResultColumn::createArrayHelper( ) const
{
BEGIN_PROPERTY_HELPER(21)
@@ -186,13 +182,11 @@ void OResultColumn::disposing()
}
// cppu::OPropertySetHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OResultColumn::getInfoHelper()
{
return *static_cast< ::comphelper::OPropertyArrayUsageHelper< OResultColumn >* >(this)->getArrayHelper();
}
-//------------------------------------------------------------------------------
namespace
{
template< typename TYPE >
@@ -204,7 +198,6 @@ namespace
}
}
-//------------------------------------------------------------------------------
void OResultColumn::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
try
@@ -329,5 +322,4 @@ void OResultColumn::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
}
}
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/api/resultcolumn.hxx b/dbaccess/source/core/api/resultcolumn.hxx
index b11c78bd0..cbac3c65b 100644
--- a/dbaccess/source/core/api/resultcolumn.hxx
+++ b/dbaccess/source/core/api/resultcolumn.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx
index 0e7c5016d..dda2ad98d 100644
--- a/dbaccess/source/core/api/resultset.cxx
+++ b/dbaccess/source/core/api/resultset.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -62,7 +62,6 @@ using namespace dbtools;
DBG_NAME(OResultSet)
-//--------------------------------------------------------------------------
OResultSet::OResultSet(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& _xResultSet,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xStatement,
sal_Bool _bCaseSensitive)
@@ -106,7 +105,6 @@ OResultSet::OResultSet(const ::com::sun::star::uno::Reference< ::com::sun::star:
}
}
-//--------------------------------------------------------------------------
OResultSet::~OResultSet()
{
m_pColumns->acquire();
@@ -117,7 +115,6 @@ OResultSet::~OResultSet()
}
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > OResultSet::getTypes() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getTypes" );
@@ -127,7 +124,6 @@ Sequence< Type > OResultSet::getTypes() throw (RuntimeException)
return aTypes.getTypes();
}
-//--------------------------------------------------------------------------
Sequence< sal_Int8 > OResultSet::getImplementationId() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getImplementationId" );
@@ -145,7 +141,6 @@ Sequence< sal_Int8 > OResultSet::getImplementationId() throw (RuntimeException)
}
// com::sun::star::uno::XInterface
-//--------------------------------------------------------------------------
Any OResultSet::queryInterface( const Type & rType ) throw (RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::queryInterface" );
@@ -158,13 +153,11 @@ Any OResultSet::queryInterface( const Type & rType ) throw (RuntimeException)
return aIface;
}
-//--------------------------------------------------------------------------
void OResultSet::acquire() throw ()
{
OResultSetBase::acquire();
}
-//--------------------------------------------------------------------------
void OResultSet::release() throw ()
{
OResultSetBase::release();
@@ -172,7 +165,6 @@ void OResultSet::release() throw ()
// OResultSetBase
-//------------------------------------------------------------------------------
void OResultSet::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::disposing" );
@@ -194,7 +186,6 @@ void OResultSet::disposing()
}
// XCloseable
-//------------------------------------------------------------------------------
void OResultSet::close(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::close" );
@@ -206,21 +197,18 @@ void OResultSet::close(void) throw( SQLException, RuntimeException )
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OResultSet::getImplementationName( ) throw(RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getImplementationName" );
return rtl::OUString::createFromAscii("com.sun.star.sdb.OResultSet");
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::supportsService" );
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OResultSet::getSupportedServiceNames( ) throw (RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getSupportedServiceNames" );
@@ -231,7 +219,6 @@ Sequence< ::rtl::OUString > OResultSet::getSupportedServiceNames( ) throw (Runt
}
// com::sun::star::beans::XPropertySet
-//------------------------------------------------------------------------------
Reference< XPropertySetInfo > OResultSet::getPropertySetInfo() throw (RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getPropertySetInfo" );
@@ -239,7 +226,6 @@ Reference< XPropertySetInfo > OResultSet::getPropertySetInfo() throw (RuntimeExc
}
// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OResultSet::createArrayHelper( ) const
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::createArrayHelper" );
@@ -254,14 +240,12 @@ Reference< XPropertySetInfo > OResultSet::getPropertySetInfo() throw (RuntimeExc
}
// cppu::OPropertySetHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OResultSet::getInfoHelper()
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getInfoHelper" );
return *getArrayHelper();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::convertFastPropertyValue(Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle, const Any& rValue ) throw( IllegalArgumentException )
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::convertFastPropertyValue" );
@@ -271,7 +255,6 @@ sal_Bool OResultSet::convertFastPropertyValue(Any & rConvertedValue, Any & rOldV
return sal_True;
}
-//------------------------------------------------------------------------------
void OResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::setFastPropertyValue_NoBroadcast" );
@@ -290,7 +273,6 @@ void OResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any&
}
}
-//------------------------------------------------------------------------------
void OResultSet::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getFastPropertyValue" );
@@ -317,7 +299,6 @@ void OResultSet::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
}
// XWarningsSupplier
-//------------------------------------------------------------------------------
Any OResultSet::getWarnings(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getWarnings" );
@@ -326,7 +307,6 @@ Any OResultSet::getWarnings(void) throw( SQLException, RuntimeException )
return m_aWarnings.getWarnings();
}
-//------------------------------------------------------------------------------
void OResultSet::clearWarnings(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::clearWarnings" );
@@ -336,7 +316,6 @@ void OResultSet::clearWarnings(void) throw( SQLException, RuntimeException )
}
// ::com::sun::star::sdbc::XResultSetMetaDataSupplier
-//------------------------------------------------------------------------------
Reference< XResultSetMetaData > OResultSet::getMetaData(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getMetaData" );
@@ -347,7 +326,6 @@ Reference< XResultSetMetaData > OResultSet::getMetaData(void) throw( SQLExceptio
}
// ::com::sun::star::sdbc::XColumnLocate
-//------------------------------------------------------------------------------
sal_Int32 OResultSet::findColumn(const rtl::OUString& columnName) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::findColumn" );
@@ -357,7 +335,6 @@ sal_Int32 OResultSet::findColumn(const rtl::OUString& columnName) throw( SQLExce
return Reference< XColumnLocate >(m_xDelegatorResultSet, UNO_QUERY)->findColumn(columnName);
}
-//------------------------------------------------------------------------------
namespace
{
static Reference< XDatabaseMetaData > lcl_getDBMetaDataFromStatement_nothrow( const Reference< XInterface >& _rxStatement )
@@ -382,8 +359,8 @@ namespace
return xDBMetaData;
}
}
+
// ::com::sun::star::sdbcx::XColumnsSupplier
-//------------------------------------------------------------------------------
Reference< ::com::sun::star::container::XNameAccess > OResultSet::getColumns(void) throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getColumns" );
@@ -455,7 +432,6 @@ Reference< ::com::sun::star::container::XNameAccess > OResultSet::getColumns(voi
}
// ::com::sun::star::sdbc::XRow
-//------------------------------------------------------------------------------
sal_Bool OResultSet::wasNull(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::wasNull" );
@@ -464,7 +440,7 @@ sal_Bool OResultSet::wasNull(void) throw( SQLException, RuntimeException )
return m_xDelegatorRow->wasNull();
}
-//------------------------------------------------------------------------------
+
rtl::OUString OResultSet::getString(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getString" );
@@ -473,7 +449,7 @@ rtl::OUString OResultSet::getString(sal_Int32 columnIndex) throw( SQLException,
return m_xDelegatorRow->getString(columnIndex);
}
-//------------------------------------------------------------------------------
+
sal_Bool OResultSet::getBoolean(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getBoolean" );
@@ -482,7 +458,7 @@ sal_Bool OResultSet::getBoolean(sal_Int32 columnIndex) throw( SQLException, Runt
return m_xDelegatorRow->getBoolean(columnIndex);
}
-//------------------------------------------------------------------------------
+
sal_Int8 OResultSet::getByte(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getByte" );
@@ -491,7 +467,7 @@ sal_Int8 OResultSet::getByte(sal_Int32 columnIndex) throw( SQLException, Runtime
return m_xDelegatorRow->getByte(columnIndex);
}
-//------------------------------------------------------------------------------
+
sal_Int16 OResultSet::getShort(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getShort" );
@@ -500,7 +476,7 @@ sal_Int16 OResultSet::getShort(sal_Int32 columnIndex) throw( SQLException, Runti
return m_xDelegatorRow->getShort(columnIndex);
}
-//------------------------------------------------------------------------------
+
sal_Int32 OResultSet::getInt(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getInt" );
@@ -509,7 +485,7 @@ sal_Int32 OResultSet::getInt(sal_Int32 columnIndex) throw( SQLException, Runtime
return m_xDelegatorRow->getInt(columnIndex);
}
-//------------------------------------------------------------------------------
+
sal_Int64 OResultSet::getLong(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getLong" );
@@ -518,7 +494,7 @@ sal_Int64 OResultSet::getLong(sal_Int32 columnIndex) throw( SQLException, Runtim
return m_xDelegatorRow->getLong(columnIndex);
}
-//------------------------------------------------------------------------------
+
float OResultSet::getFloat(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getFloat" );
@@ -527,7 +503,7 @@ float OResultSet::getFloat(sal_Int32 columnIndex) throw( SQLException, RuntimeEx
return m_xDelegatorRow->getFloat(columnIndex);
}
-//------------------------------------------------------------------------------
+
double OResultSet::getDouble(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getDouble" );
@@ -536,7 +512,7 @@ double OResultSet::getDouble(sal_Int32 columnIndex) throw( SQLException, Runtime
return m_xDelegatorRow->getDouble(columnIndex);
}
-//------------------------------------------------------------------------------
+
Sequence< sal_Int8 > OResultSet::getBytes(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getBytes" );
@@ -545,7 +521,7 @@ Sequence< sal_Int8 > OResultSet::getBytes(sal_Int32 columnIndex) throw( SQLExcep
return m_xDelegatorRow->getBytes(columnIndex);
}
-//------------------------------------------------------------------------------
+
::com::sun::star::util::Date OResultSet::getDate(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getDate" );
@@ -554,7 +530,7 @@ Sequence< sal_Int8 > OResultSet::getBytes(sal_Int32 columnIndex) throw( SQLExcep
return m_xDelegatorRow->getDate(columnIndex);
}
-//------------------------------------------------------------------------------
+
::com::sun::star::util::Time OResultSet::getTime(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getTime" );
@@ -563,7 +539,7 @@ Sequence< sal_Int8 > OResultSet::getBytes(sal_Int32 columnIndex) throw( SQLExcep
return m_xDelegatorRow->getTime(columnIndex);
}
-//------------------------------------------------------------------------------
+
::com::sun::star::util::DateTime OResultSet::getTimestamp(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getTimestamp" );
@@ -572,7 +548,7 @@ Sequence< sal_Int8 > OResultSet::getBytes(sal_Int32 columnIndex) throw( SQLExcep
return m_xDelegatorRow->getTimestamp(columnIndex);
}
-//------------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > OResultSet::getBinaryStream(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getBinaryStream" );
@@ -581,7 +557,7 @@ Reference< ::com::sun::star::io::XInputStream > OResultSet::getBinaryStream(sal
return m_xDelegatorRow->getBinaryStream(columnIndex);
}
-//------------------------------------------------------------------------------
+
Reference< ::com::sun::star::io::XInputStream > OResultSet::getCharacterStream(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getCharacterStream" );
@@ -590,7 +566,7 @@ Reference< ::com::sun::star::io::XInputStream > OResultSet::getCharacterStream(
return m_xDelegatorRow->getCharacterStream(columnIndex);
}
-//------------------------------------------------------------------------------
+
Any OResultSet::getObject(sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess > & typeMap) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getObject" );
@@ -599,7 +575,7 @@ Any OResultSet::getObject(sal_Int32 columnIndex, const Reference< ::com::sun::st
return m_xDelegatorRow->getObject(columnIndex, typeMap);
}
-//------------------------------------------------------------------------------
+
Reference< XRef > OResultSet::getRef(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getRef" );
@@ -608,7 +584,7 @@ Reference< XRef > OResultSet::getRef(sal_Int32 columnIndex) throw( SQLException
return m_xDelegatorRow->getRef(columnIndex);
}
-//------------------------------------------------------------------------------
+
Reference< XBlob > OResultSet::getBlob(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getBlob" );
@@ -617,7 +593,7 @@ Reference< XBlob > OResultSet::getBlob(sal_Int32 columnIndex) throw( SQLExcepti
return m_xDelegatorRow->getBlob(columnIndex);
}
-//------------------------------------------------------------------------------
+
Reference< XClob > OResultSet::getClob(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getClob" );
@@ -626,7 +602,7 @@ Reference< XClob > OResultSet::getClob(sal_Int32 columnIndex) throw( SQLExcepti
return m_xDelegatorRow->getClob(columnIndex);
}
-//------------------------------------------------------------------------------
+
Reference< XArray > OResultSet::getArray(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getArray" );
@@ -637,7 +613,6 @@ Reference< XArray > OResultSet::getArray(sal_Int32 columnIndex) throw( SQLExcep
}
// ::com::sun::star::sdbc::XRowUpdate
-//------------------------------------------------------------------------------
void OResultSet::updateNull(sal_Int32 columnIndex) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateNull" );
@@ -649,7 +624,6 @@ void OResultSet::updateNull(sal_Int32 columnIndex) throw( SQLException, RuntimeE
m_xDelegatorRowUpdate->updateNull(columnIndex);
}
-//------------------------------------------------------------------------------
void OResultSet::updateBoolean(sal_Int32 columnIndex, sal_Bool x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateBoolean" );
@@ -660,7 +634,7 @@ void OResultSet::updateBoolean(sal_Int32 columnIndex, sal_Bool x) throw( SQLExce
m_xDelegatorRowUpdate->updateBoolean(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateByte(sal_Int32 columnIndex, sal_Int8 x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateByte" );
@@ -671,7 +645,7 @@ void OResultSet::updateByte(sal_Int32 columnIndex, sal_Int8 x) throw( SQLExcepti
m_xDelegatorRowUpdate->updateByte(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateShort(sal_Int32 columnIndex, sal_Int16 x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateShort" );
@@ -682,7 +656,7 @@ void OResultSet::updateShort(sal_Int32 columnIndex, sal_Int16 x) throw( SQLExcep
m_xDelegatorRowUpdate->updateShort(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateInt(sal_Int32 columnIndex, sal_Int32 x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateInt" );
@@ -693,7 +667,7 @@ void OResultSet::updateInt(sal_Int32 columnIndex, sal_Int32 x) throw( SQLExcepti
m_xDelegatorRowUpdate->updateInt(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateLong(sal_Int32 columnIndex, sal_Int64 x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateLong" );
@@ -704,7 +678,7 @@ void OResultSet::updateLong(sal_Int32 columnIndex, sal_Int64 x) throw( SQLExcept
m_xDelegatorRowUpdate->updateLong(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateFloat(sal_Int32 columnIndex, float x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateFloat" );
@@ -715,7 +689,7 @@ void OResultSet::updateFloat(sal_Int32 columnIndex, float x) throw( SQLException
m_xDelegatorRowUpdate->updateFloat(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateDouble(sal_Int32 columnIndex, double x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateDouble" );
@@ -726,7 +700,7 @@ void OResultSet::updateDouble(sal_Int32 columnIndex, double x) throw( SQLExcepti
m_xDelegatorRowUpdate->updateDouble(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateString(sal_Int32 columnIndex, const rtl::OUString& x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateString" );
@@ -737,7 +711,7 @@ void OResultSet::updateString(sal_Int32 columnIndex, const rtl::OUString& x) thr
m_xDelegatorRowUpdate->updateString(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateBytes(sal_Int32 columnIndex, const Sequence< sal_Int8 >& x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateBytes" );
@@ -748,7 +722,7 @@ void OResultSet::updateBytes(sal_Int32 columnIndex, const Sequence< sal_Int8 >&
m_xDelegatorRowUpdate->updateBytes(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateDate(sal_Int32 columnIndex, const ::com::sun::star::util::Date& x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateDate" );
@@ -759,7 +733,7 @@ void OResultSet::updateDate(sal_Int32 columnIndex, const ::com::sun::star::util:
m_xDelegatorRowUpdate->updateDate(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateTime(sal_Int32 columnIndex, const ::com::sun::star::util::Time& x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateTime" );
@@ -770,7 +744,7 @@ void OResultSet::updateTime(sal_Int32 columnIndex, const ::com::sun::star::util:
m_xDelegatorRowUpdate->updateTime(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateTimestamp(sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateTimestamp" );
@@ -781,7 +755,7 @@ void OResultSet::updateTimestamp(sal_Int32 columnIndex, const ::com::sun::star::
m_xDelegatorRowUpdate->updateTimestamp(columnIndex, x);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateBinaryStream(sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream > & x, sal_Int32 length) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateBinaryStream" );
@@ -792,7 +766,7 @@ void OResultSet::updateBinaryStream(sal_Int32 columnIndex, const Reference< ::co
m_xDelegatorRowUpdate->updateBinaryStream(columnIndex, x, length);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateCharacterStream(sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream > & x, sal_Int32 length) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateCharacterStream" );
@@ -803,7 +777,7 @@ void OResultSet::updateCharacterStream(sal_Int32 columnIndex, const Reference< :
m_xDelegatorRowUpdate->updateCharacterStream(columnIndex, x, length);
}
-//------------------------------------------------------------------------------
+
void OResultSet::updateNumericObject(sal_Int32 columnIndex, const Any& x, sal_Int32 scale) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateNumericObject" );
@@ -815,7 +789,6 @@ void OResultSet::updateNumericObject(sal_Int32 columnIndex, const Any& x, sal_In
m_xDelegatorRowUpdate->updateNumericObject(columnIndex, x, scale);
}
-//------------------------------------------------------------------------------
void OResultSet::updateObject(sal_Int32 columnIndex, const Any& x) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateObject" );
@@ -828,7 +801,6 @@ void OResultSet::updateObject(sal_Int32 columnIndex, const Any& x) throw( SQLExc
}
// ::com::sun::star::sdbc::XResultSet
-//------------------------------------------------------------------------------
sal_Bool OResultSet::next(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::next" );
@@ -838,7 +810,6 @@ sal_Bool OResultSet::next(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->next();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::isBeforeFirst(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::isBeforeFirst" );
@@ -848,7 +819,6 @@ sal_Bool OResultSet::isBeforeFirst(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->isBeforeFirst();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::isAfterLast(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::isAfterLast" );
@@ -858,7 +828,6 @@ sal_Bool OResultSet::isAfterLast(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->isAfterLast();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::isFirst(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::isFirst" );
@@ -868,7 +837,6 @@ sal_Bool OResultSet::isFirst(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->isFirst();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::isLast(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::isLast" );
@@ -878,7 +846,6 @@ sal_Bool OResultSet::isLast(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->isLast();
}
-//------------------------------------------------------------------------------
void OResultSet::beforeFirst(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::beforeFirst" );
@@ -888,7 +855,6 @@ void OResultSet::beforeFirst(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSet->beforeFirst();
}
-//------------------------------------------------------------------------------
void OResultSet::afterLast(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::afterLast" );
@@ -898,7 +864,6 @@ void OResultSet::afterLast(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSet->afterLast();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::first(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::first" );
@@ -908,7 +873,6 @@ sal_Bool OResultSet::first(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->first();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::last(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::last" );
@@ -918,7 +882,6 @@ sal_Bool OResultSet::last(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->last();
}
-//------------------------------------------------------------------------------
sal_Int32 OResultSet::getRow(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getRow" );
@@ -928,7 +891,6 @@ sal_Int32 OResultSet::getRow(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->getRow();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::absolute(sal_Int32 row) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::absolute" );
@@ -938,7 +900,6 @@ sal_Bool OResultSet::absolute(sal_Int32 row) throw( SQLException, RuntimeExcepti
return m_xDelegatorResultSet->absolute(row);
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::relative(sal_Int32 rows) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::relative" );
@@ -948,7 +909,6 @@ sal_Bool OResultSet::relative(sal_Int32 rows) throw( SQLException, RuntimeExcept
return m_xDelegatorResultSet->relative(rows);
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::previous(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::previous" );
@@ -958,7 +918,6 @@ sal_Bool OResultSet::previous(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->previous();
}
-//------------------------------------------------------------------------------
void OResultSet::refreshRow(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::refreshRow" );
@@ -968,7 +927,6 @@ void OResultSet::refreshRow(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSet->refreshRow();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::rowUpdated(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::rowUpdated" );
@@ -978,7 +936,6 @@ sal_Bool OResultSet::rowUpdated(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->rowUpdated();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::rowInserted(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::rowInserted" );
@@ -988,7 +945,6 @@ sal_Bool OResultSet::rowInserted(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->rowInserted();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::rowDeleted(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::rowDeleted" );
@@ -998,7 +954,6 @@ sal_Bool OResultSet::rowDeleted(void) throw( SQLException, RuntimeException )
return m_xDelegatorResultSet->rowDeleted();
}
-//------------------------------------------------------------------------------
Reference< XInterface > OResultSet::getStatement(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getStatement" );
@@ -1009,7 +964,6 @@ Reference< XInterface > OResultSet::getStatement(void) throw( SQLException, Runt
}
// ::com::sun::star::sdbcx::XRowLocate
-//------------------------------------------------------------------------------
Any OResultSet::getBookmark(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::getBookmark" );
@@ -1021,7 +975,6 @@ Any OResultSet::getBookmark(void) throw( SQLException, RuntimeException )
return Reference< XRowLocate >(m_xDelegatorResultSet, UNO_QUERY)->getBookmark();
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::moveToBookmark(const Any& bookmark) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::moveToBookmark" );
@@ -1033,19 +986,17 @@ sal_Bool OResultSet::moveToBookmark(const Any& bookmark) throw( SQLException, Ru
return Reference< XRowLocate >(m_xDelegatorResultSet, UNO_QUERY)->moveToBookmark(bookmark);
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::moveRelativeToBookmark(const Any& bookmark, sal_Int32 rows) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::moveRelativeToBookmark" );
MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(OResultSetBase::rBHelper.bDisposed);
-
+
checkBookmarkable();
return Reference< XRowLocate >(m_xDelegatorResultSet, UNO_QUERY)->moveRelativeToBookmark(bookmark, rows);
}
-//------------------------------------------------------------------------------
sal_Int32 OResultSet::compareBookmarks(const Any& _first, const Any& _second) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::compareBookmarks" );
@@ -1057,7 +1008,6 @@ sal_Int32 OResultSet::compareBookmarks(const Any& _first, const Any& _second) th
return Reference< XRowLocate >(m_xDelegatorResultSet, UNO_QUERY)->compareBookmarks(_first, _second);
}
-//------------------------------------------------------------------------------
sal_Bool OResultSet::hasOrderedBookmarks(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::hasOrderedBookmarks" );
@@ -1069,7 +1019,6 @@ sal_Bool OResultSet::hasOrderedBookmarks(void) throw( SQLException, RuntimeExcep
return Reference< XRowLocate >(m_xDelegatorResultSet, UNO_QUERY)->hasOrderedBookmarks();
}
-//------------------------------------------------------------------------------
sal_Int32 OResultSet::hashBookmark(const Any& bookmark) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::hashBookmark" );
@@ -1082,7 +1031,6 @@ sal_Int32 OResultSet::hashBookmark(const Any& bookmark) throw( SQLException, Run
}
// ::com::sun::star::sdbc::XResultSetUpdate
-//------------------------------------------------------------------------------
void OResultSet::insertRow(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::insertRow" );
@@ -1094,7 +1042,6 @@ void OResultSet::insertRow(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSetUpdate->insertRow();
}
-//------------------------------------------------------------------------------
void OResultSet::updateRow(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::updateRow" );
@@ -1106,7 +1053,6 @@ void OResultSet::updateRow(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSetUpdate->updateRow();
}
-//------------------------------------------------------------------------------
void OResultSet::deleteRow(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::deleteRow" );
@@ -1118,7 +1064,6 @@ void OResultSet::deleteRow(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSetUpdate->deleteRow();
}
-//------------------------------------------------------------------------------
void OResultSet::cancelRowUpdates(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::cancelRowUpdates" );
@@ -1130,7 +1075,6 @@ void OResultSet::cancelRowUpdates(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSetUpdate->cancelRowUpdates();
}
-//------------------------------------------------------------------------------
void OResultSet::moveToInsertRow(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::moveToInsertRow" );
@@ -1142,7 +1086,6 @@ void OResultSet::moveToInsertRow(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSetUpdate->moveToInsertRow();
}
-//------------------------------------------------------------------------------
void OResultSet::moveToCurrentRow(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::moveToCurrentRow" );
@@ -1154,7 +1097,6 @@ void OResultSet::moveToCurrentRow(void) throw( SQLException, RuntimeException )
m_xDelegatorResultSetUpdate->moveToCurrentRow();
}
-// -----------------------------------------------------------------------------
void OResultSet::checkReadOnly() const
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::checkReadOnly" );
@@ -1164,13 +1106,10 @@ void OResultSet::checkReadOnly() const
throwSQLException( "The result set is read-only.", SQL_GENERAL_ERROR, *const_cast< OResultSet* >( this ) );
}
-// -----------------------------------------------------------------------------
void OResultSet::checkBookmarkable() const
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OResultSet::checkBookmarkable" );
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/resultset.hxx b/dbaccess/source/core/api/resultset.hxx
index 6fc8f3121..0063e0b02 100644
--- a/dbaccess/source/core/api/resultset.hxx
+++ b/dbaccess/source/core/api/resultset.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/api/statement.cxx b/dbaccess/source/core/api/statement.cxx
index a2e03ac49..b8465d636 100644
--- a/dbaccess/source/core/api/statement.cxx
+++ b/dbaccess/source/core/api/statement.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -54,7 +54,6 @@ using namespace dbtools;
DBG_NAME(OStatementBase)
-//--------------------------------------------------------------------------
OStatementBase::OStatementBase(const Reference< XConnection > & _xConn,
const Reference< XInterface > & _xStatement)
:OSubComponent(m_aMutex, _xConn)
@@ -70,14 +69,12 @@ OStatementBase::OStatementBase(const Reference< XConnection > & _xConn,
m_xAggregateAsCancellable = Reference< ::com::sun::star::util::XCancellable > (m_xAggregateAsSet, UNO_QUERY);
}
-//--------------------------------------------------------------------------
OStatementBase::~OStatementBase()
{
DBG_DTOR(OStatementBase, NULL);
}
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > OStatementBase::getTypes() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getTypes" );
@@ -98,7 +95,6 @@ Sequence< Type > OStatementBase::getTypes() throw (RuntimeException)
}
// com::sun::star::uno::XInterface
-//--------------------------------------------------------------------------
Any OStatementBase::queryInterface( const Type & rType ) throw (RuntimeException)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::queryInterface" );
@@ -128,19 +124,16 @@ Any OStatementBase::queryInterface( const Type & rType ) throw (RuntimeException
return aIface;
}
-//--------------------------------------------------------------------------
void OStatementBase::acquire() throw ()
{
OSubComponent::acquire();
}
-//--------------------------------------------------------------------------
void OStatementBase::release() throw ()
{
OSubComponent::release();
}
-//------------------------------------------------------------------------------
void OStatementBase::disposeResultSet()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::disposeResultSet" );
@@ -152,7 +145,6 @@ void OStatementBase::disposeResultSet()
}
// OComponentHelper
-//------------------------------------------------------------------------------
void OStatementBase::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::disposing" );
@@ -186,7 +178,6 @@ void OStatementBase::disposing()
}
// XCloseable
-//------------------------------------------------------------------------------
void OStatementBase::close(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::close" );
@@ -198,7 +189,6 @@ void OStatementBase::close(void) throw( SQLException, RuntimeException )
}
// OPropertySetHelper
-//------------------------------------------------------------------------------
Reference< XPropertySetInfo > OStatementBase::getPropertySetInfo() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getPropertySetInfo" );
@@ -206,7 +196,6 @@ Reference< XPropertySetInfo > OStatementBase::getPropertySetInfo() throw (Runtim
}
// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* OStatementBase::createArrayHelper( ) const
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::createArrayHelper" );
@@ -225,14 +214,12 @@ Reference< XPropertySetInfo > OStatementBase::getPropertySetInfo() throw (Runtim
}
// cppu::OPropertySetHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& OStatementBase::getInfoHelper()
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getInfoHelper" );
return *getArrayHelper();
}
-//------------------------------------------------------------------------------
sal_Bool OStatementBase::convertFastPropertyValue( Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle, const Any& rValue ) throw( IllegalArgumentException )
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::convertFastPropertyValue" );
@@ -268,7 +255,6 @@ sal_Bool OStatementBase::convertFastPropertyValue( Any & rConvertedValue, Any &
return bModified;
}
-//------------------------------------------------------------------------------
void OStatementBase::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception)
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::setFastPropertyValue_NoBroadcast" );
@@ -299,7 +285,6 @@ void OStatementBase::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const
}
}
-//------------------------------------------------------------------------------
void OStatementBase::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getFastPropertyValue" );
@@ -327,7 +312,6 @@ void OStatementBase::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) cons
}
// XWarningsSupplier
-//------------------------------------------------------------------------------
Any OStatementBase::getWarnings(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getWarnings" );
@@ -337,7 +321,6 @@ Any OStatementBase::getWarnings(void) throw( SQLException, RuntimeException )
return Reference< XWarningsSupplier >(m_xAggregateAsSet, UNO_QUERY)->getWarnings();
}
-//------------------------------------------------------------------------------
void OStatementBase::clearWarnings(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::clearWarnings" );
@@ -348,7 +331,6 @@ void OStatementBase::clearWarnings(void) throw( SQLException, RuntimeException )
}
// ::com::sun::star::util::XCancellable
-//------------------------------------------------------------------------------
void OStatementBase::cancel(void) throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::cancel" );
@@ -360,7 +342,6 @@ void OStatementBase::cancel(void) throw( RuntimeException )
}
// XMultipleResults
-//------------------------------------------------------------------------------
Reference< XResultSet > SAL_CALL OStatementBase::getResultSet( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getResultSet" );
@@ -375,7 +356,6 @@ Reference< XResultSet > SAL_CALL OStatementBase::getResultSet( ) throw(SQLExcep
return Reference< XMultipleResults >(m_xAggregateAsSet, UNO_QUERY)->getResultSet();
}
-//------------------------------------------------------------------------------
sal_Int32 SAL_CALL OStatementBase::getUpdateCount( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getUpdateCount" );
@@ -390,7 +370,6 @@ sal_Int32 SAL_CALL OStatementBase::getUpdateCount( ) throw(SQLException, Runtim
return Reference< XMultipleResults >(m_xAggregateAsSet, UNO_QUERY)->getUpdateCount();
}
-//------------------------------------------------------------------------------
sal_Bool SAL_CALL OStatementBase::getMoreResults( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getMoreResults" );
@@ -410,7 +389,6 @@ sal_Bool SAL_CALL OStatementBase::getMoreResults( ) throw(SQLException, Runtime
}
// XPreparedBatchExecution
-//------------------------------------------------------------------------------
void SAL_CALL OStatementBase::addBatch( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::addBatch" );
@@ -425,7 +403,6 @@ void SAL_CALL OStatementBase::addBatch( ) throw(SQLException, RuntimeException)
Reference< XPreparedBatchExecution >(m_xAggregateAsSet, UNO_QUERY)->addBatch();
}
-//------------------------------------------------------------------------------
void SAL_CALL OStatementBase::clearBatch( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::clearBatch" );
@@ -440,7 +417,6 @@ void SAL_CALL OStatementBase::clearBatch( ) throw(SQLException, RuntimeExceptio
Reference< XPreparedBatchExecution >(m_xAggregateAsSet, UNO_QUERY)->clearBatch();
}
-//------------------------------------------------------------------------------
Sequence< sal_Int32 > SAL_CALL OStatementBase::executeBatch( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::executeBatch" );
@@ -457,7 +433,7 @@ Sequence< sal_Int32 > SAL_CALL OStatementBase::executeBatch( ) throw(SQLExcepti
return Reference< XPreparedBatchExecution >(m_xAggregateAsSet, UNO_QUERY)->executeBatch();
}
-// -----------------------------------------------------------------------------
+
Reference< XResultSet > SAL_CALL OStatementBase::getGeneratedValues( ) throw (SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatementBase::getGeneratedValues" );
@@ -473,7 +449,6 @@ Reference< XResultSet > SAL_CALL OStatementBase::getGeneratedValues( ) throw (S
//************************************************************
// OStatement
//************************************************************
-//------------------------------------------------------------------------------
OStatement::OStatement( const Reference< XConnection >& _xConn, const Reference< XInterface > & _xStatement )
:OStatementBase( _xConn, _xStatement )
,m_bAttemptedComposerCreation( false )
@@ -482,26 +457,22 @@ OStatement::OStatement( const Reference< XConnection >& _xConn, const Reference<
m_xAggregateStatement.set( _xStatement, UNO_QUERY_THROW );
}
-//------------------------------------------------------------------------------
IMPLEMENT_FORWARD_XINTERFACE2( OStatement, OStatementBase, OStatement_IFACE );
IMPLEMENT_FORWARD_XTYPEPROVIDER2( OStatement, OStatementBase, OStatement_IFACE );
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OStatement::getImplementationName( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::getImplementationName" );
return rtl::OUString::createFromAscii("com.sun.star.sdb.OStatement");
}
-//------------------------------------------------------------------------------
sal_Bool OStatement::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::supportsService" );
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OStatement::getSupportedServiceNames( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::getSupportedServiceNames" );
@@ -511,7 +482,6 @@ Sequence< ::rtl::OUString > OStatement::getSupportedServiceNames( ) throw (Runt
}
// XStatement
-//------------------------------------------------------------------------------
Reference< XResultSet > OStatement::executeQuery( const rtl::OUString& _rSQL ) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::executeQuery" );
@@ -539,7 +509,6 @@ Reference< XResultSet > OStatement::executeQuery( const rtl::OUString& _rSQL ) t
return xResultSet;
}
-//------------------------------------------------------------------------------
sal_Int32 OStatement::executeUpdate( const rtl::OUString& _rSQL ) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::executeUpdate" );
@@ -552,7 +521,6 @@ sal_Int32 OStatement::executeUpdate( const rtl::OUString& _rSQL ) throw( SQLExce
return m_xAggregateStatement->executeUpdate( sSQL );
}
-//------------------------------------------------------------------------------
sal_Bool OStatement::execute( const rtl::OUString& _rSQL ) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::execute" );
@@ -564,7 +532,7 @@ sal_Bool OStatement::execute( const rtl::OUString& _rSQL ) throw( SQLException,
::rtl::OUString sSQL( impl_doEscapeProcessing_nothrow( _rSQL ) );
return m_xAggregateStatement->execute( sSQL );
}
-//------------------------------------------------------------------------------
+
void OStatement::addBatch( const rtl::OUString& _rSQL ) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::execute" );
@@ -579,7 +547,7 @@ void OStatement::addBatch( const rtl::OUString& _rSQL ) throw( SQLException, Run
::rtl::OUString sSQL( impl_doEscapeProcessing_nothrow( _rSQL ) );
Reference< XBatchExecution >(m_xAggregateAsSet, UNO_QUERY)->addBatch( sSQL );
}
-//------------------------------------------------------------------------------
+
void OStatement::clearBatch( ) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::execute" );
@@ -592,7 +560,7 @@ void OStatement::clearBatch( ) throw( SQLException, RuntimeException )
Reference< XBatchExecution >(m_xAggregateAsSet, UNO_QUERY)->clearBatch();
}
-//------------------------------------------------------------------------------
+
Sequence< sal_Int32 > OStatement::executeBatch( ) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::execute" );
@@ -605,14 +573,13 @@ Sequence< sal_Int32 > OStatement::executeBatch( ) throw( SQLException, RuntimeEx
return Reference< XBatchExecution >(m_xAggregateAsSet, UNO_QUERY)->executeBatch( );
}
-//------------------------------------------------------------------------------
+
Reference< XConnection > OStatement::getConnection(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::getConnection" );
return Reference< XConnection >( m_xParent, UNO_QUERY );
}
-// -----------------------------------------------------------------------------
void SAL_CALL OStatement::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::disposing" );
@@ -621,7 +588,6 @@ void SAL_CALL OStatement::disposing()
m_xAggregateStatement.clear();
}
-// -----------------------------------------------------------------------------
::rtl::OUString OStatement::impl_doEscapeProcessing_nothrow( const ::rtl::OUString& _rSQL ) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::impl_doEscapeProcessing_nothrow" );
@@ -635,7 +601,7 @@ void SAL_CALL OStatement::disposing()
bool bParseable = false;
try { m_xComposer->setQuery( _rSQL ); bParseable = true; }
catch( const SQLException& ) { }
-
+
if ( !bParseable )
// if we cannot parse it, silently accept this. The driver is probably able to cope with it then
return _rSQL;
@@ -651,7 +617,6 @@ void SAL_CALL OStatement::disposing()
return _rSQL;
}
-// -----------------------------------------------------------------------------
bool OStatement::impl_ensureComposer_nothrow() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OStatement::impl_ensureComposer_nothrow" );
diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx
index 30f278df6..c25bdbec6 100644
--- a/dbaccess/source/core/api/table.cxx
+++ b/dbaccess/source/core/api/table.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -76,13 +76,13 @@ typedef ::std::map <sal_Int32, OTableColumn*, std::less <sal_Int32> > OColMap;
//= ODBTable
//==========================================================================
DBG_NAME(ODBTable)
-//--------------------------------------------------------------------------
+
ODBTable::ODBTable(connectivity::sdbcx::OCollection* _pTables
,const Reference< XConnection >& _rxConn
,const ::rtl::OUString& _rCatalog
- ,const ::rtl::OUString& _rSchema
+ ,const ::rtl::OUString& _rSchema
,const ::rtl::OUString& _rName
- ,const ::rtl::OUString& _rType
+ ,const ::rtl::OUString& _rType
,const ::rtl::OUString& _rDesc
,const Reference< XNameAccess >& _xColumnDefinitions) throw(SQLException)
:OTable_Base(_pTables,_rxConn,_rxConn->getMetaData().is() && _rxConn->getMetaData()->supportsMixedCaseQuotedIdentifiers(), _rName, _rType, _rDesc, _rSchema, _rCatalog )
@@ -98,25 +98,24 @@ ODBTable::ODBTable(connectivity::sdbcx::OCollection* _pTables
// ODBC driver does not allow more than one statement per connection, and in getFastPropertyValue it's more
// likely that it's already used up than it's here.)
}
-// -----------------------------------------------------------------------------
+
ODBTable::ODBTable(connectivity::sdbcx::OCollection* _pTables
,const Reference< XConnection >& _rxConn)
- throw(SQLException)
+ throw(SQLException)
:OTable_Base(_pTables,_rxConn, _rxConn->getMetaData().is() && _rxConn->getMetaData()->supportsMixedCaseQuotedIdentifiers())
,m_nPrivileges(-1)
{
DBG_CTOR(ODBTable, NULL);
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::ODBTable" );
}
-// -------------------------------------------------------------------------
+
ODBTable::~ODBTable()
{
DBG_DTOR(ODBTable, NULL);
}
-// -----------------------------------------------------------------------------
+
IMPLEMENT_FORWARD_REFCOUNT(ODBTable,OTable_Base)
-//--------------------------------------------------------------------------
OColumn* ODBTable::createColumn(const ::rtl::OUString& _rName) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::createColumn" );
@@ -140,13 +139,13 @@ OColumn* ODBTable::createColumn(const ::rtl::OUString& _rName) const
return pReturn;
}
-// -----------------------------------------------------------------------------
+
void ODBTable::columnAppended( const Reference< XPropertySet >& /*_rxSourceDescriptor*/ )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::columnAppended" );
// not interested in
}
-// -----------------------------------------------------------------------------
+
void ODBTable::columnDropped(const ::rtl::OUString& _sName)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::columnDropped" );
@@ -156,7 +155,7 @@ void ODBTable::columnDropped(const ::rtl::OUString& _sName)
xDrop->dropByName(_sName);
}
}
-//--------------------------------------------------------------------------
+
Sequence< sal_Int8 > ODBTable::getImplementationId() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::getImplementationId" );
@@ -174,7 +173,6 @@ Sequence< sal_Int8 > ODBTable::getImplementationId() throw (RuntimeException)
}
// OComponentHelper
-//------------------------------------------------------------------------------
void SAL_CALL ODBTable::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::disposing" );
@@ -185,7 +183,6 @@ void SAL_CALL ODBTable::disposing()
m_pColumnMediator = NULL;
}
-//------------------------------------------------------------------------------
void ODBTable::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::getFastPropertyValue" );
@@ -196,12 +193,12 @@ void ODBTable::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const
OTable_Base::getFastPropertyValue(_rValue, _nHandle);
}
-// -------------------------------------------------------------------------
+
void ODBTable::construct()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::construct" );
::osl::MutexGuard aGuard(m_aMutex);
-
+
// we don't collect the privileges here, this is potentially expensive. Instead we determine them on request.
// (see getFastPropertyValue)
m_nPrivileges = -1;
@@ -228,10 +225,10 @@ void ODBTable::construct()
registerProperty(PROPERTY_PRIVILEGES, PROPERTY_ID_PRIVILEGES, PropertyAttribute::BOUND | PropertyAttribute::READONLY,
&m_nPrivileges, ::getCppuType(static_cast<sal_Int32*>(NULL)));
-
+
registerMayBeVoidProperty(PROPERTY_TEXTLINECOLOR, PROPERTY_ID_TEXTLINECOLOR, PropertyAttribute::BOUND | PropertyAttribute::MAYBEVOID,
&m_aTextLineColor, ::getCppuType(static_cast<sal_Int32*>(NULL)));
-
+
registerProperty(PROPERTY_TEXTEMPHASIS, PROPERTY_ID_TEXTEMPHASIS, PropertyAttribute::BOUND,
&m_nFontEmphasis, ::getCppuType(&m_nFontEmphasis));
@@ -257,7 +254,7 @@ void ODBTable::construct()
refreshColumns();
}
-// -----------------------------------------------------------------------------
+
::cppu::IPropertyArrayHelper* ODBTable::createArrayHelper( sal_Int32 _nId) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::createArrayHelper" );
@@ -279,18 +276,18 @@ void ODBTable::construct()
pIter->Attributes = PropertyAttribute::READONLY;
}
}
-
- return new ::cppu::OPropertyArrayHelper(aProps);
+
+ return new ::cppu::OPropertyArrayHelper(aProps);
}
-// -----------------------------------------------------------------------------
-::cppu::IPropertyArrayHelper & SAL_CALL ODBTable::getInfoHelper()
-{
+
+::cppu::IPropertyArrayHelper & SAL_CALL ODBTable::getInfoHelper()
+{
return *ODBTable_PROP::getArrayHelper(isNew() ? 1 : 0);
}
-// -------------------------------------------------------------------------
+
// XServiceInfo
IMPLEMENT_SERVICE_INFO1(ODBTable, "com.sun.star.sdb.dbaccess.ODBTable", SERVICE_SDBCX_TABLE)
-// -------------------------------------------------------------------------
+
Any SAL_CALL ODBTable::queryInterface( const Type & rType ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::getInfoHelper" );
@@ -300,7 +297,7 @@ Any SAL_CALL ODBTable::queryInterface( const Type & rType ) throw(RuntimeExcepti
return Any();
return OTable_Base::queryInterface( rType);
}
-// -------------------------------------------------------------------------
+
Sequence< Type > SAL_CALL ODBTable::getTypes( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::getTypes" );
@@ -309,7 +306,7 @@ Sequence< Type > SAL_CALL ODBTable::getTypes( ) throw(RuntimeException)
Sequence< Type > aTypes(OTable_Base::getTypes());
::std::vector<Type> aOwnTypes;
- aOwnTypes.reserve(aTypes.getLength());
+ aOwnTypes.reserve(aTypes.getLength());
const Type* pIter = aTypes.getConstArray();
const Type* pEnd = pIter + aTypes.getLength();
@@ -318,12 +315,12 @@ Sequence< Type > SAL_CALL ODBTable::getTypes( ) throw(RuntimeException)
if( (*pIter != aRenameType || getRenameService().is()) && (*pIter != aAlterType || getAlterService().is()))
aOwnTypes.push_back(*pIter);
}
-
+
Type* pTypes = aOwnTypes.empty() ? 0 : &aOwnTypes[0];
return Sequence< Type >(pTypes, aOwnTypes.size());
}
+
// XRename,
-//------------------------------------------------------------------------------
void SAL_CALL ODBTable::rename( const ::rtl::OUString& _rNewName ) throw(SQLException, ElementExistException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::rename" );
@@ -338,7 +335,6 @@ void SAL_CALL ODBTable::rename( const ::rtl::OUString& _rNewName ) throw(SQLExce
}
// XAlterTable,
-//------------------------------------------------------------------------------
void SAL_CALL ODBTable::alterColumnByName( const ::rtl::OUString& _rName, const Reference< XPropertySet >& _rxDescriptor ) throw(SQLException, NoSuchElementException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::alterColumnByName" );
@@ -354,7 +350,7 @@ void SAL_CALL ODBTable::alterColumnByName( const ::rtl::OUString& _rName, const
getAlterService()->alterColumnByName(xTable,_rName,_rxDescriptor);
m_pColumns->refresh();
}
-// -----------------------------------------------------------------------------
+
sal_Int64 SAL_CALL ODBTable::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::getSomething" );
@@ -366,7 +362,7 @@ sal_Int64 SAL_CALL ODBTable::getSomething( const Sequence< sal_Int8 >& rId ) thr
return nRet;
}
-// -----------------------------------------------------------------------------
+
Sequence< sal_Int8 > ODBTable::getUnoTunnelImplementationId()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::getUnoTunnelImplementationId" );
@@ -382,13 +378,13 @@ Sequence< sal_Int8 > ODBTable::getUnoTunnelImplementationId()
}
return pId->getImplementationId();
}
-// -----------------------------------------------------------------------------
+
Reference< XPropertySet > ODBTable::createColumnDescriptor()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::createColumnDescriptor" );
return new OTableColumnDescriptor( true );
}
-// -----------------------------------------------------------------------------
+
sdbcx::OCollection* ODBTable::createColumns(const TStringVector& _rNames)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::createColumns" );
@@ -402,18 +398,16 @@ sdbcx::OCollection* ODBTable::createColumns(const TStringVector& _rNames)
pCol->setMediator( m_pColumnMediator.get() );
return pCol;
}
-// -----------------------------------------------------------------------------
+
sdbcx::OCollection* ODBTable::createKeys(const TStringVector& _rNames)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::createKeys" );
return new connectivity::OKeysHelper(this,m_aMutex,_rNames);
}
-// -----------------------------------------------------------------------------
+
sdbcx::OCollection* ODBTable::createIndexes(const TStringVector& _rNames)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "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 2b66d53ec..dc26115c6 100644
--- a/dbaccess/source/core/api/tablecontainer.cxx
+++ b/dbaccess/source/core/api/tablecontainer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -110,8 +110,8 @@ namespace
//= OTableContainer
//==========================================================================
DBG_NAME(OTableContainer)
-//------------------------------------------------------------------------------
-OTableContainer::OTableContainer(::cppu::OWeakObject& _rParent,
+
+OTableContainer::OTableContainer(::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,
const Reference< XConnection >& _xCon,
sal_Bool _bCase,
@@ -123,11 +123,10 @@ OTableContainer::OTableContainer(::cppu::OWeakObject& _rParent,
,m_xTableDefinitions(_xTableDefinitions)
,m_pTableMediator( NULL )
,m_bInDrop(sal_False)
-{
+{
DBG_CTOR(OTableContainer, NULL);
}
-//------------------------------------------------------------------------------
OTableContainer::~OTableContainer()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::OTableContainer" );
@@ -135,7 +134,6 @@ OTableContainer::~OTableContainer()
DBG_DTOR(OTableContainer, NULL);
}
-// -----------------------------------------------------------------------------
void OTableContainer::removeMasterContainerListener()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::removeMasterContainerListener" );
@@ -150,19 +148,15 @@ void OTableContainer::removeMasterContainerListener()
}
}
-// -----------------------------------------------------------------------------
::rtl::OUString OTableContainer::getTableTypeRestriction() const
{
// no restriction at all (other than the ones provided externally)
return ::rtl::OUString();
}
-// -----------------------------------------------------------------------------
// XServiceInfo
-//------------------------------------------------------------------------------
IMPLEMENT_SERVICE_INFO2(OTableContainer, "com.sun.star.sdb.dbaccess.OTableContainer", SERVICE_SDBCX_CONTAINER, SERVICE_SDBCX_TABLES)
-// -----------------------------------------------------------------------------
namespace
{
void lcl_createDefintionObject(const ::rtl::OUString& _rName
@@ -189,12 +183,12 @@ void lcl_createDefintionObject(const ::rtl::OUString& _rName
}
Reference<XColumnsSupplier> xColumnsSupplier(_xTableDefinition,UNO_QUERY);
if ( xColumnsSupplier.is() )
- _xColumnDefinitions = xColumnsSupplier->getColumns();
+ _xColumnDefinitions = xColumnsSupplier->getColumns();
}
}
-// -------------------------------------------------------------------------
+
}
-// -------------------------------------------------------------------------
+
connectivity::sdbcx::ObjectType OTableContainer::createObject(const ::rtl::OUString& _rName)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::createObject" );
@@ -208,7 +202,7 @@ connectivity::sdbcx::ObjectType OTableContainer::createObject(const ::rtl::OUStr
Reference<XPropertySet> xTableDefinition;
Reference<XNameAccess> xColumnDefinitions;
lcl_createDefintionObject(_rName,m_xTableDefinitions,xTableDefinition,xColumnDefinitions,sal_False);
-
+
if ( xSup.is() )
{
ODBTableDecorator* pTable = new ODBTableDecorator( m_xConnection, xSup, ::dbtools::getNumberFormats( m_xConnection ) ,xColumnDefinitions);
@@ -220,8 +214,8 @@ connectivity::sdbcx::ObjectType OTableContainer::createObject(const ::rtl::OUStr
::rtl::OUString sCatalog,sSchema,sTable;
::dbtools::qualifiedNameComponents(m_xMetaData,
_rName,
- sCatalog,
- sSchema,
+ sCatalog,
+ sSchema,
sTable,
::dbtools::eInDataManipulation);
Any aCatalog;
@@ -263,10 +257,10 @@ connectivity::sdbcx::ObjectType OTableContainer::createObject(const ::rtl::OUStr
if ( m_pTableMediator.is() )
m_pTableMediator->notifyElementCreated(_rName,xDest);
}
-
+
return xRet;
}
-// -----------------------------------------------------------------------------
+
Reference< XPropertySet > OTableContainer::createDescriptor()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::createDescriptor" );
@@ -291,7 +285,7 @@ Reference< XPropertySet > OTableContainer::createDescriptor()
}
return xRet;
}
-// -----------------------------------------------------------------------------
+
// XAppend
ObjectType OTableContainer::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
@@ -379,7 +373,7 @@ ObjectType OTableContainer::appendObject( const ::rtl::OUString& _rForName, cons
return createObject( _rForName );
}
-// -------------------------------------------------------------------------
+
// XDrop
void OTableContainer::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
{
@@ -415,7 +409,7 @@ void OTableContainer::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElement
::dbtools::throwFunctionSequenceException(static_cast<XTypeProvider*>(static_cast<OFilteredContainer*>(this)));
::rtl::OUString aSql = ::rtl::OUString::createFromAscii("DROP ");
-
+
if ( bIsView ) // here we have a view
aSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VIEW "));
else
@@ -444,7 +438,7 @@ void OTableContainer::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElement
}
m_bInDrop = sal_False;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OTableContainer::elementInserted( const ContainerEvent& Event ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::elementInserted" );
@@ -463,12 +457,12 @@ void SAL_CALL OTableContainer::elementInserted( const ContainerEvent& Event ) th
}
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OTableContainer::elementRemoved( const ContainerEvent& /*Event*/ ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::elementRemoved" );
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OTableContainer::elementReplaced( const ContainerEvent& Event ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::elementReplaced" );
@@ -477,11 +471,11 @@ void SAL_CALL OTableContainer::elementReplaced( const ContainerEvent& Event ) th
::rtl::OUString sOldComposedName,sNewComposedName;
Event.ReplacedElement >>= sOldComposedName;
Event.Accessor >>= sNewComposedName;
-
+
renameObject(sOldComposedName,sNewComposedName);
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OTableContainer::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::disposing" );
@@ -490,13 +484,12 @@ void SAL_CALL OTableContainer::disposing()
m_xTableDefinitions = NULL;
m_pTableMediator = NULL;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OTableContainer::disposing( const ::com::sun::star::lang::EventObject& /*Source*/ ) throw (::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "api", "Ocke.Janssen@sun.com", "OTableContainer::disposing" );
}
-// -----------------------------------------------------------------------------
void OTableContainer::addMasterContainerListener()
{
try
@@ -509,5 +502,4 @@ 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 0cc24ced5..a1d8c1643 100644
--- a/dbaccess/source/core/api/viewcontainer.cxx
+++ b/dbaccess/source/core/api/viewcontainer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -73,7 +73,7 @@ using namespace ::connectivity::sdbcx;
//= OViewContainer
//==========================================================================
DBG_NAME(OViewContainer)
-//------------------------------------------------------------------------------
+
OViewContainer::OViewContainer(::cppu::OWeakObject& _rParent
,::osl::Mutex& _rMutex
,const Reference< XConnection >& _xCon
@@ -87,17 +87,15 @@ OViewContainer::OViewContainer(::cppu::OWeakObject& _rParent
DBG_CTOR(OViewContainer, NULL);
}
-//------------------------------------------------------------------------------
OViewContainer::~OViewContainer()
{
// dispose();
DBG_DTOR(OViewContainer, NULL);
}
-//------------------------------------------------------------------------------
+
// XServiceInfo
-//------------------------------------------------------------------------------
IMPLEMENT_SERVICE_INFO2(OViewContainer, "com.sun.star.sdb.dbaccess.OViewContainer", SERVICE_SDBCX_CONTAINER, SERVICE_SDBCX_TABLES)
-// -----------------------------------------------------------------------------
+
ObjectType OViewContainer::createObject(const ::rtl::OUString& _rName)
{
ObjectType xProp;
@@ -109,8 +107,8 @@ ObjectType OViewContainer::createObject(const ::rtl::OUString& _rName)
::rtl::OUString sCatalog,sSchema,sTable;
::dbtools::qualifiedNameComponents(m_xMetaData,
_rName,
- sCatalog,
- sSchema,
+ sCatalog,
+ sSchema,
sTable,
::dbtools::eInDataManipulation);
return new View(m_xConnection,
@@ -123,7 +121,7 @@ ObjectType OViewContainer::createObject(const ::rtl::OUString& _rName)
return xProp;
}
-// -----------------------------------------------------------------------------
+
Reference< XPropertySet > OViewContainer::createDescriptor()
{
Reference< XPropertySet > xRet;
@@ -138,7 +136,7 @@ Reference< XPropertySet > OViewContainer::createDescriptor()
return xRet;
}
-// -----------------------------------------------------------------------------
+
// XAppend
ObjectType OViewContainer::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
@@ -182,7 +180,7 @@ ObjectType OViewContainer::appendObject( const ::rtl::OUString& _rForName, const
return createObject( _rForName );
}
-// -------------------------------------------------------------------------
+
// XDrop
void OViewContainer::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementName)
{
@@ -222,7 +220,7 @@ void OViewContainer::dropObject(sal_Int32 _nPos,const ::rtl::OUString _sElementN
}
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OViewContainer::elementInserted( const ContainerEvent& Event ) throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_rMutex);
@@ -239,7 +237,7 @@ void SAL_CALL OViewContainer::elementInserted( const ContainerEvent& Event ) thr
insertElement(sName,createObject(sName));
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OViewContainer::elementRemoved( const ContainerEvent& Event ) throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_rMutex);
@@ -259,15 +257,15 @@ void SAL_CALL OViewContainer::elementRemoved( const ContainerEvent& Event ) thro
m_bInElementRemoved = false;
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OViewContainer::disposing( const ::com::sun::star::lang::EventObject& /*Source*/ ) throw (RuntimeException)
{
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OViewContainer::elementReplaced( const ContainerEvent& /*Event*/ ) throw (RuntimeException)
{
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OViewContainer::getTableTypeRestriction() const
{
// no restriction at all (other than the ones provided externally)
diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
index f1d8b7006..df7a85434 100644
--- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
+++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -58,10 +58,9 @@ extern "C" void SAL_CALL createRegistryInfo_OComponentDefinition()
static ::dba::OAutoRegistration< ::dbaccess::OComponentDefinition > aAutoRegistration;
}
-//........................................................................
namespace dbaccess
{
-//........................................................................
+
/// helper class for column property change events which holds the OComponentDefinition weak
typedef ::cppu::WeakImplHelper1 < XPropertyChangeListener > TColumnPropertyListener_BASE;
class OColumnPropertyListener : public TColumnPropertyListener_BASE
@@ -86,22 +85,22 @@ public:
}
void clear() { m_pComponent = NULL; }
};
-DBG_NAME(OComponentDefinition_Impl)
+DBG_NAME(OComponentDefinition_Impl)
OComponentDefinition_Impl::OComponentDefinition_Impl()
{
DBG_CTOR(OComponentDefinition_Impl,NULL);
}
-// -----------------------------------------------------------------------------
+
OComponentDefinition_Impl::~OComponentDefinition_Impl()
{
- DBG_DTOR(OComponentDefinition_Impl,NULL);
+ DBG_DTOR(OComponentDefinition_Impl,NULL);
}
//==========================================================================
//= OComponentDefinition
//==========================================================================
-//--------------------------------------------------------------------------
+
DBG_NAME(OComponentDefinition)
-//--------------------------------------------------------------------------
+
void OComponentDefinition::registerProperties()
{
m_xColumnPropertyListener = ::comphelper::ImplementationReference<OColumnPropertyListener,XPropertyChangeListener>(new OColumnPropertyListener(this));
@@ -121,7 +120,6 @@ void OComponentDefinition::registerProperties()
}
}
-//--------------------------------------------------------------------------
OComponentDefinition::OComponentDefinition(const Reference< XMultiServiceFactory >& _xORB
,const Reference< XInterface >& _xParentContainer
,const TContentPtr& _pImpl
@@ -133,13 +131,13 @@ OComponentDefinition::OComponentDefinition(const Reference< XMultiServiceFactory
DBG_CTOR(OComponentDefinition, NULL);
registerProperties();
}
-//--------------------------------------------------------------------------
+
OComponentDefinition::~OComponentDefinition()
{
DBG_DTOR(OComponentDefinition, NULL);
}
-//--------------------------------------------------------------------------
+
OComponentDefinition::OComponentDefinition( const Reference< XInterface >& _rxContainer
,const ::rtl::OUString& _rElementName
,const Reference< XMultiServiceFactory >& _xORB
@@ -156,44 +154,40 @@ OComponentDefinition::OComponentDefinition( const Reference< XInterface >& _rxCo
DBG_ASSERT(m_pImpl->m_aProps.aTitle.getLength() != 0, "OComponentDefinition::OComponentDefinition : invalid name !");
}
-//--------------------------------------------------------------------------
IMPLEMENT_IMPLEMENTATION_ID(OComponentDefinition);
IMPLEMENT_GETTYPES3(OComponentDefinition,ODataSettings,OContentHelper,OComponentDefinition_BASE);
IMPLEMENT_FORWARD_XINTERFACE3( OComponentDefinition,OContentHelper,ODataSettings,OComponentDefinition_BASE)
-//--------------------------------------------------------------------------
+
::rtl::OUString OComponentDefinition::getImplementationName_static( ) throw(RuntimeException)
{
return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.dba.OComponentDefinition"));
}
-//--------------------------------------------------------------------------
::rtl::OUString SAL_CALL OComponentDefinition::getImplementationName( ) throw(RuntimeException)
{
return getImplementationName_static();
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > OComponentDefinition::getSupportedServiceNames_static( ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aServices(2);
aServices.getArray()[0] = SERVICE_SDB_TABLEDEFINITION;
aServices.getArray()[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.Content"));
-
+
return aServices;
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL OComponentDefinition::getSupportedServiceNames( ) throw(RuntimeException)
{
return getSupportedServiceNames_static();
}
-//------------------------------------------------------------------------------
+
Reference< XInterface > OComponentDefinition::Create( const Reference< XComponentContext >& _rxContext )
{
::comphelper::ComponentContext aContext( _rxContext );
return *(new OComponentDefinition( aContext.getLegacyServiceFactory(), NULL, TContentPtr( new OComponentDefinition_Impl ) ) );
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OComponentDefinition::disposing()
{
OContentHelper::disposing();
@@ -202,26 +196,25 @@ void SAL_CALL OComponentDefinition::disposing()
m_xColumnPropertyListener->clear();
m_xColumnPropertyListener.dispose();
}
-// -----------------------------------------------------------------------------
+
IPropertyArrayHelper& OComponentDefinition::getInfoHelper()
{
return *getArrayHelper();
}
-//--------------------------------------------------------------------------
+
IPropertyArrayHelper* OComponentDefinition::createArrayHelper( ) const
{
Sequence< Property > aProps;
describeProperties(aProps);
return new OPropertyArrayHelper(aProps);
}
-//--------------------------------------------------------------------------
+
Reference< XPropertySetInfo > SAL_CALL OComponentDefinition::getPropertySetInfo( ) throw(RuntimeException)
{
Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) );
return xInfo;
}
-// -----------------------------------------------------------------------------
::rtl::OUString OComponentDefinition::determineContentType() const
{
return m_bTable
@@ -229,7 +222,6 @@ Reference< XPropertySetInfo > SAL_CALL OComponentDefinition::getPropertySetInfo(
: ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.org.openoffice.DatabaseCommandDefinition" ) );
}
-// -----------------------------------------------------------------------------
Reference< XNameAccess> OComponentDefinition::getColumns() throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -252,7 +244,7 @@ Reference< XNameAccess> OComponentDefinition::getColumns() throw (RuntimeExcepti
}
return m_pColumns.get();
}
-// -----------------------------------------------------------------------------
+
OColumn* OComponentDefinition::createColumn(const ::rtl::OUString& _rName) const
{
const OComponentDefinition_Impl& rDefinition( getDefinition() );
@@ -260,30 +252,30 @@ OColumn* OComponentDefinition::createColumn(const ::rtl::OUString& _rName) const
if ( aFind != rDefinition.end() )
{
aFind->second->addPropertyChangeListener(::rtl::OUString(),m_xColumnPropertyListener.getRef());
- return new OTableColumnWrapper( aFind->second, aFind->second, true );
+ return new OTableColumnWrapper( aFind->second, aFind->second, true );
}
OSL_ENSURE( false, "OComponentDefinition::createColumn: is this a valid case?" );
// This here is the last place creating a OTableColumn, and somehow /me thinks it is not needed ...
return new OTableColumn( _rName );
}
-// -----------------------------------------------------------------------------
+
Reference< XPropertySet > OComponentDefinition::createColumnDescriptor()
{
return new OTableColumnDescriptor( true );
}
-// -----------------------------------------------------------------------------
+
void OComponentDefinition::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception)
{
ODataSettings::setFastPropertyValue_NoBroadcast(nHandle,rValue);
notifyDataSourceModified();
}
-// -----------------------------------------------------------------------------
-void OComponentDefinition::columnDropped(const ::rtl::OUString& _sName)
+
+void OComponentDefinition::columnDropped(const ::rtl::OUString& _sName)
{
getDefinition().erase( _sName );
notifyDataSourceModified();
}
-// -----------------------------------------------------------------------------
+
void OComponentDefinition::columnAppended( const Reference< XPropertySet >& _rxSourceDescriptor )
{
::rtl::OUString sName;
@@ -305,8 +297,5 @@ void OComponentDefinition::columnAppended( const Reference< XPropertySet >& _rxS
notifyDataSourceModified();
}
-//........................................................................
} // 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 cd679a685..bcff73306 100644
--- a/dbaccess/source/core/dataaccess/ComponentDefinition.hxx
+++ b/dbaccess/source/core/dataaccess/ComponentDefinition.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -99,14 +99,14 @@ class OComponentDefinition :public OContentHelper
,public ::comphelper::OPropertyArrayUsageHelper< OComponentDefinition >
{
OComponentDefinition();
-
+
protected:
::std::auto_ptr< OColumns > m_pColumns;
- ::comphelper::ImplementationReference< OColumnPropertyListener,::com::sun::star::beans::XPropertyChangeListener>
+ ::comphelper::ImplementationReference< OColumnPropertyListener,::com::sun::star::beans::XPropertyChangeListener>
m_xColumnPropertyListener;
sal_Bool m_bTable;
- virtual ~OComponentDefinition();
+ virtual ~OComponentDefinition();
virtual void SAL_CALL disposing();
diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index 5350e75b7..824e7cad1 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -60,18 +60,16 @@ using namespace ::com::sun::star::container;
using namespace ::comphelper;
using namespace ::cppu;
-// -----------------------------------------------------------------------------
DBG_NAME(OContentHelper_Impl)
OContentHelper_Impl::OContentHelper_Impl()
{
- DBG_CTOR(OContentHelper_Impl,NULL);
+ DBG_CTOR(OContentHelper_Impl,NULL);
}
-// -----------------------------------------------------------------------------
+
OContentHelper_Impl::~OContentHelper_Impl()
{
- DBG_DTOR(OContentHelper_Impl,NULL);
+ DBG_DTOR(OContentHelper_Impl,NULL);
}
-// -----------------------------------------------------------------------------
OContentHelper::OContentHelper(const Reference< XMultiServiceFactory >& _xORB
,const Reference< XInterface >& _xParentContainer
@@ -86,7 +84,7 @@ OContentHelper::OContentHelper(const Reference< XMultiServiceFactory >& _xORB
,m_nCommandId(0)
{
}
-//--------------------------------------------------------------------------
+
void SAL_CALL OContentHelper::disposing()
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -97,10 +95,10 @@ void SAL_CALL OContentHelper::disposing()
m_xParentContainer = NULL;
}
-// -----------------------------------------------------------------------------
+
IMPLEMENT_SERVICE_INFO1(OContentHelper,"com.sun.star.comp.sdb.Content","com.sun.star.ucb.Content");
IMPLEMENT_IMPLEMENTATION_ID(OContentHelper)
-// -----------------------------------------------------------------------------
+
// XContent
Reference< XContentIdentifier > SAL_CALL OContentHelper::getIdentifier( ) throw (RuntimeException)
{
@@ -110,7 +108,7 @@ Reference< XContentIdentifier > SAL_CALL OContentHelper::getIdentifier( ) throw
aIdentifier.append( impl_getHierarchicalName( true ) );
return new ::ucbhelper::ContentIdentifier( m_aContext.getLegacyServiceFactory(), aIdentifier.makeStringAndClear() );
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString OContentHelper::impl_getHierarchicalName( bool _includingRootContainer ) const
{
::rtl::OUStringBuffer aHierarchicalName( m_pImpl->m_aProps.aTitle );
@@ -137,7 +135,6 @@ Reference< XContentIdentifier > SAL_CALL OContentHelper::getIdentifier( ) throw
return sHierarchicalName;
}
-// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL OContentHelper::getContentType() throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -149,21 +146,20 @@ Reference< XContentIdentifier > SAL_CALL OContentHelper::getIdentifier( ) throw
return *m_pImpl->m_aProps.aContentType;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OContentHelper::addContentEventListener( const Reference< XContentEventListener >& _rxListener ) throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
if ( _rxListener.is() )
m_aContentListeners.addInterface(_rxListener);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OContentHelper::removeContentEventListener( const Reference< XContentEventListener >& _rxListener ) throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
if (_rxListener.is())
m_aContentListeners.removeInterface(_rxListener);
}
-// -----------------------------------------------------------------------------
// XCommandProcessor
sal_Int32 SAL_CALL OContentHelper::createCommandIdentifier( ) throw (RuntimeException)
@@ -172,7 +168,7 @@ sal_Int32 SAL_CALL OContentHelper::createCommandIdentifier( ) throw (RuntimeExc
// Just increase counter on every call to generate an identifier.
return ++m_nCommandId;
}
-// -----------------------------------------------------------------------------
+
Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*CommandId*/, const Reference< XCommandEnvironment >& Environment ) throw (Exception, CommandAbortedException, RuntimeException)
{
Any aRet;
@@ -258,11 +254,10 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma
return aRet;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OContentHelper::abort( sal_Int32 /*CommandId*/ ) throw (RuntimeException)
{
}
-// -----------------------------------------------------------------------------
// XPropertiesChangeNotifier
void SAL_CALL OContentHelper::addPropertiesChangeListener( const Sequence< ::rtl::OUString >& PropertyNames, const Reference< XPropertiesChangeListener >& Listener ) throw (RuntimeException)
@@ -286,7 +281,7 @@ void SAL_CALL OContentHelper::addPropertiesChangeListener( const Sequence< ::rtl
}
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OContentHelper::removePropertiesChangeListener( const Sequence< ::rtl::OUString >& PropertyNames, const Reference< XPropertiesChangeListener >& Listener ) throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -308,19 +303,18 @@ void SAL_CALL OContentHelper::removePropertiesChangeListener( const Sequence< ::
}
}
}
-// -----------------------------------------------------------------------------
// XPropertyContainer
-void SAL_CALL OContentHelper::addProperty( const ::rtl::OUString& /*Name*/, sal_Int16 /*Attributes*/, const Any& /*DefaultValue*/ ) throw (PropertyExistException, IllegalTypeException, IllegalArgumentException, RuntimeException)
+void SAL_CALL OContentHelper::addProperty( const ::rtl::OUString& /*Name*/, sal_Int16 /*Attributes*/, const Any& /*DefaultValue*/ ) throw (PropertyExistException, IllegalTypeException, IllegalArgumentException, RuntimeException)
{
DBG_ERROR( "OContentHelper::addProperty: not implemented!" );
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OContentHelper::removeProperty( const ::rtl::OUString& /*Name*/ ) throw (UnknownPropertyException, NotRemoveableException, RuntimeException)
{
DBG_ERROR( "OContentHelper::removeProperty: not implemented!" );
}
-// -----------------------------------------------------------------------------
+
// XInitialization
void SAL_CALL OContentHelper::initialize( const Sequence< Any >& _aArguments ) throw(Exception, RuntimeException)
{
@@ -344,7 +338,7 @@ void SAL_CALL OContentHelper::initialize( const Sequence< Any >& _aArguments ) t
}
}
}
-// -----------------------------------------------------------------------------
+
Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue >& rValues,const Reference< XCommandEnvironment >& /*xEnv*/ )
{
osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex );
@@ -456,7 +450,7 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue
return aRet;
}
-// -----------------------------------------------------------------------------
+
//=========================================================================
// static
Reference< XRow > OContentHelper::getPropertyValues( const Sequence< Property >& rProperties)
@@ -539,8 +533,7 @@ Reference< XRow > OContentHelper::getPropertyValues( const Sequence< Property >&
return Reference< XRow >( xRow.get() );
}
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
+
void OContentHelper::notifyPropertiesChange( const Sequence< PropertyChangeEvent >& evt ) const
{
@@ -564,7 +557,6 @@ void OContentHelper::notifyPropertiesChange( const Sequence< PropertyChangeEvent
typedef Sequence< PropertyChangeEvent > PropertyEventSequence;
typedef ::std::map< XPropertiesChangeListener*, PropertyEventSequence* > PropertiesEventListenerMap;
PropertiesEventListenerMap aListeners;
-
const PropertyChangeEvent* propertyChangeEvent = evt.getConstArray();
@@ -618,9 +610,8 @@ void OContentHelper::notifyPropertiesChange( const Sequence< PropertyChangeEvent
}
}
}
-// -----------------------------------------------------------------------------
+
// com::sun::star::lang::XUnoTunnel
-//------------------------------------------------------------------
sal_Int64 OContentHelper::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException)
{
if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
@@ -629,7 +620,6 @@ sal_Int64 OContentHelper::getSomething( const Sequence< sal_Int8 > & rId ) throw
return 0;
}
-// -----------------------------------------------------------------------------
OContentHelper* OContentHelper::getImplementation( const Reference< XInterface >& _rxComponent )
{
OContentHelper* pContent( NULL );
@@ -641,20 +631,18 @@ OContentHelper* OContentHelper::getImplementation( const Reference< XInterface >
return pContent;
}
-// -----------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OContentHelper::getParent( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
return m_xParentContainer;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OContentHelper::setParent( const Reference< XInterface >& _xParent ) throw (NoSupportException, RuntimeException)
{
::osl::MutexGuard aGuard(m_aMutex);
m_xParentContainer = _xParent;
}
-// -----------------------------------------------------------------------------
void OContentHelper::impl_rename_throw(const ::rtl::OUString& _sNewName,bool _bNotify )
{
osl::ClearableGuard< osl::Mutex > aGuard(m_aMutex);
@@ -670,9 +658,9 @@ void OContentHelper::impl_rename_throw(const ::rtl::OUString& _sNewName,bool _bN
aChanges[0].PropertyHandle = PROPERTY_ID_NAME;
aChanges[0].OldValue <<= m_pImpl->m_aProps.aTitle;
aChanges[0].NewValue <<= _sNewName;
-
+
aGuard.clear();
-
+
m_pImpl->m_aProps.aTitle = _sNewName;
if ( _bNotify )
notifyPropertiesChange( aChanges );
@@ -683,50 +671,18 @@ void OContentHelper::impl_rename_throw(const ::rtl::OUString& _sNewName,bool _bN
throw ElementExistException(_sNewName,*this);
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OContentHelper::rename( const ::rtl::OUString& newName ) throw (SQLException, ElementExistException, RuntimeException)
{
-
+
impl_rename_throw(newName);
- //Reference<XNameContainer> xNameCont(m_xParentContainer,UNO_QUERY);
- //if ( xNameCont.is() )
- //{
- // if ( xNameCont->hasByName(newName) )
- // throw ElementExistException(newName,*this);
-
- // try
- // {
- // if ( xNameCont->hasByName(m_pImpl->m_aProps.aTitle) )
- // xNameCont->removeByName(m_pImpl->m_aProps.aTitle);
-
- // m_pImpl->m_aProps.aTitle = newName;
- // xNameCont->insertByName(m_pImpl->m_aProps.aTitle,makeAny(Reference<XContent>(*this,UNO_QUERY)));
- // notifyDataSourceModified();
- // }
- // catch(IllegalArgumentException)
- // {
- // throw SQLException();
- // }
- // catch(NoSuchElementException)
- // {
- // throw SQLException();
- // }
- // catch(WrappedTargetException)
- // {
- // throw SQLException();
- // }
- //}
- //else
- // m_pImpl->m_aProps.aTitle = newName;
-
+
}
-// -----------------------------------------------------------------------------
+
void OContentHelper::notifyDataSourceModified()
{
::dbaccess::notifyDataSourceModified(m_xParentContainer,sal_True);
}
-//........................................................................
-} // namespace dbaccess
-//........................................................................
+} // 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 d1951c5d1..30f005d83 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -95,33 +95,27 @@ using namespace ::dbtools;
using namespace ::comphelper;
namespace css = ::com::sun::star;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//============================================================
//= VosMutexFacade
//============================================================
-//------------------------------------------------------------------------
VosMutexFacade::VosMutexFacade( ::osl::Mutex& _rMutex )
:m_rMutex( _rMutex )
{
}
-//------------------------------------------------------------------------
void SAL_CALL VosMutexFacade::acquire()
{
m_rMutex.acquire();
}
-//------------------------------------------------------------------------
sal_Bool SAL_CALL VosMutexFacade::tryToAcquire()
{
return m_rMutex.tryToAcquire();
}
-//------------------------------------------------------------------------
void SAL_CALL VosMutexFacade::release()
{
m_rMutex.release();
@@ -201,7 +195,6 @@ private:
};
-//--------------------------------------------------------------------------
void DocumentStorageAccess::dispose()
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -228,7 +221,6 @@ void DocumentStorageAccess::dispose()
m_pModelImplementation = NULL;
}
-//--------------------------------------------------------------------------
Reference< XStorage > DocumentStorageAccess::impl_openSubStorage_nothrow( const ::rtl::OUString& _rStorageName, sal_Int32 _nDesiredMode )
{
OSL_ENSURE( _rStorageName.getLength(),"ODatabaseModelImpl::impl_openSubStorage_nothrow: Invalid storage name!" );
@@ -262,7 +254,6 @@ Reference< XStorage > DocumentStorageAccess::impl_openSubStorage_nothrow( const
return xStorage;
}
-//--------------------------------------------------------------------------
void DocumentStorageAccess::disposeStorages()
{
m_bDisposingSubStorages = true;
@@ -287,7 +278,6 @@ void DocumentStorageAccess::disposeStorages()
m_bDisposingSubStorages = false;
}
-//--------------------------------------------------------------------------
void DocumentStorageAccess::commitStorages() SAL_THROW(( IOException, RuntimeException ))
{
try
@@ -307,7 +297,6 @@ void DocumentStorageAccess::commitStorages() SAL_THROW(( IOException, RuntimeExc
}
}
-//--------------------------------------------------------------------------
bool DocumentStorageAccess::commitEmbeddedStorage( bool _bPreventRootCommits )
{
if ( _bPreventRootCommits )
@@ -332,7 +321,6 @@ bool DocumentStorageAccess::commitEmbeddedStorage( bool _bPreventRootCommits )
}
-//--------------------------------------------------------------------------
Reference< XStorage > SAL_CALL DocumentStorageAccess::getDocumentSubStorage( const ::rtl::OUString& aStorageName, ::sal_Int32 _nDesiredMode ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -346,7 +334,6 @@ Reference< XStorage > SAL_CALL DocumentStorageAccess::getDocumentSubStorage( con
return pos->second;
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL DocumentStorageAccess::getDocumentSubStoragesNames( ) throw (IOException, RuntimeException)
{
Reference< XStorage > xRootStor( m_pModelImplementation->getRootStorage() );
@@ -367,13 +354,11 @@ Sequence< ::rtl::OUString > SAL_CALL DocumentStorageAccess::getDocumentSubStorag
: Sequence< ::rtl::OUString >( &aNames[0], aNames.size() );
}
-//--------------------------------------------------------------------------
void SAL_CALL DocumentStorageAccess::preCommit( const css::lang::EventObject& /*aEvent*/ ) throw (Exception, RuntimeException)
{
// not interested in
}
-//--------------------------------------------------------------------------
void SAL_CALL DocumentStorageAccess::commited( const css::lang::EventObject& aEvent ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -397,19 +382,16 @@ void SAL_CALL DocumentStorageAccess::commited( const css::lang::EventObject& aEv
}
}
-//--------------------------------------------------------------------------
void SAL_CALL DocumentStorageAccess::preRevert( const css::lang::EventObject& /*aEvent*/ ) throw (Exception, RuntimeException)
{
// not interested in
}
-//--------------------------------------------------------------------------
void SAL_CALL DocumentStorageAccess::reverted( const css::lang::EventObject& /*aEvent*/ ) throw (RuntimeException)
{
// not interested in
}
-//--------------------------------------------------------------------------
void SAL_CALL DocumentStorageAccess::disposing( const css::lang::EventObject& Source ) throw ( RuntimeException )
{
OSL_ENSURE( Reference< XStorage >( Source.Source, UNO_QUERY ).is(), "DocumentStorageAccess::disposing: No storage? What's this?" );
@@ -432,7 +414,7 @@ void SAL_CALL DocumentStorageAccess::disposing( const css::lang::EventObject& So
//= ODatabaseModelImpl
//============================================================
DBG_NAME(ODatabaseModelImpl)
-//--------------------------------------------------------------------------
+
ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XMultiServiceFactory >& _rxFactory, ODatabaseContext& _rDBContext )
:m_xModel()
,m_xDataSource()
@@ -465,7 +447,6 @@ ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XMultiServiceFactory >&
impl_construct_nothrow();
}
-//--------------------------------------------------------------------------
ODatabaseModelImpl::ODatabaseModelImpl(
const ::rtl::OUString& _rRegistrationName,
const Reference< XMultiServiceFactory >& _rxFactory,
@@ -499,13 +480,11 @@ ODatabaseModelImpl::ODatabaseModelImpl(
impl_construct_nothrow();
}
-//--------------------------------------------------------------------------
ODatabaseModelImpl::~ODatabaseModelImpl()
{
DBG_DTOR(ODatabaseModelImpl,NULL);
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::impl_construct_nothrow()
{
// create the property bag to hold the settings (also known as "Info" property)
@@ -566,10 +545,8 @@ void ODatabaseModelImpl::impl_construct_nothrow()
m_pDBContext->appendAtTerminateListener(*this);
}
-// -----------------------------------------------------------------------------
namespace
{
- // .........................................................................
::rtl::OUString lcl_getContainerStorageName_throw( ODatabaseModelImpl::ObjectType _eType )
{
const sal_Char* pAsciiName( NULL );
@@ -585,7 +562,6 @@ namespace
return ::rtl::OUString::createFromAscii( pAsciiName );
}
- // .........................................................................
bool lcl_hasObjectWithMacros_throw( const ODefinitionContainer_Impl& _rObjectDefinitions, const Reference< XStorage >& _rxContainerStorage )
{
bool bSomeDocHasMacros = false;
@@ -614,7 +590,6 @@ namespace
return bSomeDocHasMacros;
}
- // .........................................................................
bool lcl_hasObjectsWithMacros_nothrow( ODatabaseModelImpl& _rModel, const ODatabaseModelImpl::ObjectType _eType )
{
bool bSomeDocHasMacros = false;
@@ -648,7 +623,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
bool ODatabaseModelImpl::objectHasMacros( const Reference< XStorage >& _rxContainerStorage, const ::rtl::OUString& _rPersistentName )
{
OSL_PRECOND( _rxContainerStorage.is(), "ODatabaseModelImpl::objectHasMacros: this will crash!" );
@@ -671,7 +645,6 @@ bool ODatabaseModelImpl::objectHasMacros( const Reference< XStorage >& _rxContai
return bHasMacros;
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::reset()
{
m_bReadOnly = sal_False;
@@ -685,7 +658,7 @@ void ODatabaseModelImpl::reset()
m_pStorageAccess = NULL;
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseModelImpl::disposing( const ::com::sun::star::lang::EventObject& Source ) throw(RuntimeException)
{
Reference<XConnection> xCon(Source.Source,UNO_QUERY);
@@ -711,7 +684,7 @@ void SAL_CALL ODatabaseModelImpl::disposing( const ::com::sun::star::lang::Event
OSL_ENSURE( false, "ODatabaseModelImpl::disposing: where does this come from?" );
}
}
-//------------------------------------------------------------------------------
+
void ODatabaseModelImpl::clearConnections()
{
OWeakConnectionArray aConnections;
@@ -738,7 +711,7 @@ void ODatabaseModelImpl::clearConnections()
m_pSharedConnectionManager = NULL;
m_xSharedConnectionManager = NULL;
}
-//------------------------------------------------------------------------------
+
void ODatabaseModelImpl::dispose()
{
// dispose the data source and the model
@@ -793,7 +766,7 @@ void ODatabaseModelImpl::dispose()
m_pStorageAccess = NULL;
}
}
-// -----------------------------------------------------------------------------
+
const Reference< XNumberFormatsSupplier > & ODatabaseModelImpl::getNumberFormatsSupplier()
{
if (!m_xNumberFormatsSupplier.is())
@@ -810,14 +783,12 @@ const Reference< XNumberFormatsSupplier > & ODatabaseModelImpl::getNumberFormats
return m_xNumberFormatsSupplier;
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::setDocFileLocation( const ::rtl::OUString& i_rLoadedFrom )
{
ENSURE_OR_THROW( i_rLoadedFrom.getLength(), "invalid URL" );
m_sDocFileLocation = i_rLoadedFrom;
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::setResource( const ::rtl::OUString& i_rDocumentURL, const Sequence< PropertyValue >& _rArgs )
{
ENSURE_OR_THROW( i_rDocumentURL.getLength(), "invalid URL" );
@@ -842,7 +813,6 @@ void ODatabaseModelImpl::setResource( const ::rtl::OUString& i_rDocumentURL, con
impl_switchToLogicalURL( i_rDocumentURL );
}
-// -----------------------------------------------------------------------------
::comphelper::NamedValueCollection ODatabaseModelImpl::stripLoadArguments( const ::comphelper::NamedValueCollection& _rArguments )
{
OSL_ENSURE( !_rArguments.has( "Model" ), "ODatabaseModelImpl::stripLoadArguments: this is suspicious (1)!" );
@@ -854,18 +824,16 @@ void ODatabaseModelImpl::setResource( const ::rtl::OUString& i_rDocumentURL, con
return aMutableArgs;
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::disposeStorages() SAL_THROW(())
{
getDocumentStorageAccess()->disposeStorages();
}
-// -----------------------------------------------------------------------------
Reference< XSingleServiceFactory > ODatabaseModelImpl::createStorageFactory() const
{
return Reference< XSingleServiceFactory >( m_aContext.createComponent( "com.sun.star.embed.StorageFactory" ), UNO_QUERY_THROW );
}
-// -----------------------------------------------------------------------------
+
void ODatabaseModelImpl::commitRootStorage()
{
Reference< XStorage > xStorage( getOrCreateRootStorage() );
@@ -876,7 +844,7 @@ void ODatabaseModelImpl::commitRootStorage()
OSL_ENSURE( bSuccess || !xStorage.is(),
"ODatabaseModelImpl::commitRootStorage: could commit the storage!" );
}
-// -----------------------------------------------------------------------------
+
Reference< XStorage > ODatabaseModelImpl::getOrCreateRootStorage()
{
if ( !m_xDocumentStorage.is() )
@@ -925,7 +893,7 @@ Reference< XStorage > ODatabaseModelImpl::getOrCreateRootStorage()
}
return m_xDocumentStorage.getTyped();
}
-// -----------------------------------------------------------------------------
+
DocumentStorageAccess* ODatabaseModelImpl::getDocumentStorageAccess()
{
if ( !m_pStorageAccess )
@@ -936,7 +904,6 @@ DocumentStorageAccess* ODatabaseModelImpl::getDocumentStorageAccess()
return m_pStorageAccess;
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::modelIsDisposing( const bool _wasInitialized, ResetModelAccess )
{
m_xModel = Reference< XModel >();
@@ -950,19 +917,16 @@ void ODatabaseModelImpl::modelIsDisposing( const bool _wasInitialized, ResetMode
m_bDocumentInitialized = _wasInitialized;
}
-// -----------------------------------------------------------------------------
Reference< XDocumentSubStorageSupplier > ODatabaseModelImpl::getDocumentSubStorageSupplier()
{
return getDocumentStorageAccess();
}
-// -----------------------------------------------------------------------------
bool ODatabaseModelImpl::commitEmbeddedStorage( bool _bPreventRootCommits )
{
return getDocumentStorageAccess()->commitEmbeddedStorage( _bPreventRootCommits );
}
-// -----------------------------------------------------------------------------
bool ODatabaseModelImpl::commitStorageIfWriteable_ignoreErrors( const Reference< XStorage >& _rxStorage ) SAL_THROW(())
{
bool bSuccess = false;
@@ -976,7 +940,7 @@ bool ODatabaseModelImpl::commitStorageIfWriteable_ignoreErrors( const Reference<
}
return bSuccess;
}
-// -----------------------------------------------------------------------------
+
void ODatabaseModelImpl::setModified( sal_Bool _bModified )
{
if ( isModifyLocked() )
@@ -996,7 +960,6 @@ void ODatabaseModelImpl::setModified( sal_Bool _bModified )
}
}
-// -----------------------------------------------------------------------------
Reference<XDataSource> ODatabaseModelImpl::getOrCreateDataSource()
{
Reference<XDataSource> xDs = m_xDataSource;
@@ -1007,12 +970,12 @@ Reference<XDataSource> ODatabaseModelImpl::getOrCreateDataSource()
}
return xDs;
}
-// -----------------------------------------------------------------------------
+
Reference< XModel> ODatabaseModelImpl::getModel_noCreate() const
{
return m_xModel;
}
-// -----------------------------------------------------------------------------
+
Reference< XModel > ODatabaseModelImpl::createNewModel_deliverOwnership( bool _bInitialize )
{
Reference< XModel > xModel( m_xModel );
@@ -1062,12 +1025,12 @@ Reference< XModel > ODatabaseModelImpl::createNewModel_deliverOwnership( bool _b
}
return xModel;
}
-// -----------------------------------------------------------------------------
+
oslInterlockedCount SAL_CALL ODatabaseModelImpl::acquire()
{
return osl_incrementInterlockedCount(&m_refCount);
}
-// -----------------------------------------------------------------------------
+
oslInterlockedCount SAL_CALL ODatabaseModelImpl::release()
{
if ( osl_decrementInterlockedCount(&m_refCount) == 0 )
@@ -1082,19 +1045,17 @@ oslInterlockedCount SAL_CALL ODatabaseModelImpl::release()
}
return m_refCount;
}
-// -----------------------------------------------------------------------------
+
void ODatabaseModelImpl::commitStorages() SAL_THROW(( IOException, RuntimeException ))
{
getDocumentStorageAccess()->commitStorages();
}
-// -----------------------------------------------------------------------------
Reference< XStorage > ODatabaseModelImpl::getStorage( const ObjectType _eType, const sal_Int32 _nDesiredMode )
{
return getDocumentStorageAccess()->getDocumentSubStorage( getObjectContainerStorageName( _eType ), _nDesiredMode );
}
-// -----------------------------------------------------------------------------
const AsciiPropertyValue* ODatabaseModelImpl::getDefaultDataSourceSettings()
{
static const AsciiPropertyValue aKnownSettings[] =
@@ -1168,13 +1129,12 @@ const AsciiPropertyValue* ODatabaseModelImpl::getDefaultDataSourceSettings()
AsciiPropertyValue( "Reports", makeAny( ::rtl::OUString() ) ),
AsciiPropertyValue( "KeyAlterationServiceName", makeAny( ::rtl::OUString() ) ),
AsciiPropertyValue( "IndexAlterationServiceName", makeAny( ::rtl::OUString() ) ),
-
+
AsciiPropertyValue()
};
return aKnownSettings;
}
-// -----------------------------------------------------------------------------
TContentPtr& ODatabaseModelImpl::getObjectContainer( ObjectType _eType )
{
OSL_PRECOND( _eType >= E_FORM && _eType <= E_TABLE, "ODatabaseModelImpl::getObjectContainer: illegal index!" );
@@ -1189,20 +1149,17 @@ TContentPtr& ODatabaseModelImpl::getObjectContainer( ObjectType _eType )
return rContentPtr;
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::revokeDataSource() const
{
if ( m_pDBContext && m_sDocumentURL.getLength() )
m_pDBContext->revokeDatabaseDocument( *this );
}
-// -----------------------------------------------------------------------------
bool ODatabaseModelImpl::adjustMacroMode_AutoReject()
{
return m_aMacroMode.adjustMacroMode( NULL );
}
-// -----------------------------------------------------------------------------
bool ODatabaseModelImpl::checkMacrosOnLoading()
{
Reference< XInteractionHandler > xInteraction;
@@ -1210,13 +1167,11 @@ bool ODatabaseModelImpl::checkMacrosOnLoading()
return m_aMacroMode.checkMacrosOnLoading( xInteraction );
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::resetMacroExecutionMode()
{
m_aMacroMode = ::sfx2::DocumentMacroMode( *this );
}
-// -----------------------------------------------------------------------------
Reference< XStorageBasedLibraryContainer > ODatabaseModelImpl::getLibraryContainer( bool _bScript )
{
Reference< XStorageBasedLibraryContainer >& rxContainer( _bScript ? m_xBasicLibraries : m_xDialogLibraries );
@@ -1252,7 +1207,6 @@ Reference< XStorageBasedLibraryContainer > ODatabaseModelImpl::getLibraryContain
return rxContainer;
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::storeLibraryContainersTo( const Reference< XStorage >& _rxToRootStorage )
{
if ( m_xBasicLibraries.is() )
@@ -1262,7 +1216,6 @@ void ODatabaseModelImpl::storeLibraryContainersTo( const Reference< XStorage >&
m_xDialogLibraries->storeLibrariesToStorage( _rxToRootStorage );
}
-// -----------------------------------------------------------------------------
Reference< XStorage > ODatabaseModelImpl::switchToStorage( const Reference< XStorage >& _rxNewRootStorage )
{
if ( !_rxNewRootStorage.is() )
@@ -1271,7 +1224,6 @@ Reference< XStorage > ODatabaseModelImpl::switchToStorage( const Reference< XSto
return impl_switchToStorage_throw( _rxNewRootStorage );
}
-// -----------------------------------------------------------------------------
namespace
{
void lcl_modifyListening( ::sfx2::IModifiableDocument& _rDocument,
@@ -1300,7 +1252,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
namespace
{
static void lcl_rebaseScriptStorage_throw( const Reference< XStorageBasedLibraryContainer >& _rxContainer,
@@ -1316,7 +1267,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
Reference< XStorage > ODatabaseModelImpl::impl_switchToStorage_throw( const Reference< XStorage >& _rxNewRootStorage )
{
// stop listening for modifications at the old storage
@@ -1338,7 +1288,6 @@ Reference< XStorage > ODatabaseModelImpl::impl_switchToStorage_throw( const Refe
return m_xDocumentStorage.getTyped();
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::impl_switchToLogicalURL( const ::rtl::OUString& i_rDocumentURL )
{
if ( i_rDocumentURL == m_sDocumentURL )
@@ -1375,13 +1324,11 @@ void ODatabaseModelImpl::impl_switchToLogicalURL( const ::rtl::OUString& i_rDocu
}
}
-// -----------------------------------------------------------------------------
::rtl::OUString ODatabaseModelImpl::getObjectContainerStorageName( const ObjectType _eType )
{
return lcl_getContainerStorageName_throw( _eType );
}
-// -----------------------------------------------------------------------------
sal_Int16 ODatabaseModelImpl::getCurrentMacroExecMode() const
{
sal_Int16 nCurrentMode = MacroExecMode::NEVER_EXECUTE;
@@ -1396,14 +1343,12 @@ sal_Int16 ODatabaseModelImpl::getCurrentMacroExecMode() const
return nCurrentMode;
}
-// -----------------------------------------------------------------------------
sal_Bool ODatabaseModelImpl::setCurrentMacroExecMode( sal_uInt16 nMacroMode )
{
m_aMediaDescriptor.put( "MacroExecutionMode", nMacroMode );
return sal_True;
}
-// -----------------------------------------------------------------------------
::rtl::OUString ODatabaseModelImpl::getDocumentLocation() const
{
return getURL();
@@ -1415,7 +1360,6 @@ sal_Bool ODatabaseModelImpl::setCurrentMacroExecMode( sal_uInt16 nMacroMode )
// this folder is considered to be secure. So, the document URL needs to be used to decide about the security.
}
-// -----------------------------------------------------------------------------
Reference< XStorage > ODatabaseModelImpl::getZipStorageToSign()
{
// we do not support signing the scripting storages, so we're allowed to
@@ -1423,7 +1367,6 @@ Reference< XStorage > ODatabaseModelImpl::getZipStorageToSign()
return Reference< XStorage >();
}
-// -----------------------------------------------------------------------------
ODatabaseModelImpl::EmbeddedMacros ODatabaseModelImpl::determineEmbeddedMacros()
{
if ( !m_aEmbeddedMacros )
@@ -1446,59 +1389,48 @@ ODatabaseModelImpl::EmbeddedMacros ODatabaseModelImpl::determineEmbeddedMacros()
return *m_aEmbeddedMacros;
}
-// -----------------------------------------------------------------------------
sal_Bool ODatabaseModelImpl::documentStorageHasMacros() const
{
const_cast< ODatabaseModelImpl* >( this )->determineEmbeddedMacros();
return ( *m_aEmbeddedMacros != eNoMacros );
}
-// -----------------------------------------------------------------------------
Reference< XEmbeddedScripts > ODatabaseModelImpl::getEmbeddedDocumentScripts() const
{
return Reference< XEmbeddedScripts >( getModel_noCreate(), UNO_QUERY );
}
-// -----------------------------------------------------------------------------
sal_Int16 ODatabaseModelImpl::getScriptingSignatureState()
{
// no support for signatures at the moment
return SIGNATURESTATE_NOSIGNATURES;
}
-// -----------------------------------------------------------------------------
sal_Bool ODatabaseModelImpl::hasTrustedScriptingSignature( sal_Bool /*bAllowUIToAddAuthor*/ )
{
// no support for signatures at the moment
return sal_False;
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::showBrokenSignatureWarning( const Reference< XInteractionHandler >& /*_rxInteraction*/ ) const
{
OSL_ENSURE( false, "ODatabaseModelImpl::showBrokenSignatureWarning: signatures can't be broken - we do not support them!" );
}
-// -----------------------------------------------------------------------------
void ODatabaseModelImpl::storageIsModified()
{
setModified( sal_True );
}
-// -----------------------------------------------------------------------------
ModelDependentComponent::ModelDependentComponent( const ::rtl::Reference< ODatabaseModelImpl >& _model )
:m_pImpl( _model )
,m_aMutex( _model->getSharedMutex() )
{
}
-// -----------------------------------------------------------------------------
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 36fdc427e..c461dbbf3 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.hxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -148,7 +148,7 @@ public:
VosMutexFacade( ::osl::Mutex& _rMutex );
// IMutex
- virtual void SAL_CALL acquire();
+ virtual void SAL_CALL acquire();
virtual sal_Bool SAL_CALL tryToAcquire();
virtual void SAL_CALL release();
@@ -479,7 +479,7 @@ public:
if any of the invoked operations does so
*/
::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >
- switchToStorage(
+ switchToStorage(
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& _rxNewRootStorage
);
diff --git a/dbaccess/source/core/dataaccess/SharedConnection.cxx b/dbaccess/source/core/dataaccess/SharedConnection.cxx
index 88a16ffe0..eaa262864 100644
--- a/dbaccess/source/core/dataaccess/SharedConnection.cxx
+++ b/dbaccess/source/core/dataaccess/SharedConnection.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -45,140 +45,124 @@ DBG_NAME(OSharedConnection)
OSharedConnection::OSharedConnection(Reference< XAggregation >& _rxProxyConnection)
: OSharedConnection_BASE(m_aMutex)
{
- DBG_CTOR(OSharedConnection,NULL);
+ DBG_CTOR(OSharedConnection,NULL);
setDelegation(_rxProxyConnection,m_refCount);
}
-// -----------------------------------------------------------------------------
+
OSharedConnection::~OSharedConnection()
{
- DBG_DTOR(OSharedConnection,NULL);
+ DBG_DTOR(OSharedConnection,NULL);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OSharedConnection::disposing(void)
{
OSharedConnection_BASE::disposing();
OConnectionWrapper::disposing();
}
-// -----------------------------------------------------------------------------
+
Reference< XStatement > SAL_CALL OSharedConnection::createStatement( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->createStatement();
}
-// --------------------------------------------------------------------------------
+
Reference< XPreparedStatement > SAL_CALL OSharedConnection::prepareStatement( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->prepareStatement(sql);
}
-// --------------------------------------------------------------------------------
+
Reference< XPreparedStatement > SAL_CALL OSharedConnection::prepareCall( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->prepareCall(sql);
}
-// --------------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OSharedConnection::nativeSQL( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->nativeSQL(sql);
}
-// --------------------------------------------------------------------------------
+
sal_Bool SAL_CALL OSharedConnection::getAutoCommit( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->getAutoCommit();
}
-// --------------------------------------------------------------------------------
+
void SAL_CALL OSharedConnection::commit( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
m_xConnection->commit();
}
-// --------------------------------------------------------------------------------
+
void SAL_CALL OSharedConnection::rollback( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
m_xConnection->rollback();
}
-// --------------------------------------------------------------------------------
+
sal_Bool SAL_CALL OSharedConnection::isClosed( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
-
+
return m_xConnection->isClosed();
}
-// --------------------------------------------------------------------------------
+
Reference< XDatabaseMetaData > SAL_CALL OSharedConnection::getMetaData( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
+
return m_xConnection->getMetaData();
}
-// --------------------------------------------------------------------------------
+
sal_Bool SAL_CALL OSharedConnection::isReadOnly( ) throw(SQLException, RuntimeException)
-{
+{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->isReadOnly();
}
-// --------------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL OSharedConnection::getCatalog( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->getCatalog();
}
-// --------------------------------------------------------------------------------
+
sal_Int32 SAL_CALL OSharedConnection::getTransactionIsolation( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->getTransactionIsolation();
}
-// --------------------------------------------------------------------------------
+
Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OSharedConnection::getTypeMap( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(rBHelper.bDisposed);
-
return m_xConnection->getTypeMap();
}
-// -----------------------------------------------------------------------------
-//........................................................................
} // 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 8f7ca35b2..fc6bbf0be 100644
--- a/dbaccess/source/core/dataaccess/SharedConnection.hxx
+++ b/dbaccess/source/core/dataaccess/SharedConnection.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -71,10 +71,10 @@ namespace dbaccess
virtual void SAL_CALL release() throw() { OSharedConnection_BASE::release(); }
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException)
{
- return ::comphelper::concatSequences(
- OSharedConnection_BASE::getTypes(),
+ return ::comphelper::concatSequences(
+ OSharedConnection_BASE::getTypes(),
OSharedConnection_BASE2::getTypes()
- );
+ );
}
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& _rType ) throw (::com::sun::star::uno::RuntimeException)
@@ -84,21 +84,20 @@ namespace dbaccess
aReturn = OSharedConnection_BASE2::queryInterface(_rType);
return aReturn;
}
- // --------------------------------------------------------------------------------
+
// XCloseable
virtual void SAL_CALL close( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
{
::osl::MutexGuard aGuard( m_aMutex );
::connectivity::checkDisposed(rBHelper.bDisposed);
-
}
dispose();
}
// XConnection
virtual void SAL_CALL setAutoCommit( sal_Bool /*autoCommit*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
- {
+ {
throw ::com::sun::star::sdbc::SQLException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("This call is not allowed when sharing connections.")),*this,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S10000")),0,::com::sun::star::uno::Any());
}
virtual void SAL_CALL setReadOnly( sal_Bool /*readOnly*/ ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
@@ -132,13 +131,11 @@ namespace dbaccess
virtual sal_Int32 SAL_CALL getTransactionIsolation( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTypeMap( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
};
-
+
#ifdef IMPLEMENT_GET_IMPLEMENTATION_ID
IMPLEMENT_GET_IMPLEMENTATION_ID( OSharedConnection );
#endif
-//........................................................................
-} // namespace dbaccess
-//........................................................................
-#endif // DBA_CORE_SHARED_CONNECTION_HXX
+} // namespace dbaccess
+#endif // DBA_CORE_SHARED_CONNECTION_HXX
diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
index d908961dc..9caf1a583 100644
--- a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,16 +50,14 @@ using namespace ::osl;
using namespace ::comphelper;
using namespace ::cppu;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OBookmarkContainer
//==========================================================================
DBG_NAME(OBookmarkContainer)
-//--------------------------------------------------------------------------
+
OBookmarkContainer::OBookmarkContainer(OWeakObject& _rParent, Mutex& _rMutex)
:m_rParent(_rParent)
,m_aContainerListeners(_rMutex)
@@ -68,7 +66,6 @@ OBookmarkContainer::OBookmarkContainer(OWeakObject& _rParent, Mutex& _rMutex)
DBG_CTOR(OBookmarkContainer, NULL);
}
-//--------------------------------------------------------------------------
void OBookmarkContainer::dispose()
{
MutexGuard aGuard(m_rMutex);
@@ -82,32 +79,27 @@ void OBookmarkContainer::dispose()
m_aBookmarks.clear();
}
-//--------------------------------------------------------------------------
void SAL_CALL OBookmarkContainer::acquire( ) throw()
{
m_rParent.acquire();
}
-//--------------------------------------------------------------------------
void SAL_CALL OBookmarkContainer::release( ) throw()
{
m_rParent.release();
}
-//--------------------------------------------------------------------------
OBookmarkContainer::~OBookmarkContainer()
{
DBG_DTOR(OBookmarkContainer, NULL);
}
// XServiceInfo
-//--------------------------------------------------------------------------
::rtl::OUString SAL_CALL OBookmarkContainer::getImplementationName( ) throw(RuntimeException)
{
return ::rtl::OUString::createFromAscii("com.sun.star.comp.dba.OBookmarkContainer");
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OBookmarkContainer::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -115,7 +107,6 @@ sal_Bool SAL_CALL OBookmarkContainer::supportsService( const ::rtl::OUString& _r
return findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL OBookmarkContainer::getSupportedServiceNames( ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aReturn(1);
@@ -124,7 +115,6 @@ Sequence< ::rtl::OUString > SAL_CALL OBookmarkContainer::getSupportedServiceName
}
// XNameContainer
-//--------------------------------------------------------------------------
void SAL_CALL OBookmarkContainer::insertByName( const ::rtl::OUString& _rName, const Any& aElement ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -154,7 +144,6 @@ void SAL_CALL OBookmarkContainer::insertByName( const ::rtl::OUString& _rName, c
}
}
-//--------------------------------------------------------------------------
void SAL_CALL OBookmarkContainer::removeByName( const ::rtl::OUString& _rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
{
::rtl::OUString sOldBookmark;
@@ -187,7 +176,6 @@ void SAL_CALL OBookmarkContainer::removeByName( const ::rtl::OUString& _rName )
}
// XNameReplace
-//--------------------------------------------------------------------------
void SAL_CALL OBookmarkContainer::replaceByName( const ::rtl::OUString& _rName, const Any& aElement ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
{
ClearableMutexGuard aGuard(m_rMutex);
@@ -223,7 +211,6 @@ void SAL_CALL OBookmarkContainer::replaceByName( const ::rtl::OUString& _rName,
}
}
-//--------------------------------------------------------------------------
void SAL_CALL OBookmarkContainer::addContainerListener( const Reference< XContainerListener >& _rxListener ) throw(RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -231,7 +218,6 @@ void SAL_CALL OBookmarkContainer::addContainerListener( const Reference< XContai
m_aContainerListeners.addInterface(_rxListener);
}
-//--------------------------------------------------------------------------
void SAL_CALL OBookmarkContainer::removeContainerListener( const Reference< XContainerListener >& _rxListener ) throw(RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -240,7 +226,6 @@ void SAL_CALL OBookmarkContainer::removeContainerListener( const Reference< XCon
}
// XElementAccess
-//--------------------------------------------------------------------------
Type SAL_CALL OBookmarkContainer::getElementType( ) throw (RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -248,7 +233,6 @@ Type SAL_CALL OBookmarkContainer::getElementType( ) throw (RuntimeException)
return ::getCppuType( static_cast< ::rtl::OUString* >(NULL) );
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OBookmarkContainer::hasElements( ) throw (RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -257,7 +241,6 @@ sal_Bool SAL_CALL OBookmarkContainer::hasElements( ) throw (RuntimeException)
}
// XEnumerationAccess
-//--------------------------------------------------------------------------
Reference< XEnumeration > SAL_CALL OBookmarkContainer::createEnumeration( ) throw(RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -265,7 +248,6 @@ Reference< XEnumeration > SAL_CALL OBookmarkContainer::createEnumeration( ) thr
return new ::comphelper::OEnumerationByIndex(static_cast<XIndexAccess*>(this));
}
-//--------------------------------------------------------------------------
// XIndexAccess
sal_Int32 SAL_CALL OBookmarkContainer::getCount( ) throw(RuntimeException)
{
@@ -274,7 +256,6 @@ sal_Int32 SAL_CALL OBookmarkContainer::getCount( ) throw(RuntimeException)
return m_aBookmarks.size();
}
-//--------------------------------------------------------------------------
Any SAL_CALL OBookmarkContainer::getByIndex( sal_Int32 _nIndex ) throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -286,7 +267,6 @@ Any SAL_CALL OBookmarkContainer::getByIndex( sal_Int32 _nIndex ) throw(IndexOutO
return makeAny(m_aBookmarksIndexed[_nIndex]->second);
}
-//--------------------------------------------------------------------------
Any SAL_CALL OBookmarkContainer::getByName( const ::rtl::OUString& _rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -298,7 +278,6 @@ Any SAL_CALL OBookmarkContainer::getByName( const ::rtl::OUString& _rName ) thro
return makeAny(m_aBookmarks[_rName]);
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL OBookmarkContainer::getElementNames( ) throw(RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -318,7 +297,6 @@ Sequence< ::rtl::OUString > SAL_CALL OBookmarkContainer::getElementNames( ) thr
return aNames;
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OBookmarkContainer::hasByName( const ::rtl::OUString& _rName ) throw(RuntimeException)
{
MutexGuard aGuard(m_rMutex);
@@ -327,7 +305,6 @@ sal_Bool SAL_CALL OBookmarkContainer::hasByName( const ::rtl::OUString& _rName )
return checkExistence(_rName);
}
-//--------------------------------------------------------------------------
void OBookmarkContainer::implRemove(const ::rtl::OUString& _rName)
{
MutexGuard aGuard(m_rMutex);
@@ -360,7 +337,6 @@ void OBookmarkContainer::implRemove(const ::rtl::OUString& _rName)
m_aBookmarks.erase(aMapPos);
}
-//--------------------------------------------------------------------------
void OBookmarkContainer::implAppend(const ::rtl::OUString& _rName, const ::rtl::OUString& _rDocumentLocation)
{
MutexGuard aGuard(m_rMutex);
@@ -369,7 +345,6 @@ void OBookmarkContainer::implAppend(const ::rtl::OUString& _rName, const ::rtl::
m_aBookmarksIndexed.push_back(m_aBookmarks.insert( MapString2String::value_type(_rName,_rDocumentLocation)).first);
}
-//--------------------------------------------------------------------------
void OBookmarkContainer::implReplace(const ::rtl::OUString& _rName, const ::rtl::OUString& _rNewLink)
{
MutexGuard aGuard(m_rMutex);
@@ -378,25 +353,19 @@ void OBookmarkContainer::implReplace(const ::rtl::OUString& _rName, const ::rtl:
m_aBookmarks[_rName] = _rNewLink;
}
-//--------------------------------------------------------------------------
void OBookmarkContainer::checkValid(sal_Bool /*_bIntendWriteAccess*/) const throw (RuntimeException, DisposedException)
{
}
-//--------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OBookmarkContainer::getParent( ) throw (RuntimeException)
{
return m_rParent;
}
-//--------------------------------------------------------------------------
void SAL_CALL OBookmarkContainer::setParent( const Reference< XInterface >& /*Parent*/ ) throw (NoSupportException, RuntimeException)
{
throw NoSupportException();
}
-//........................................................................
} // 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 69a9bff1c..e1cdda77f 100644
--- a/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx
+++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,10 +42,8 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OBookmarkContainer - base class of collections of database definition
@@ -68,7 +66,7 @@ protected:
DECLARE_STL_VECTOR(MapString2StringIterator, MapIteratorVector);
MapString2String m_aBookmarks; // the bookmarks itself
- MapIteratorVector m_aBookmarksIndexed; // for index access to the
+ MapIteratorVector m_aBookmarksIndexed; // for index access to the
protected:
::cppu::OWeakObject& m_rParent; // for the ref counting
@@ -168,15 +166,11 @@ protected:
};
-//--------------------------------------------------------------------------
inline sal_Bool OBookmarkContainer::checkExistence(const ::rtl::OUString& _rName)
{
return m_aBookmarks.find(_rName) != m_aBookmarks.end();
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_CORE_BOOKMARKCONTAINER_HXX_
-
diff --git a/dbaccess/source/core/dataaccess/commandcontainer.cxx b/dbaccess/source/core/dataaccess/commandcontainer.cxx
index 094e626a8..3394cd0f0 100644
--- a/dbaccess/source/core/dataaccess/commandcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/commandcontainer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,35 +44,33 @@ using namespace ::osl;
using namespace ::comphelper;
using namespace ::cppu;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OCommandContainer
//==========================================================================
DBG_NAME(OCommandContainer)
-//--------------------------------------------------------------------------
+
OCommandContainer::OCommandContainer( const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
,const Reference< XInterface >& _xParentContainer
,const TContentPtr& _pImpl
,sal_Bool _bTables
- )
+ )
:ODefinitionContainer(_xORB,_xParentContainer,_pImpl,!_bTables)
,m_bTables(_bTables)
{
DBG_CTOR(OCommandContainer, NULL);
}
-//--------------------------------------------------------------------------
+
OCommandContainer::~OCommandContainer()
{
DBG_DTOR(OCommandContainer, NULL);
}
-// -----------------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XINTERFACE2( OCommandContainer,ODefinitionContainer,OCommandContainer_BASE)
IMPLEMENT_TYPEPROVIDER2(OCommandContainer,ODefinitionContainer,OCommandContainer_BASE);
-//--------------------------------------------------------------------------
+
Reference< XContent > OCommandContainer::createObject( const ::rtl::OUString& _rName)
{
const ODefinitionContainer_Impl& rDefinitions( getDefinitions() );
@@ -84,26 +82,20 @@ Reference< XContent > OCommandContainer::createObject( const ::rtl::OUString& _r
return new OCommandDefinition( *this, _rName, m_aContext.getLegacyServiceFactory(), pElementContent );
}
-// -----------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OCommandContainer::createInstanceWithArguments(const Sequence< Any >& /*aArguments*/ ) throw (Exception, RuntimeException)
{
return createInstance( );
}
-// -----------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OCommandContainer::createInstance( ) throw (Exception, RuntimeException)
{
return m_aContext.createComponent( (::rtl::OUString)( m_bTables ? SERVICE_SDB_TABLEDEFINITION : SERVICE_SDB_COMMAND_DEFINITION ) );
}
-// -----------------------------------------------------------------------------
::rtl::OUString OCommandContainer::determineContentType() const
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.org.openoffice.DatabaseCommandDefinitionContainer" ) );
}
-//........................................................................
} // 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 74a3d5abf..2fc2f6d0e 100644
--- a/dbaccess/source/core/dataaccess/commandcontainer.hxx
+++ b/dbaccess/source/core/dataaccess/commandcontainer.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,10 +34,8 @@
#include <cppuhelper/implbase1.hxx>
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OCommandContainer
//==========================================================================
@@ -78,10 +76,7 @@ protected:
virtual ::rtl::OUString determineContentType() const;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
-
-#endif // _DBA_COREDATAACCESS_COMMANDCONTAINER_HXX_
+#endif // _DBA_COREDATAACCESS_COMMANDCONTAINER_HXX_
diff --git a/dbaccess/source/core/dataaccess/commanddefinition.cxx b/dbaccess/source/core/dataaccess/commanddefinition.cxx
index 44ebd608e..6cfd92315 100644
--- a/dbaccess/source/core/dataaccess/commanddefinition.cxx
+++ b/dbaccess/source/core/dataaccess/commanddefinition.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,10 +50,8 @@ using namespace ::osl;
using namespace ::comphelper;
using namespace ::cppu;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OCommandDefinition
@@ -63,9 +61,8 @@ extern "C" void SAL_CALL createRegistryInfo_OCommandDefinition()
static ::dba::OAutoRegistration< OCommandDefinition > aAutoRegistration;
}
-//--------------------------------------------------------------------------
DBG_NAME(OCommandDefinition)
-//--------------------------------------------------------------------------
+
void OCommandDefinition::registerProperties()
{
OCommandDefinition_Impl& rCommandDefinition( getCommandDefinition() );
@@ -87,22 +84,20 @@ void OCommandDefinition::registerProperties()
&rCommandDefinition.m_aLayoutInformation, ::getCppuType(&rCommandDefinition.m_aLayoutInformation));
}
-//--------------------------------------------------------------------------
OCommandDefinition::OCommandDefinition(const Reference< XMultiServiceFactory >& _xORB
,const Reference< XInterface >& _rxContainer
- ,const TContentPtr& _pImpl)
+ ,const TContentPtr& _pImpl)
:OComponentDefinition(_xORB,_rxContainer,_pImpl,sal_False)
{
DBG_CTOR(OCommandDefinition, NULL);
registerProperties();
}
-//--------------------------------------------------------------------------
+
OCommandDefinition::~OCommandDefinition()
{
DBG_DTOR(OCommandDefinition, NULL);
}
-//--------------------------------------------------------------------------
OCommandDefinition::OCommandDefinition( const Reference< XInterface >& _rxContainer
,const ::rtl::OUString& _rElementName
,const Reference< XMultiServiceFactory >& _xORB
@@ -113,24 +108,21 @@ OCommandDefinition::OCommandDefinition( const Reference< XInterface >& _rxContai
registerProperties();
}
-//--------------------------------------------------------------------------
IMPLEMENT_IMPLEMENTATION_ID(OCommandDefinition);
IMPLEMENT_GETTYPES2(OCommandDefinition,OCommandDefinition_Base,OComponentDefinition);
IMPLEMENT_FORWARD_XINTERFACE2( OCommandDefinition,OComponentDefinition,OCommandDefinition_Base)
IMPLEMENT_PROPERTYCONTAINER_DEFAULTS2(OCommandDefinition,OCommandDefinition_PROP)
-//--------------------------------------------------------------------------
+
::rtl::OUString OCommandDefinition::getImplementationName_static( ) throw(RuntimeException)
{
return ::rtl::OUString::createFromAscii("com.sun.star.comp.dba.OCommandDefinition");
}
-//--------------------------------------------------------------------------
::rtl::OUString SAL_CALL OCommandDefinition::getImplementationName( ) throw(RuntimeException)
{
return getImplementationName_static();
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > OCommandDefinition::getSupportedServiceNames_static( ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aServices(3);
@@ -140,20 +132,17 @@ Sequence< ::rtl::OUString > OCommandDefinition::getSupportedServiceNames_static(
return aServices;
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL OCommandDefinition::getSupportedServiceNames( ) throw(RuntimeException)
{
return getSupportedServiceNames_static();
}
-//------------------------------------------------------------------------------
Reference< XInterface > OCommandDefinition::Create(const Reference< XComponentContext >& _rxContext)
{
::comphelper::ComponentContext aContext( _rxContext );
return *(new OCommandDefinition( aContext.getLegacyServiceFactory(), NULL, TContentPtr( new OCommandDefinition_Impl ) ) );
}
-// -----------------------------------------------------------------------------
void SAL_CALL OCommandDefinition::rename( const ::rtl::OUString& newName ) throw (SQLException, ElementExistException, RuntimeException)
{
try
@@ -173,9 +162,6 @@ void SAL_CALL OCommandDefinition::rename( const ::rtl::OUString& newName ) throw
throw ElementExistException(newName,*this);
}
}
-// -----------------------------------------------------------------------------
-//........................................................................
-} // namespace dbaccess
-//........................................................................
+} // 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 0aee88c3e..e5b43bcd8 100644
--- a/dbaccess/source/core/dataaccess/commanddefinition.hxx
+++ b/dbaccess/source/core/dataaccess/commanddefinition.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,8 +59,7 @@ typedef ::cppu::ImplHelper1 < ::com::sun::star::sdbcx::XRename
> OCommandDefinition_Base;
class OCommandDefinition;
typedef ::comphelper::OPropertyArrayUsageHelper< OCommandDefinition >
- OCommandDefinition_PROP;
-
+ OCommandDefinition_PROP;
class OCommandDefinition :public OComponentDefinition
,public OCommandDefinition_Base
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx
index 09e064575..490d0c47f 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -80,27 +80,23 @@ using ::com::sun::star::sdb::tools::XTableName;
using ::com::sun::star::sdb::tools::XObjectNames;
using ::com::sun::star::sdb::tools::XDataSourceMetaData;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString OConnection::getImplementationName( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getImplementationName" );
return rtl::OUString::createFromAscii("com.sun.star.comp.dbaccess.Connection");
}
-//------------------------------------------------------------------------------
+
sal_Bool OConnection::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::supportsService" );
return findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > OConnection::getSupportedServiceNames( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getSupportedServiceNames" );
@@ -117,7 +113,6 @@ Sequence< ::rtl::OUString > OConnection::getSupportedServiceNames( ) throw (Run
}
// XCloseable
-//------------------------------------------------------------------------------
void OConnection::close(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::close" );
@@ -125,7 +120,6 @@ void OConnection::close(void) throw( SQLException, RuntimeException )
dispose();
}
-//------------------------------------------------------------------------------
sal_Bool OConnection::isClosed(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::isClosed" );
@@ -134,7 +128,6 @@ sal_Bool OConnection::isClosed(void) throw( SQLException, RuntimeException )
}
// XConnection
-//------------------------------------------------------------------------------
Reference< XStatement > OConnection::createStatement(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::createStatement" );
@@ -150,7 +143,6 @@ Reference< XStatement > OConnection::createStatement(void) throw( SQLException,
}
return xStatement;
}
-//------------------------------------------------------------------------------
Reference< XPreparedStatement > OConnection::prepareStatement(const rtl::OUString& sql) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::prepareStatement" );
@@ -168,7 +160,6 @@ Reference< XPreparedStatement > OConnection::prepareStatement(const rtl::OUStri
return xStatement;
}
-//------------------------------------------------------------------------------
Reference< XPreparedStatement > OConnection::prepareCall(const rtl::OUString& sql) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::prepareCall" );
@@ -185,7 +176,6 @@ Reference< XPreparedStatement > OConnection::prepareCall(const rtl::OUString& s
return xStatement;
}
-//------------------------------------------------------------------------------
rtl::OUString OConnection::nativeSQL(const rtl::OUString& sql) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::nativeSQL" );
@@ -194,7 +184,6 @@ rtl::OUString OConnection::nativeSQL(const rtl::OUString& sql) throw( SQLExcepti
return m_xMasterConnection->nativeSQL(sql);
}
-//------------------------------------------------------------------------------
void OConnection::setAutoCommit(sal_Bool autoCommit) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::setAutoCommit" );
@@ -203,7 +192,6 @@ void OConnection::setAutoCommit(sal_Bool autoCommit) throw( SQLException, Runtim
m_xMasterConnection->setAutoCommit(autoCommit);
}
-//------------------------------------------------------------------------------
sal_Bool OConnection::getAutoCommit(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getAutoCommit" );
@@ -212,7 +200,6 @@ sal_Bool OConnection::getAutoCommit(void) throw( SQLException, RuntimeException
return m_xMasterConnection->getAutoCommit();
}
-//------------------------------------------------------------------------------
void OConnection::commit(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::commit" );
@@ -221,7 +208,6 @@ void OConnection::commit(void) throw( SQLException, RuntimeException )
m_xMasterConnection->commit();
}
-//------------------------------------------------------------------------------
void OConnection::rollback(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::rollback" );
@@ -230,7 +216,6 @@ void OConnection::rollback(void) throw( SQLException, RuntimeException )
m_xMasterConnection->rollback();
}
-//------------------------------------------------------------------------------
Reference< XDatabaseMetaData > OConnection::getMetaData(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getMetaData" );
@@ -239,7 +224,6 @@ Reference< XDatabaseMetaData > OConnection::getMetaData(void) throw( SQLExcepti
return m_xMasterConnection->getMetaData();
}
-//------------------------------------------------------------------------------
void OConnection::setReadOnly(sal_Bool readOnly) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::setReadOnly" );
@@ -248,7 +232,6 @@ void OConnection::setReadOnly(sal_Bool readOnly) throw( SQLException, RuntimeExc
m_xMasterConnection->setReadOnly(readOnly);
}
-//------------------------------------------------------------------------------
sal_Bool OConnection::isReadOnly(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::isReadOnly" );
@@ -257,7 +240,6 @@ sal_Bool OConnection::isReadOnly(void) throw( SQLException, RuntimeException )
return m_xMasterConnection->isReadOnly();
}
-//------------------------------------------------------------------------------
void OConnection::setCatalog(const rtl::OUString& catalog) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::setCatalog" );
@@ -266,7 +248,6 @@ void OConnection::setCatalog(const rtl::OUString& catalog) throw( SQLException,
m_xMasterConnection->setCatalog(catalog);
}
-//------------------------------------------------------------------------------
rtl::OUString OConnection::getCatalog(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getCatalog" );
@@ -275,7 +256,6 @@ rtl::OUString OConnection::getCatalog(void) throw( SQLException, RuntimeExceptio
return m_xMasterConnection->getCatalog();
}
-//------------------------------------------------------------------------------
void OConnection::setTransactionIsolation(sal_Int32 level) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::setTransactionIsolation" );
@@ -284,7 +264,6 @@ void OConnection::setTransactionIsolation(sal_Int32 level) throw( SQLException,
m_xMasterConnection->setTransactionIsolation(level);
}
-//------------------------------------------------------------------------------
sal_Int32 OConnection::getTransactionIsolation(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getTransactionIsolation" );
@@ -293,7 +272,6 @@ sal_Int32 OConnection::getTransactionIsolation(void) throw( SQLException, Runtim
return m_xMasterConnection->getTransactionIsolation();
}
-//------------------------------------------------------------------------------
Reference< XNameAccess > OConnection::getTypeMap(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getTypeMap" );
@@ -302,7 +280,6 @@ Reference< XNameAccess > OConnection::getTypeMap(void) throw( SQLException, Run
return m_xMasterConnection->getTypeMap();
}
-//------------------------------------------------------------------------------
void OConnection::setTypeMap(const Reference< XNameAccess > & typeMap) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::setTypeMap" );
@@ -314,7 +291,7 @@ void OConnection::setTypeMap(const Reference< XNameAccess > & typeMap) throw( SQ
//= OConnection
//==========================================================================
DBG_NAME(OConnection)
-//--------------------------------------------------------------------------
+
OConnection::OConnection(ODatabaseSource& _rDB
, Reference< XConnection >& _rxMaster
, const Reference< XMultiServiceFactory >& _rxORB)
@@ -415,7 +392,6 @@ OConnection::OConnection(ODatabaseSource& _rDB
osl_decrementInterlockedCount( &m_refCount );
}
-//--------------------------------------------------------------------------
OConnection::~OConnection()
{
delete m_pTables;
@@ -423,9 +399,7 @@ OConnection::~OConnection()
DBG_DTOR(OConnection,NULL);
}
-
// XWarningsSupplier
-//--------------------------------------------------------------------------
Any SAL_CALL OConnection::getWarnings() throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getWarnings" );
@@ -434,7 +408,6 @@ Any SAL_CALL OConnection::getWarnings() throw(SQLException, RuntimeException)
return m_aWarnings.getWarnings();
}
-//--------------------------------------------------------------------------
void SAL_CALL OConnection::clearWarnings( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::clearWarnings" );
@@ -443,7 +416,6 @@ void SAL_CALL OConnection::clearWarnings( ) throw(SQLException, RuntimeExceptio
m_aWarnings.clearWarnings();
}
-//--------------------------------------------------------------------------
namespace
{
struct CompareTypeByName : public ::std::binary_function< Type, Type, bool >
@@ -461,8 +433,8 @@ namespace
::std::insert_iterator< TypeBag >( _out_rTypes, _out_rTypes.begin() ) );
}
}
+
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > OConnection::getTypes() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getTypes" );
@@ -484,7 +456,6 @@ Sequence< Type > OConnection::getTypes() throw (RuntimeException)
return aSupportedTypes;
}
-//--------------------------------------------------------------------------
Sequence< sal_Int8 > OConnection::getImplementationId() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getImplementationId" );
@@ -492,7 +463,6 @@ Sequence< sal_Int8 > OConnection::getImplementationId() throw (RuntimeException)
}
// com::sun::star::uno::XInterface
-//--------------------------------------------------------------------------
Any OConnection::queryInterface( const Type & rType ) throw (RuntimeException)
{
if ( !m_bSupportsViews && rType.equals( XViewsSupplier::static_type() ) )
@@ -511,24 +481,19 @@ Any OConnection::queryInterface( const Type & rType ) throw (RuntimeException)
return aReturn;
}
-//--------------------------------------------------------------------------
void OConnection::acquire() throw ()
{
// include this one when you want to see who calls it (call graph)
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::acquire" );
OSubComponent::acquire();
}
-//--------------------------------------------------------------------------
void OConnection::release() throw ()
{
// include this one when you want to see who calls it (call graph)
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::release" );
OSubComponent::release();
}
// OSubComponent
-//------------------------------------------------------------------------------
void OConnection::disposing()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::disposing" );
@@ -574,7 +539,6 @@ void OConnection::disposing()
}
// XChild
-//------------------------------------------------------------------------------
Reference< XInterface > OConnection::getParent(void) throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getParent" );
@@ -583,7 +547,6 @@ Reference< XInterface > OConnection::getParent(void) throw( RuntimeException )
return m_xParent;
}
-//------------------------------------------------------------------------------
void OConnection::setParent(const Reference< XInterface > & /*Parent*/) throw( NoSupportException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::setParent" );
@@ -591,7 +554,6 @@ void OConnection::setParent(const Reference< XInterface > & /*Parent*/) throw( N
}
// XSQLQueryComposerFactory
-//------------------------------------------------------------------------------
Reference< XSQLQueryComposer > OConnection::createQueryComposer(void) throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::createQueryComposer" );
@@ -603,7 +565,7 @@ Reference< XSQLQueryComposer > OConnection::createQueryComposer(void) throw( Ru
m_aComposers.push_back(WeakReferenceHelper(xComposer));
return xComposer;
}
-// -----------------------------------------------------------------------------
+
void OConnection::impl_fillTableFilter()
{
Reference<XPropertySet> xProp(getParent(),UNO_QUERY);
@@ -614,7 +576,6 @@ void OConnection::impl_fillTableFilter()
}
}
-// -----------------------------------------------------------------------------
void OConnection::refresh(const Reference< XNameAccess >& _rToBeRefreshed)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::refresh" );
@@ -651,10 +612,8 @@ void OConnection::refresh(const Reference< XNameAccess >& _rToBeRefreshed)
}
}
}
-// -----------------------------------------------------------------------------
// XTablesSupplier
-//------------------------------------------------------------------------------
Reference< XNameAccess > OConnection::getTables() throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getTables" );
@@ -665,7 +624,7 @@ Reference< XNameAccess > OConnection::getTables() throw( RuntimeException )
return m_pTables;
}
-// -----------------------------------------------------------------------------
+
Reference< XNameAccess > SAL_CALL OConnection::getViews( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getViews" );
@@ -677,7 +636,6 @@ Reference< XNameAccess > SAL_CALL OConnection::getViews( ) throw(RuntimeExcepti
return m_pViews;
}
// XQueriesSupplier
-//------------------------------------------------------------------------------
Reference< XNameAccess > OConnection::getQueries(void) throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getQueries" );
@@ -688,7 +646,6 @@ Reference< XNameAccess > OConnection::getQueries(void) throw( RuntimeException
}
// ::com::sun::star::sdb::XCommandPreparation
-//------------------------------------------------------------------------------
Reference< XPreparedStatement > SAL_CALL OConnection::prepareCommand( const ::rtl::OUString& command, sal_Int32 commandType ) throw(::com::sun::star::sdbc::SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::prepareCommand" );
@@ -720,7 +677,7 @@ Reference< XPreparedStatement > SAL_CALL OConnection::prepareCommand( const ::r
// TODO EscapeProcessing
return prepareStatement(aStatement);
}
-// -----------------------------------------------------------------------------
+
Reference< XInterface > SAL_CALL OConnection::createInstance( const ::rtl::OUString& _sServiceSpecifier ) throw (Exception, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::createInstance" );
@@ -749,13 +706,13 @@ Reference< XInterface > SAL_CALL OConnection::createInstance( const ::rtl::OUStr
}
return Reference< XInterface >(xRet,UNO_QUERY);
}
-// -----------------------------------------------------------------------------
+
Reference< XInterface > SAL_CALL OConnection::createInstanceWithArguments( const ::rtl::OUString& _sServiceSpecifier, const Sequence< Any >& /*Arguments*/ ) throw (Exception, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::createInstanceWithArguments" );
return createInstance(_sServiceSpecifier);
}
-// -----------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL OConnection::getAvailableServiceNames( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getAvailableServiceNames" );
@@ -763,7 +720,7 @@ Sequence< ::rtl::OUString > SAL_CALL OConnection::getAvailableServiceNames( ) t
aRet[0] = SERVICE_NAME_SINGLESELECTQUERYCOMPOSER;
return aRet;
}
-// -----------------------------------------------------------------------------
+
Reference< XTablesSupplier > OConnection::getMasterTables()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getMasterTables" );
@@ -782,7 +739,7 @@ Reference< XTablesSupplier > OConnection::getMasterTables()
}
return m_xMasterTables;
}
-// -----------------------------------------------------------------------------
+
// XUsersSupplier
Reference< XNameAccess > SAL_CALL OConnection::getUsers( ) throw(RuntimeException)
{
@@ -793,7 +750,7 @@ Reference< XNameAccess > SAL_CALL OConnection::getUsers( ) throw(RuntimeExcepti
Reference<XUsersSupplier> xUsr(getMasterTables(),UNO_QUERY);
return xUsr.is() ? xUsr->getUsers() : Reference< XNameAccess >();
}
-// -----------------------------------------------------------------------------
+
// XGroupsSupplier
Reference< XNameAccess > SAL_CALL OConnection::getGroups( ) throw(RuntimeException)
{
@@ -804,7 +761,6 @@ Reference< XNameAccess > SAL_CALL OConnection::getGroups( ) throw(RuntimeExcept
return xGrp.is() ? xGrp->getGroups() : Reference< XNameAccess >();
}
-// -----------------------------------------------------------------------------
void OConnection::impl_loadConnectionTools_throw()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::impl_loadConnectionTools_throw" );
@@ -815,7 +771,6 @@ void OConnection::impl_loadConnectionTools_throw()
throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "service not registered: com.sun.star.sdb.tools.ConnectionTools" ) ), *this );
}
-// -----------------------------------------------------------------------------
Reference< XTableName > SAL_CALL OConnection::createTableName( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::createTableName" );
@@ -826,7 +781,6 @@ Reference< XTableName > SAL_CALL OConnection::createTableName( ) throw (Runtime
return m_xConnectionTools->createTableName();
}
-// -----------------------------------------------------------------------------
Reference< XObjectNames > SAL_CALL OConnection::getObjectNames( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getObjectNames" );
@@ -837,7 +791,6 @@ Reference< XObjectNames > SAL_CALL OConnection::getObjectNames( ) throw (Runtim
return m_xConnectionTools->getObjectNames();
}
-// -----------------------------------------------------------------------------
Reference< XDataSourceMetaData > SAL_CALL OConnection::getDataSourceMetaData( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getDataSourceMetaData" );
@@ -847,7 +800,7 @@ Reference< XDataSourceMetaData > SAL_CALL OConnection::getDataSourceMetaData( )
return m_xConnectionTools->getDataSourceMetaData();
}
-// -----------------------------------------------------------------------------
+
Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OConnection::getFieldsByCommandDescriptor( ::sal_Int32 commandType, const ::rtl::OUString& command, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& keepFieldsAlive ) throw (::com::sun::star::sdbc::SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getFieldsByCommandDescriptor" );
@@ -857,7 +810,7 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OConnection::getF
return m_xConnectionTools->getFieldsByCommandDescriptor(commandType,command,keepFieldsAlive);
}
-//--------------------------------------------------------------------
+
Reference< XSingleSelectQueryComposer > SAL_CALL OConnection::getComposer( ::sal_Int32 commandType, const ::rtl::OUString& command ) throw (::com::sun::star::uno::RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getComposer" );
@@ -868,7 +821,6 @@ Reference< XSingleSelectQueryComposer > SAL_CALL OConnection::getComposer( ::sal
return m_xConnectionTools->getComposer(commandType,command);
}
-// -----------------------------------------------------------------------------
void OConnection::impl_checkTableQueryNames_nothrow()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::impl_checkTableQueryNames_nothrow" );
@@ -904,7 +856,6 @@ void OConnection::impl_checkTableQueryNames_nothrow()
}
}
-// -----------------------------------------------------------------------------
Reference< XGraphic > SAL_CALL OConnection::getTableIcon( const ::rtl::OUString& _TableName, ::sal_Int32 _ColorMode ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getTableIcon" );
@@ -922,7 +873,6 @@ Reference< XGraphic > SAL_CALL OConnection::getTableIcon( const ::rtl::OUString&
return xReturn;
}
-// -----------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OConnection::getTableEditor( const Reference< XDatabaseDocumentUI >& _DocumentUI, const ::rtl::OUString& _TableName ) throw (IllegalArgumentException, WrappedTargetException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::getTableEditor" );
@@ -940,9 +890,5 @@ Reference< XInterface > SAL_CALL OConnection::getTableEditor( const Reference< X
return xReturn;
}
-
-//........................................................................
} // 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 321c4ae63..b79bda657 100644
--- a/dbaccess/source/core/dataaccess/connection.hxx
+++ b/dbaccess/source/core/dataaccess/connection.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -167,7 +167,7 @@ public:
virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
-// XConnection
+// XConnection
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XStatement > SAL_CALL createStatement( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > SAL_CALL prepareStatement( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > SAL_CALL prepareCall( const ::rtl::OUString& sql ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
diff --git a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
index 4b71e5820..0a5432f79 100644
--- a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
+++ b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -145,7 +145,6 @@ namespace dbaccess
#define REGISTER_PROPERTY( propname, member ) \
registerProperty( PROPERTY_##propname, PROPERTY_ID_##propname, PropertyAttribute::BOUND, &member, ::getCppuType( &member ) )
- //--------------------------------------------------------------------
DataAccessDescriptor::DataAccessDescriptor( const ::comphelper::ComponentContext& _rContext )
:DataAccessDescriptor_MutexBase()
,DataAccessDescriptor_TypeBase()
@@ -188,24 +187,19 @@ namespace dbaccess
REGISTER_PROPERTY( COLUMN, m_xColumn );
}
- //--------------------------------------------------------------------
DataAccessDescriptor::~DataAccessDescriptor()
{
}
- //--------------------------------------------------------------------
IMPLEMENT_FORWARD_XINTERFACE2( DataAccessDescriptor, DataAccessDescriptor_TypeBase, DataAccessDescriptor_PropertyBase );
- //--------------------------------------------------------------------
IMPLEMENT_FORWARD_XTYPEPROVIDER2( DataAccessDescriptor, DataAccessDescriptor_TypeBase, DataAccessDescriptor_PropertyBase );
- //--------------------------------------------------------------------
::rtl::OUString SAL_CALL DataAccessDescriptor::getImplementationName() throw (RuntimeException)
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.dba.DataAccessDescriptor" ) );
}
- //--------------------------------------------------------------------
::sal_Bool SAL_CALL DataAccessDescriptor::supportsService( const ::rtl::OUString& rServiceName ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aServices( getSupportedServiceNames() );
@@ -214,7 +208,6 @@ namespace dbaccess
return ::std::find( pStart, pEnd, rServiceName ) != pEnd;
}
- //--------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL DataAccessDescriptor::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aServices(1);
@@ -222,20 +215,17 @@ namespace dbaccess
return aServices;
}
- //-------------------------------------------------------------------------
Reference< XPropertySetInfo > SAL_CALL DataAccessDescriptor::getPropertySetInfo() throw(RuntimeException)
{
Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
return xInfo;
}
- //-------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& DataAccessDescriptor::getInfoHelper()
{
return *getArrayHelper();
}
- //------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* DataAccessDescriptor::createArrayHelper( ) const
{
Sequence< Property > aProps;
@@ -274,24 +264,20 @@ namespace dbaccess
::comphelper::ComponentContext m_aContext;
};
- //--------------------------------------------------------------------
DataAccessDescriptorFactory::DataAccessDescriptorFactory( const Reference< XComponentContext >& _rxContext )
:m_aContext( _rxContext )
{
}
- //--------------------------------------------------------------------
DataAccessDescriptorFactory::~DataAccessDescriptorFactory()
{
}
- //--------------------------------------------------------------------
::rtl::OUString DataAccessDescriptorFactory::getSingletonName_static()
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.DataAccessDescriptorFactory" ) );
}
- //--------------------------------------------------------------------
Sequence< ::rtl::OUString > DataAccessDescriptorFactory::getSupportedServiceNames_static() throw( RuntimeException )
{
Sequence< ::rtl::OUString > aServices(1);
@@ -299,25 +285,21 @@ namespace dbaccess
return aServices;
}
- //--------------------------------------------------------------------
::rtl::OUString DataAccessDescriptorFactory::getImplementationName_static() throw( RuntimeException )
{
return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.dba.DataAccessDescriptorFactory" ) );
}
- //--------------------------------------------------------------------
Reference< XInterface > DataAccessDescriptorFactory::Create( const Reference< XComponentContext >& _rxContext )
{
return *( new DataAccessDescriptorFactory( _rxContext ) );
}
- //--------------------------------------------------------------------
::rtl::OUString SAL_CALL DataAccessDescriptorFactory::getImplementationName() throw (RuntimeException)
{
return getImplementationName_static();
}
- //--------------------------------------------------------------------
::sal_Bool SAL_CALL DataAccessDescriptorFactory::supportsService( const ::rtl::OUString& rServiceName ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aServices( getSupportedServiceNames_static() );
@@ -326,23 +308,18 @@ namespace dbaccess
return ::std::find( pStart, pEnd, rServiceName ) != pEnd;
}
- //--------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL DataAccessDescriptorFactory::getSupportedServiceNames( ) throw (RuntimeException)
{
return getSupportedServiceNames_static();
}
- //--------------------------------------------------------------------
Reference< XPropertySet > SAL_CALL DataAccessDescriptorFactory::createDataAccessDescriptor( ) throw (RuntimeException)
{
return new DataAccessDescriptor( m_aContext );
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
-//--------------------------------------------------------------------------
extern "C" void SAL_CALL createRegistryInfo_DataAccessDescriptorFactory()
{
static ::dba::OSingletonRegistration< ::dbaccess::DataAccessDescriptorFactory > aAutoRegistration;
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 08c0ea942..6fcf10a30 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -101,19 +101,15 @@ using ::com::sun::star::ucb::InteractiveIOException;
using ::com::sun::star::ucb::IOErrorCode_NOT_EXISTING;
using ::com::sun::star::ucb::IOErrorCode_NOT_EXISTING_PATH;
-//==========================================================================
extern "C" void SAL_CALL createRegistryInfo_ODatabaseContext()
{
static ::dba::OLegacySingletonRegistration< ::dbaccess::ODatabaseContext > aODatabaseContext_AutoRegistration;
}
-//........................................................................
namespace dbaccess
{
-//........................................................................
- // .............................................................................
typedef ::cppu::WeakImplHelper1 < XTerminateListener
> DatabaseDocumentLoader_Base;
class DatabaseDocumentLoader : public DatabaseDocumentLoader_Base
@@ -139,7 +135,6 @@ namespace dbaccess
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
};
- // .............................................................................
DatabaseDocumentLoader::DatabaseDocumentLoader( const comphelper::ComponentContext& _aContext )
{
acquire();
@@ -173,25 +168,24 @@ namespace dbaccess
}
}
};
- // .............................................................................
+
void SAL_CALL DatabaseDocumentLoader::queryTermination( const lang::EventObject& /*Event*/ ) throw (TerminationVetoException, RuntimeException)
{
::std::list< const ODatabaseModelImpl* > aCopy(m_aDatabaseDocuments);
::std::for_each(aCopy.begin(),aCopy.end(),TerminateFunctor());
}
- // .............................................................................
void SAL_CALL DatabaseDocumentLoader::notifyTermination( const lang::EventObject& /*Event*/ ) throw (RuntimeException)
{
}
- // .............................................................................
+
void SAL_CALL DatabaseDocumentLoader::disposing( const lang::EventObject& /*Source*/ ) throw (RuntimeException)
{
}
//= ODatabaseContext
//==========================================================================
-//--------------------------------------------------------------------------
+
ODatabaseContext::ODatabaseContext( const Reference< XComponentContext >& _rxContext )
:DatabaseAccessContext_Base(m_aMutex)
,m_aContext( _rxContext )
@@ -210,7 +204,6 @@ ODatabaseContext::ODatabaseContext( const Reference< XComponentContext >& _rxCon
osl_decrementInterlockedCount( &m_refCount );
}
-//--------------------------------------------------------------------------
ODatabaseContext::~ODatabaseContext()
{
::basic::BasicManagerRepository::revokeCreationListener( *this );
@@ -223,20 +216,17 @@ ODatabaseContext::~ODatabaseContext()
}
// Helper
-//------------------------------------------------------------------------------
rtl::OUString ODatabaseContext::getImplementationName_static() throw( RuntimeException )
{
return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.dba.ODatabaseContext"));
}
-//------------------------------------------------------------------------------
Reference< XInterface > ODatabaseContext::Create(const Reference< XComponentContext >& _rxContext)
{
return *( new ODatabaseContext( _rxContext ) );
}
-//------------------------------------------------------------------------------
Sequence< rtl::OUString > ODatabaseContext::getSupportedServiceNames_static(void) throw( RuntimeException )
{
Sequence< ::rtl::OUString > aSNS( 1 );
@@ -245,25 +235,21 @@ Sequence< rtl::OUString > ODatabaseContext::getSupportedServiceNames_static(void
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString ODatabaseContext::getImplementationName( ) throw(RuntimeException)
{
return getImplementationName_static();
}
-//------------------------------------------------------------------------------
sal_Bool ODatabaseContext::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > ODatabaseContext::getSupportedServiceNames( ) throw (RuntimeException)
{
return getSupportedServiceNames_static();
}
-//--------------------------------------------------------------------------
Reference< XInterface > ODatabaseContext::impl_createNewDataSource()
{
::rtl::Reference<ODatabaseModelImpl> pImpl( new ODatabaseModelImpl( m_aContext.getLegacyServiceFactory(), *this ) );
@@ -272,7 +258,6 @@ Reference< XInterface > ODatabaseContext::impl_createNewDataSource()
return xDataSource.get();
}
-//--------------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODatabaseContext::createInstance( ) throw (Exception, RuntimeException)
{
// for convenience of the API user, we ensure the document is fully initialized (effectively: XLoadable::initNew
@@ -280,7 +265,6 @@ Reference< XInterface > SAL_CALL ODatabaseContext::createInstance( ) throw (Exc
return impl_createNewDataSource();
}
-//--------------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODatabaseContext::createInstanceWithArguments( const Sequence< Any >& _rArguments ) throw (Exception, RuntimeException)
{
::comphelper::NamedValueCollection aArgs( _rArguments );
@@ -295,8 +279,8 @@ Reference< XInterface > SAL_CALL ODatabaseContext::createInstanceWithArguments(
return xDataSource;
}
+
// DatabaseAccessContext_Base
-//------------------------------------------------------------------------------
void ODatabaseContext::disposing()
{
// notify our listener
@@ -316,7 +300,6 @@ void ODatabaseContext::disposing()
}
// XNamingService
-//------------------------------------------------------------------------------
Reference< XInterface > ODatabaseContext::getRegisteredObject(const rtl::OUString& _rName) throw( Exception, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -335,7 +318,7 @@ Reference< XInterface > ODatabaseContext::getRegisteredObject(const rtl::OUStri
return loadObjectFromURL( _rName, sURL );
}
-// -----------------------------------------------------------------------------
+
Reference< XInterface > ODatabaseContext::loadObjectFromURL(const ::rtl::OUString& _rName,const ::rtl::OUString& _sURL)
{
INetURLObject aURL( _sURL );
@@ -400,17 +383,17 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const ::rtl::OUStrin
return pModelImpl->getOrCreateDataSource().get();
}
-// -----------------------------------------------------------------------------
+
void ODatabaseContext::appendAtTerminateListener(const ODatabaseModelImpl& _rDataSourceModel)
{
m_pDatabaseDocumentLoader->append(_rDataSourceModel);
}
-// -----------------------------------------------------------------------------
+
void ODatabaseContext::removeFromTerminateListener(const ODatabaseModelImpl& _rDataSourceModel)
{
m_pDatabaseDocumentLoader->remove(_rDataSourceModel);
}
-// -----------------------------------------------------------------------------
+
void ODatabaseContext::setTransientProperties(const ::rtl::OUString& _sURL, ODatabaseModelImpl& _rDataSourceModel )
{
if ( m_aDatasourceProperties.end() == m_aDatasourceProperties.find(_sURL) )
@@ -442,7 +425,6 @@ void ODatabaseContext::setTransientProperties(const ::rtl::OUString& _sURL, ODat
}
}
-//------------------------------------------------------------------------------
void ODatabaseContext::registerObject(const rtl::OUString& _rName, const Reference< XInterface > & _rxObject) throw( Exception, RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -469,7 +451,6 @@ void ODatabaseContext::registerObject(const rtl::OUString& _rName, const Referen
m_aContainerListeners.notifyEach( &XContainerListener::elementInserted, aEvent );
}
-//------------------------------------------------------------------------------
void ODatabaseContext::storeTransientProperties( ODatabaseModelImpl& _rModelImpl)
{
Reference< XPropertySet > xSource( _rModelImpl.getOrCreateDataSource(), UNO_QUERY );
@@ -527,19 +508,16 @@ void ODatabaseContext::storeTransientProperties( ODatabaseModelImpl& _rModelImpl
}
}
-//------------------------------------------------------------------------------
void SAL_CALL ODatabaseContext::addContainerListener( const Reference< XContainerListener >& _rxListener ) throw(RuntimeException)
{
m_aContainerListeners.addInterface(_rxListener);
}
-//------------------------------------------------------------------------------
void SAL_CALL ODatabaseContext::removeContainerListener( const Reference< XContainerListener >& _rxListener ) throw(RuntimeException)
{
m_aContainerListeners.removeInterface(_rxListener);
}
-//------------------------------------------------------------------------------
void ODatabaseContext::revokeObject(const rtl::OUString& _rName) throw( Exception, RuntimeException )
{
ClearableMutexGuard aGuard(m_aMutex);
@@ -566,68 +544,57 @@ void ODatabaseContext::revokeObject(const rtl::OUString& _rName) throw( Exceptio
m_aContainerListeners.notifyEach( &XContainerListener::elementRemoved, aEvent );
}
-//------------------------------------------------------------------------------
::sal_Bool SAL_CALL ODatabaseContext::hasRegisteredDatabase( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, RuntimeException)
{
return m_xDatabaseRegistrations->hasRegisteredDatabase( _Name );
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL ODatabaseContext::getRegistrationNames() throw (RuntimeException)
{
return m_xDatabaseRegistrations->getRegistrationNames();
}
-//------------------------------------------------------------------------------
::rtl::OUString SAL_CALL ODatabaseContext::getDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
{
return m_xDatabaseRegistrations->getDatabaseLocation( _Name );
}
-//------------------------------------------------------------------------------
void SAL_CALL ODatabaseContext::registerDatabaseLocation( const ::rtl::OUString& _Name, const ::rtl::OUString& _Location ) throw (IllegalArgumentException, ElementExistException, RuntimeException)
{
m_xDatabaseRegistrations->registerDatabaseLocation( _Name, _Location );
}
-//------------------------------------------------------------------------------
void SAL_CALL ODatabaseContext::revokeDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException)
{
m_xDatabaseRegistrations->revokeDatabaseLocation( _Name );
}
-//------------------------------------------------------------------------------
void SAL_CALL ODatabaseContext::changeDatabaseLocation( const ::rtl::OUString& _Name, const ::rtl::OUString& _NewLocation ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException)
{
m_xDatabaseRegistrations->changeDatabaseLocation( _Name, _NewLocation );
}
-//------------------------------------------------------------------------------
::sal_Bool SAL_CALL ODatabaseContext::isDatabaseRegistrationReadOnly( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
{
return m_xDatabaseRegistrations->isDatabaseRegistrationReadOnly( _Name );
}
-//------------------------------------------------------------------------------
void SAL_CALL ODatabaseContext::addDatabaseRegistrationsListener( const Reference< XDatabaseRegistrationsListener >& _Listener ) throw (RuntimeException)
{
m_xDatabaseRegistrations->addDatabaseRegistrationsListener( _Listener );
}
-//------------------------------------------------------------------------------
void SAL_CALL ODatabaseContext::removeDatabaseRegistrationsListener( const Reference< XDatabaseRegistrationsListener >& _Listener ) throw (RuntimeException)
{
m_xDatabaseRegistrations->removeDatabaseRegistrationsListener( _Listener );
}
// ::com::sun::star::container::XElementAccess
-//------------------------------------------------------------------------------
Type ODatabaseContext::getElementType( ) throw(RuntimeException)
{
return::getCppuType(static_cast<Reference<XDataSource>*>(NULL));
}
-//------------------------------------------------------------------------------
sal_Bool ODatabaseContext::hasElements(void) throw( RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -637,7 +604,6 @@ sal_Bool ODatabaseContext::hasElements(void) throw( RuntimeException )
}
// ::com::sun::star::container::XEnumerationAccess
-//------------------------------------------------------------------------------
Reference< ::com::sun::star::container::XEnumeration > ODatabaseContext::createEnumeration(void) throw( RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -645,7 +611,6 @@ Reference< ::com::sun::star::container::XEnumeration > ODatabaseContext::create
}
// ::com::sun::star::container::XNameAccess
-//------------------------------------------------------------------------------
Any ODatabaseContext::getByName(const rtl::OUString& _rName) throw( NoSuchElementException,
WrappedTargetException, RuntimeException )
{
@@ -696,7 +661,6 @@ Any ODatabaseContext::getByName(const rtl::OUString& _rName) throw( NoSuchElemen
}
}
-//------------------------------------------------------------------------------
Sequence< rtl::OUString > ODatabaseContext::getElementNames(void) throw( RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -705,7 +669,6 @@ Sequence< rtl::OUString > ODatabaseContext::getElementNames(void) throw( Runtime
return getRegistrationNames();
}
-//------------------------------------------------------------------------------
sal_Bool ODatabaseContext::hasByName(const rtl::OUString& _rName) throw( RuntimeException )
{
MutexGuard aGuard(m_aMutex);
@@ -714,7 +677,6 @@ sal_Bool ODatabaseContext::hasByName(const rtl::OUString& _rName) throw( Runtime
return hasRegisteredDatabase( _rName );
}
-// -----------------------------------------------------------------------------
Reference< XInterface > ODatabaseContext::getObject( const ::rtl::OUString& _rURL )
{
ObjectCacheIterator aFind = m_aDatabaseObjects.find( _rURL );
@@ -723,7 +685,7 @@ Reference< XInterface > ODatabaseContext::getObject( const ::rtl::OUString& _rUR
xExistent = aFind->second->getOrCreateDataSource();
return xExistent;
}
-// -----------------------------------------------------------------------------
+
void ODatabaseContext::registerDatabaseDocument( ODatabaseModelImpl& _rModelImpl )
{
::rtl::OUString sURL( _rModelImpl.getURL() );
@@ -738,7 +700,7 @@ void ODatabaseContext::registerDatabaseDocument( ODatabaseModelImpl& _rModelImpl
else
OSL_ENSURE( false, "ODatabaseContext::registerDatabaseDocument: already have an object registered for this URL!" );
}
-// -----------------------------------------------------------------------------
+
void ODatabaseContext::revokeDatabaseDocument( const ODatabaseModelImpl& _rModelImpl )
{
::rtl::OUString sURL( _rModelImpl.getURL() );
@@ -747,7 +709,7 @@ void ODatabaseContext::revokeDatabaseDocument( const ODatabaseModelImpl& _rModel
#endif
m_aDatabaseObjects.erase( sURL );
}
-// -----------------------------------------------------------------------------
+
void ODatabaseContext::databaseDocumentURLChange( const ::rtl::OUString& _rOldURL, const ::rtl::OUString& _rNewURL )
{
#if OSL_DEBUG_LEVEL > 1
@@ -763,7 +725,7 @@ void ODatabaseContext::databaseDocumentURLChange( const ::rtl::OUString& _rOldUR
m_aDatabaseObjects[ _rNewURL ] = oldPos->second;
m_aDatabaseObjects.erase( oldPos );
}
-// -----------------------------------------------------------------------------
+
sal_Int64 SAL_CALL ODatabaseContext::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException)
{
if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) )
@@ -771,7 +733,7 @@ sal_Int64 SAL_CALL ODatabaseContext::getSomething( const Sequence< sal_Int8 >& r
return 0;
}
-// -----------------------------------------------------------------------------
+
Sequence< sal_Int8 > ODatabaseContext::getUnoTunnelImplementationId()
{
static ::cppu::OImplementationId * pId = 0;
@@ -787,7 +749,6 @@ Sequence< sal_Int8 > ODatabaseContext::getUnoTunnelImplementationId()
return pId->getImplementationId();
}
-// -----------------------------------------------------------------------------
void ODatabaseContext::onBasicManagerCreated( const Reference< XModel >& _rxForDocument, BasicManager& _rBasicManager )
{
// if it's a database document ...
@@ -805,8 +766,5 @@ void ODatabaseContext::onBasicManagerCreated( const Reference< XModel >& _rxForD
_rBasicManager.SetGlobalUNOConstant( "ThisDatabaseDocument", makeAny( xDatabaseDocument ) );
}
-//........................................................................
} // 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 072299c76..1dab6800f 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.hxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -91,7 +91,6 @@ private:
/** loads the given object from the given URL
@throws WrappedTargetException
if an error occurs accessing the URL via the UCB
-
*/
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > loadObjectFromURL(const ::rtl::OUString& _rName,const ::rtl::OUString& _sURL);
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > getObject( const ::rtl::OUString& _rURL );
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index c0690bb6e..46a820187 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -122,15 +122,13 @@ using ::com::sun::star::awt::XWindow;
using ::com::sun::star::ucb::XContent;
using ::com::sun::star::sdb::application::XDatabaseDocumentUI;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//============================================================
//= ViewMonitor
//============================================================
-//--------------------------------------------------------------------------
+
bool ViewMonitor::onControllerConnected( const Reference< XController >& _rxController )
{
bool bFirstControllerEver = ( m_bEverHadController == false );
@@ -142,7 +140,6 @@ bool ViewMonitor::onControllerConnected( const Reference< XController >& _rxCont
return bFirstControllerEver;
}
-//--------------------------------------------------------------------------
bool ViewMonitor::onSetCurrentController( const Reference< XController >& _rxController )
{
// we interpret this as "loading the document (including UI) is finished",
@@ -161,13 +158,12 @@ bool ViewMonitor::onSetCurrentController( const Reference< XController >& _rxCon
//= ODatabaseDocument
//============================================================
DBG_NAME(ODatabaseDocument)
-//--------------------------------------------------------------------------
+
extern "C" void SAL_CALL createRegistryInfo_ODatabaseDocument()
{
static ::dba::OAutoRegistration< ODatabaseDocument > aAutoRegistration;
}
-//--------------------------------------------------------------------------
ODatabaseDocument::ODatabaseDocument(const ::rtl::Reference<ODatabaseModelImpl>& _pImpl )
:ModelDependentComponent( _pImpl )
,ODatabaseDocument_OfficeDocument( getMutex() )
@@ -217,7 +213,6 @@ ODatabaseDocument::ODatabaseDocument(const ::rtl::Reference<ODatabaseModelImpl>&
}
}
-//--------------------------------------------------------------------------
ODatabaseDocument::~ODatabaseDocument()
{
OSL_TRACE( "DD: dtor: %p: %p", this, m_pImpl.get() );
@@ -230,7 +225,7 @@ ODatabaseDocument::~ODatabaseDocument()
delete m_pEventContainer, m_pEventContainer = NULL;
}
-// -----------------------------------------------------------------------------
+
Any SAL_CALL ODatabaseDocument::queryInterface( const Type& _rType ) throw (RuntimeException)
{
// strip XEmbeddedScripts and XScriptInvocationContext if we have any form/report
@@ -248,18 +243,17 @@ Any SAL_CALL ODatabaseDocument::queryInterface( const Type& _rType ) throw (Runt
aReturn = ODatabaseDocument_Title::queryInterface(_rType);
return aReturn;
}
-//------------------------------------------------------------------------------
+
void SAL_CALL ODatabaseDocument::acquire( ) throw ()
{
ODatabaseDocument_OfficeDocument::acquire();
}
-//------------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::release( ) throw ()
{
ODatabaseDocument_OfficeDocument::release();
}
-//------------------------------------------------------------------------------
+
Sequence< Type > SAL_CALL ODatabaseDocument::getTypes( ) throw (RuntimeException)
{
Sequence< Type > aTypes = ::comphelper::concatSequences(
@@ -300,7 +294,7 @@ Sequence< Type > SAL_CALL ODatabaseDocument::getTypes( ) throw (RuntimeException
return aTypes;
}
-//------------------------------------------------------------------------------
+
Sequence< sal_Int8 > SAL_CALL ODatabaseDocument::getImplementationId( ) throw (RuntimeException)
{
static ::cppu::OImplementationId * pId = 0;
@@ -316,19 +310,15 @@ Sequence< sal_Int8 > SAL_CALL ODatabaseDocument::getImplementationId( ) throw (
return pId->getImplementationId();
}
-// -----------------------------------------------------------------------------
// local functions
-// -----------------------------------------------------------------------------
namespace
{
- // -----------------------------------------------------------------------------
Reference< XStatusIndicator > lcl_extractStatusIndicator( const ::comphelper::NamedValueCollection& _rArguments )
{
Reference< XStatusIndicator > xStatusIndicator;
return _rArguments.getOrDefault( "StatusIndicator", xStatusIndicator );
}
- // -----------------------------------------------------------------------------
static void lcl_triggerStatusIndicator_throw( const ::comphelper::NamedValueCollection& _rArguments, DocumentGuard& _rGuard, const bool _bStart )
{
Reference< XStatusIndicator > xStatusIndicator( lcl_extractStatusIndicator( _rArguments ) );
@@ -351,7 +341,6 @@ namespace
// note that |reset| can throw a DisposedException
}
- // -----------------------------------------------------------------------------
static void lcl_extractStatusIndicator( const ::comphelper::NamedValueCollection& _rArguments, Sequence< Any >& _rCallArgs )
{
Reference< XStatusIndicator > xStatusIndicator( lcl_extractStatusIndicator( _rArguments ) );
@@ -363,7 +352,6 @@ namespace
_rCallArgs[ nLength ] <<= xStatusIndicator;
}
- // -----------------------------------------------------------------------------
static void lcl_extractAndStartStatusIndicator( const ::comphelper::NamedValueCollection& _rArguments, Reference< XStatusIndicator >& _rxStatusIndicator,
Sequence< Any >& _rCallArgs )
{
@@ -385,7 +373,6 @@ namespace
}
}
- // -----------------------------------------------------------------------------
static Sequence< PropertyValue > lcl_appendFileNameToDescriptor( const ::comphelper::NamedValueCollection& _rDescriptor, const ::rtl::OUString _rURL )
{
::comphelper::NamedValueCollection aMutableDescriptor( _rDescriptor );
@@ -398,7 +385,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_setInitialized()
{
m_eInitState = Initialized;
@@ -407,7 +393,6 @@ void ODatabaseDocument::impl_setInitialized()
m_aEventNotifier.onDocumentInitialized();
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_reset_nothrow()
{
try
@@ -432,7 +417,6 @@ void ODatabaseDocument::impl_reset_nothrow()
m_pImpl->m_bDocumentReadOnly = sal_False;
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_import_nolck_throw( const ::comphelper::ComponentContext _rContext, const Reference< XInterface >& _rxTargetComponent,
const ::comphelper::NamedValueCollection& _rResource )
{
@@ -470,7 +454,6 @@ void ODatabaseDocument::impl_import_nolck_throw( const ::comphelper::ComponentCo
xStatusIndicator->end();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::initNew( ) throw (DoubleInitializationException, IOException, Exception, RuntimeException)
{
// SYNCHRONIZED ->
@@ -505,7 +488,6 @@ void SAL_CALL ODatabaseDocument::initNew( ) throw (DoubleInitializationExceptio
impl_notifyStorageChange_nolck_nothrow( xTempStor );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::load( const Sequence< PropertyValue >& _Arguments ) throw (DoubleInitializationException, IOException, Exception, RuntimeException)
{
// SYNCHRONIZED ->
@@ -551,10 +533,8 @@ void SAL_CALL ODatabaseDocument::load( const Sequence< PropertyValue >& _Argumen
// <- SYNCHRONIZED
}
-// -----------------------------------------------------------------------------
namespace
{
- // .........................................................................
bool lcl_hasAnyModifiedSubComponent_throw( const Reference< XController >& i_rController )
{
Reference< XDatabaseDocumentUI > xDatabaseUI( i_rController, UNO_QUERY_THROW );
@@ -582,7 +562,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
::sal_Bool SAL_CALL ODatabaseDocument::wasModifiedSinceLastSave() throw ( RuntimeException )
{
DocumentGuard aGuard( *this );
@@ -621,7 +600,6 @@ namespace
return sal_False;
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::storeToRecoveryFile( const ::rtl::OUString& i_TargetLocation, const Sequence< PropertyValue >& i_MediaDescriptor ) throw ( RuntimeException, IOException, WrappedTargetException )
{
DocumentGuard aGuard( *this );
@@ -658,7 +636,6 @@ void SAL_CALL ODatabaseDocument::storeToRecoveryFile( const ::rtl::OUString& i_T
}
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::recoverFromFile( const ::rtl::OUString& i_SourceLocation, const ::rtl::OUString& i_SalvagedFile, const Sequence< PropertyValue >& i_MediaDescriptor ) throw ( RuntimeException, IOException, WrappedTargetException )
{
DocumentGuard aGuard( *this, DocumentGuard::InitMethod );
@@ -707,7 +684,6 @@ void SAL_CALL ODatabaseDocument::recoverFromFile( const ::rtl::OUString& i_Sourc
}
}
-// -----------------------------------------------------------------------------
// XModel
sal_Bool SAL_CALL ODatabaseDocument::attachResource( const ::rtl::OUString& _rURL, const Sequence< PropertyValue >& _rArguments ) throw (RuntimeException)
{
@@ -715,7 +691,6 @@ sal_Bool SAL_CALL ODatabaseDocument::attachResource( const ::rtl::OUString& _rUR
return impl_attachResource( _rURL, _rArguments, aGuard );
}
-// -----------------------------------------------------------------------------
sal_Bool ODatabaseDocument::impl_attachResource( const ::rtl::OUString& i_rLogicalDocumentURL,
const Sequence< PropertyValue >& i_rMediaDescriptor, DocumentGuard& _rDocGuard )
{
@@ -757,21 +732,18 @@ sal_Bool ODatabaseDocument::impl_attachResource( const ::rtl::OUString& i_rLogic
return sal_True;
}
-// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL ODatabaseDocument::getURL( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
return m_pImpl->getURL();
}
-// -----------------------------------------------------------------------------
Sequence< PropertyValue > SAL_CALL ODatabaseDocument::getArgs( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
return m_pImpl->getMediaDescriptor().getPropertyValues();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::connectController( const Reference< XController >& _xController ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -798,7 +770,6 @@ void SAL_CALL ODatabaseDocument::connectController( const Reference< XController
m_pImpl->checkMacrosOnLoading();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::disconnectController( const Reference< XController >& _xController ) throw (RuntimeException)
{
bool bNotifyViewClosed = false;
@@ -843,7 +814,6 @@ void SAL_CALL ODatabaseDocument::disconnectController( const Reference< XControl
}
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::lockControllers( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -851,7 +821,6 @@ void SAL_CALL ODatabaseDocument::lockControllers( ) throw (RuntimeException)
++m_pImpl->m_nControllerLockCount;
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::unlockControllers( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -859,7 +828,6 @@ void SAL_CALL ODatabaseDocument::unlockControllers( ) throw (RuntimeException)
--m_pImpl->m_nControllerLockCount;
}
-// -----------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseDocument::hasControllersLocked( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -867,7 +835,6 @@ sal_Bool SAL_CALL ODatabaseDocument::hasControllersLocked( ) throw (RuntimeExce
return m_pImpl->m_nControllerLockCount != 0;
}
-// -----------------------------------------------------------------------------
Reference< XController > SAL_CALL ODatabaseDocument::getCurrentController() throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -875,7 +842,6 @@ Reference< XController > SAL_CALL ODatabaseDocument::getCurrentController() thro
return m_xCurrentController.is() ? m_xCurrentController : ( m_aControllers.empty() ? Reference< XController >() : *m_aControllers.begin() );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::setCurrentController( const Reference< XController >& _xController ) throw (NoSuchElementException, RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -905,7 +871,6 @@ void SAL_CALL ODatabaseDocument::setCurrentController( const Reference< XControl
}
}
-// -----------------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODatabaseDocument::getCurrentSelection( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -917,14 +882,13 @@ Reference< XInterface > SAL_CALL ODatabaseDocument::getCurrentSelection( ) thro
return xRet;
}
-// -----------------------------------------------------------------------------
// XStorable
sal_Bool SAL_CALL ODatabaseDocument::hasLocation( ) throw (RuntimeException)
{
return getLocation().getLength() > 0;
}
-// -----------------------------------------------------------------------------
+
::rtl::OUString SAL_CALL ODatabaseDocument::getLocation( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
@@ -932,13 +896,13 @@ sal_Bool SAL_CALL ODatabaseDocument::hasLocation( ) throw (RuntimeException)
// both XStorable::getLocation and XModel::getURL have to return the URL of the document, *not*
// the location of the file which the docunment was possibly recovered from (which would be getDocFileLocation)
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODatabaseDocument::isReadonly( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
return m_pImpl->m_bDocumentReadOnly;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseDocument::store( ) throw (IOException, RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -976,7 +940,6 @@ void SAL_CALL ODatabaseDocument::store( ) throw (IOException, RuntimeException)
}
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_throwIOExceptionCausedBySave_throw( const Any& i_rError, const ::rtl::OUString& i_rTargetURL ) const
{
::rtl::OUString sErrorMessage = extractExceptionMessage( m_pImpl->m_aContext, i_rError );
@@ -988,7 +951,6 @@ void ODatabaseDocument::impl_throwIOExceptionCausedBySave_throw( const Any& i_rE
throw IOException( sErrorMessage, *const_cast< ODatabaseDocument* >( this ) );
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_storeAs_throw( const ::rtl::OUString& _rURL, const ::comphelper::NamedValueCollection& _rArguments,
const StoreType _eType, DocumentGuard& _rGuard ) throw ( IOException, RuntimeException )
{
@@ -1091,7 +1053,6 @@ void ODatabaseDocument::impl_storeAs_throw( const ::rtl::OUString& _rURL, const
impl_notifyStorageChange_nolck_nothrow( xNewRootStorage );
}
-// -----------------------------------------------------------------------------
Reference< XStorage > ODatabaseDocument::impl_createStorageFor_throw( const ::rtl::OUString& _rURL ) const
{
Reference < ::com::sun::star::ucb::XSimpleFileAccess > xTempAccess;
@@ -1110,7 +1071,6 @@ Reference< XStorage > ODatabaseDocument::impl_createStorageFor_throw( const ::rt
return Reference< XStorage >( xStorageFactory->createInstanceWithArguments( aParam ), UNO_QUERY_THROW );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::storeAsURL( const ::rtl::OUString& _rURL, const Sequence< PropertyValue >& _rArguments ) throw (IOException, RuntimeException)
{
// SYNCHRONIZED ->
@@ -1159,7 +1119,6 @@ void SAL_CALL ODatabaseDocument::storeAsURL( const ::rtl::OUString& _rURL, const
m_aEventNotifier.notifyDocumentEvent( "OnCreate" );
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_storeToStorage_throw( const Reference< XStorage >& _rxTargetStorage, const Sequence< PropertyValue >& _rMediaDescriptor,
DocumentGuard& _rDocGuard ) const
{
@@ -1200,7 +1159,6 @@ void ODatabaseDocument::impl_storeToStorage_throw( const Reference< XStorage >&
}
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::storeToURL( const ::rtl::OUString& _rURL, const Sequence< PropertyValue >& _rArguments ) throw (IOException, RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -1242,7 +1200,6 @@ void SAL_CALL ODatabaseDocument::storeToURL( const ::rtl::OUString& _rURL, const
m_aEventNotifier.notifyDocumentEventAsync( "OnSaveToDone", NULL, makeAny( _rURL ) );
}
-// -----------------------------------------------------------------------------
// XModifyBroadcaster
void SAL_CALL ODatabaseDocument::addModifyListener( const Reference< XModifyListener >& _xListener ) throw (RuntimeException)
{
@@ -1250,14 +1207,12 @@ void SAL_CALL ODatabaseDocument::addModifyListener( const Reference< XModifyList
m_aModifyListeners.addInterface(_xListener);
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::removeModifyListener( const Reference< XModifyListener >& _xListener ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
m_aModifyListeners.removeInterface(_xListener);
}
-// -----------------------------------------------------------------------------
// XModifiable
sal_Bool SAL_CALL ODatabaseDocument::isModified( ) throw (RuntimeException)
{
@@ -1266,7 +1221,6 @@ sal_Bool SAL_CALL ODatabaseDocument::isModified( ) throw (RuntimeException)
return m_pImpl->m_bModified;
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::setModified( sal_Bool _bModified ) throw (PropertyVetoException, RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
@@ -1277,7 +1231,6 @@ void SAL_CALL ODatabaseDocument::setModified( sal_Bool _bModified ) throw (Prope
// a proper "modified" flag
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_setModified_nothrow( sal_Bool _bModified, DocumentGuard& _rGuard )
{
// SYNCHRONIZED ->
@@ -1298,32 +1251,27 @@ void ODatabaseDocument::impl_setModified_nothrow( sal_Bool _bModified, DocumentG
}
}
-// -----------------------------------------------------------------------------
// ::com::sun::star::document::XEventBroadcaster
void SAL_CALL ODatabaseDocument::addEventListener(const uno::Reference< document::XEventListener >& _Listener ) throw (uno::RuntimeException)
{
m_aEventNotifier.addLegacyEventListener( _Listener );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::removeEventListener( const uno::Reference< document::XEventListener >& _Listener ) throw (uno::RuntimeException)
{
m_aEventNotifier.removeLegacyEventListener( _Listener );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::addDocumentEventListener( const Reference< XDocumentEventListener >& _Listener ) throw (RuntimeException)
{
m_aEventNotifier.addDocumentEventListener( _Listener );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::removeDocumentEventListener( const Reference< XDocumentEventListener >& _Listener ) throw (RuntimeException)
{
m_aEventNotifier.removeDocumentEventListener( _Listener );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::notifyDocumentEvent( const ::rtl::OUString& _EventName, const Reference< XController2 >& _ViewController, const Any& _Supplement ) throw (IllegalArgumentException, NoSupportException, RuntimeException)
{
if ( !_EventName.getLength() )
@@ -1343,33 +1291,29 @@ void SAL_CALL ODatabaseDocument::notifyDocumentEvent( const ::rtl::OUString& _Ev
m_aEventNotifier.notifyDocumentEvent( _EventName, _ViewController, _Supplement );
}
-// -----------------------------------------------------------------------------
Sequence< PropertyValue > SAL_CALL ODatabaseDocument::getPrinter( ) throw (RuntimeException)
{
DBG_ERROR( "ODatabaseDocument::getPrinter: not supported!" );
return Sequence< PropertyValue >();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::setPrinter( const Sequence< PropertyValue >& /*aPrinter*/ ) throw (IllegalArgumentException, RuntimeException)
{
DBG_ERROR( "ODatabaseDocument::setPrinter: not supported!" );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::print( const Sequence< PropertyValue >& /*xOptions*/ ) throw (IllegalArgumentException, RuntimeException)
{
DBG_ERROR( "ODatabaseDocument::print: not supported!" );
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_reparent_nothrow( const WeakReference< XNameAccess >& _rxContainer )
{
Reference< XChild > xChild( _rxContainer.get(), UNO_QUERY );
if ( xChild.is() )
xChild->setParent( *this );
}
-// -----------------------------------------------------------------------------
+
void ODatabaseDocument::clearObjectContainer( WeakReference< XNameAccess >& _rxContainer)
{
Reference< XNameAccess > xContainer = _rxContainer;
@@ -1380,7 +1324,7 @@ void ODatabaseDocument::clearObjectContainer( WeakReference< XNameAccess >& _rxC
xChild->setParent( NULL );
_rxContainer = Reference< XNameAccess >();
}
-// -----------------------------------------------------------------------------
+
Reference< XNameAccess > ODatabaseDocument::impl_getDocumentContainer_throw( ODatabaseModelImpl::ObjectType _eType )
{
if ( ( _eType != ODatabaseModelImpl::E_FORM ) && ( _eType != ODatabaseModelImpl::E_REPORT ) )
@@ -1416,7 +1360,6 @@ Reference< XNameAccess > ODatabaseDocument::impl_getDocumentContainer_throw( ODa
return xContainer;
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_closeControllerFrames_nolck_throw( sal_Bool _bDeliverOwnership )
{
Controllers aCopy = m_aControllers;
@@ -1441,7 +1384,6 @@ void ODatabaseDocument::impl_closeControllerFrames_nolck_throw( sal_Bool _bDeliv
}
}
-// -----------------------------------------------------------------------------
struct DisposeControllerFrame : public ::std::unary_function< Reference< XController >, void >
{
void operator()( const Reference< XController >& _rxController ) const
@@ -1461,7 +1403,6 @@ struct DisposeControllerFrame : public ::std::unary_function< Reference< XContro
};
};
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_disposeControllerFrames_nothrow()
{
Controllers aCopy;
@@ -1469,7 +1410,6 @@ void ODatabaseDocument::impl_disposeControllerFrames_nothrow()
::std::for_each( aCopy.begin(), aCopy.end(), DisposeControllerFrame() );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::close( sal_Bool _bDeliverOwnership ) throw (CloseVetoException, RuntimeException)
{
// nearly everything below can/must be done without our mutex locked, the below is just for
@@ -1509,32 +1449,31 @@ void SAL_CALL ODatabaseDocument::close( sal_Bool _bDeliverOwnership ) throw (Clo
m_bClosing = false;
// <- SYNCHRONIZED
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseDocument::addCloseListener( const Reference< ::com::sun::star::util::XCloseListener >& Listener ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
m_aCloseListener.addInterface(Listener);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseDocument::removeCloseListener( const Reference< ::com::sun::star::util::XCloseListener >& Listener ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
m_aCloseListener.removeInterface(Listener);
}
-// -----------------------------------------------------------------------------
+
Reference< XNameAccess > SAL_CALL ODatabaseDocument::getFormDocuments( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodUsedDuringInit );
return impl_getDocumentContainer_throw( ODatabaseModelImpl::E_FORM );
}
-// -----------------------------------------------------------------------------
+
Reference< XNameAccess > SAL_CALL ODatabaseDocument::getReportDocuments( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodUsedDuringInit );
return impl_getDocumentContainer_throw( ODatabaseModelImpl::E_REPORT );
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::WriteThroughComponent( const Reference< XComponent >& xComponent, const sal_Char* pStreamName,
const sal_Char* pServiceName, const Sequence< Any >& _rArguments, const Sequence< PropertyValue >& rMediaDesc,
const Reference<XStorage>& _xStorageToSaveTo ) const
@@ -1603,7 +1542,6 @@ void ODatabaseDocument::WriteThroughComponent( const Reference< XOutputStream >&
xFilter->filter( rMediaDesc );
}
-// -----------------------------------------------------------------------------
void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _rxTargetStorage, const ::comphelper::NamedValueCollection& _rMediaDescriptor ) const
{
// extract status indicator
@@ -1666,7 +1604,6 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r
m_pImpl->storeLibraryContainersTo( _rxTargetStorage );
}
-// -----------------------------------------------------------------------------
Reference< XUIConfigurationManager > SAL_CALL ODatabaseDocument::getUIConfigurationManager( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -1704,7 +1641,7 @@ Reference< XUIConfigurationManager > SAL_CALL ODatabaseDocument::getUIConfigurat
return m_xUIConfigurationManager;
}
-// -----------------------------------------------------------------------------
+
Reference< XStorage > SAL_CALL ODatabaseDocument::getDocumentSubStorage( const ::rtl::OUString& aStorageName, sal_Int32 nMode ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -1712,14 +1649,13 @@ Reference< XStorage > SAL_CALL ODatabaseDocument::getDocumentSubStorage( const :
Reference< XDocumentSubStorageSupplier > xStorageAccess( m_pImpl->getDocumentSubStorageSupplier() );
return xStorageAccess->getDocumentSubStorage( aStorageName, nMode );
}
-// -----------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL ODatabaseDocument::getDocumentSubStoragesNames( ) throw (::com::sun::star::io::IOException, RuntimeException)
{
Reference< XDocumentSubStorageSupplier > xStorageAccess( m_pImpl->getDocumentSubStorageSupplier() );
return xStorageAccess->getDocumentSubStoragesNames();
}
-//------------------------------------------------------------------------------
void ODatabaseDocument::impl_notifyStorageChange_nolck_nothrow( const Reference< XStorage >& _rxNewRootStorage )
{
Reference< XInterface > xMe( *const_cast< ODatabaseDocument* >( this ) );
@@ -1728,7 +1664,6 @@ void ODatabaseDocument::impl_notifyStorageChange_nolck_nothrow( const Reference<
boost::bind( &XStorageChangeListener::notifyStorageChange, _1, boost::cref( xMe ), boost::cref( _rxNewRootStorage ) ) );
}
-//------------------------------------------------------------------------------
void ODatabaseDocument::disposing()
{
OSL_TRACE( "DD: disp: %p: %p", this, m_pImpl.get() );
@@ -1800,42 +1735,39 @@ void ODatabaseDocument::disposing()
aKeepAlive.clear();
}
-// -----------------------------------------------------------------------------
+
// XComponent
void SAL_CALL ODatabaseDocument::dispose( ) throw (RuntimeException)
{
::cppu::WeakComponentImplHelperBase::dispose();
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseDocument::addEventListener( const Reference< lang::XEventListener >& _xListener ) throw (RuntimeException)
{
::cppu::WeakComponentImplHelperBase::addEventListener( _xListener );
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseDocument::removeEventListener( const Reference< lang::XEventListener >& _xListener ) throw (RuntimeException)
{
::cppu::WeakComponentImplHelperBase::removeEventListener( _xListener );
}
+
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString ODatabaseDocument::getImplementationName( ) throw(RuntimeException)
{
return getImplementationName_static();
}
-//------------------------------------------------------------------------------
rtl::OUString ODatabaseDocument::getImplementationName_static( ) throw(RuntimeException)
{
return rtl::OUString::createFromAscii("com.sun.star.comp.dba.ODatabaseDocument");
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > ODatabaseDocument::getSupportedServiceNames( ) throw (RuntimeException)
{
return getSupportedServiceNames_static();
}
-//------------------------------------------------------------------------------
Reference< XInterface > ODatabaseDocument::Create( const Reference< XComponentContext >& _rxContext )
{
::comphelper::ComponentContext aContext( _rxContext );
@@ -1847,7 +1779,6 @@ Reference< XInterface > ODatabaseDocument::Create( const Reference< XComponentCo
return xModel.get();
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > ODatabaseDocument::getSupportedServiceNames_static( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 2 );
@@ -1856,19 +1787,17 @@ Sequence< ::rtl::OUString > ODatabaseDocument::getSupportedServiceNames_static(
return aSNS;
}
-//------------------------------------------------------------------------------
sal_Bool ODatabaseDocument::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
-// -----------------------------------------------------------------------------
+
Reference< XDataSource > SAL_CALL ODatabaseDocument::getDataSource() throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodWithoutInit );
return m_pImpl->getOrCreateDataSource();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::loadFromStorage( const Reference< XStorage >& /*xStorage*/, const Sequence< PropertyValue >& /*aMediaDescriptor*/ ) throw (IllegalArgumentException, DoubleInitializationException, IOException, Exception, RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -1879,14 +1808,12 @@ void SAL_CALL ODatabaseDocument::loadFromStorage( const Reference< XStorage >& /
);
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::storeToStorage( const Reference< XStorage >& _rxStorage, const Sequence< PropertyValue >& _rMediaDescriptor ) throw (IllegalArgumentException, IOException, Exception, RuntimeException)
{
DocumentGuard aGuard( *this );
impl_storeToStorage_throw( _rxStorage, _rMediaDescriptor, aGuard );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::switchToStorage( const Reference< XStorage >& _rxNewRootStorage ) throw (IllegalArgumentException, IOException, Exception, RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -1897,56 +1824,48 @@ void SAL_CALL ODatabaseDocument::switchToStorage( const Reference< XStorage >& _
impl_notifyStorageChange_nolck_nothrow( xNewRootStorage );
}
-// -----------------------------------------------------------------------------
Reference< XStorage > SAL_CALL ODatabaseDocument::getDocumentStorage( ) throw (IOException, Exception, RuntimeException)
{
DocumentGuard aGuard( *this );
return m_pImpl->getOrCreateRootStorage();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::addStorageChangeListener( const Reference< XStorageChangeListener >& _Listener ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
m_aStorageListeners.addInterface( _Listener );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::removeStorageChangeListener( const Reference< XStorageChangeListener >& _Listener ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
m_aStorageListeners.addInterface( _Listener );
}
-// -----------------------------------------------------------------------------
Reference< XStorageBasedLibraryContainer > SAL_CALL ODatabaseDocument::getBasicLibraries() throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodUsedDuringInit );
return m_pImpl->getLibraryContainer( true );
}
-// -----------------------------------------------------------------------------
Reference< XStorageBasedLibraryContainer > SAL_CALL ODatabaseDocument::getDialogLibraries() throw (RuntimeException)
{
DocumentGuard aGuard( *this );
return m_pImpl->getLibraryContainer( false );
}
-// -----------------------------------------------------------------------------
::sal_Bool SAL_CALL ODatabaseDocument::getAllowMacroExecution() throw (RuntimeException)
{
DocumentGuard aGuard( *this );
return m_pImpl->adjustMacroMode_AutoReject();
}
-// -----------------------------------------------------------------------------
Reference< XEmbeddedScripts > SAL_CALL ODatabaseDocument::getScriptContainer() throw (RuntimeException)
{
DocumentGuard aGuard( *this );
return this;
}
-// -----------------------------------------------------------------------------
Reference< provider::XScriptProvider > SAL_CALL ODatabaseDocument::getScriptProvider( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this );
@@ -1968,26 +1887,23 @@ Reference< provider::XScriptProvider > SAL_CALL ODatabaseDocument::getScriptProv
return xScriptProvider;
}
-// -----------------------------------------------------------------------------
Reference< XNameReplace > SAL_CALL ODatabaseDocument::getEvents( ) throw (RuntimeException)
{
DocumentGuard aGuard( *this, DocumentGuard::MethodUsedDuringInit );
return m_pEventContainer;
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseDocument::disposing( const ::com::sun::star::lang::EventObject& Source ) throw(RuntimeException)
{
if ( m_pImpl.is() )
m_pImpl->disposing(Source);
}
-//------------------------------------------------------------------
Reference< XInterface > ODatabaseDocument::getThis() const
{
return *const_cast< ODatabaseDocument* >( this );
}
-// -----------------------------------------------------------------------------
+
struct CreateAny : public ::std::unary_function< Reference<XController>, Any>
{
Any operator() (const Reference<XController>& lhs) const
@@ -2004,14 +1920,14 @@ Reference< XEnumeration > SAL_CALL ODatabaseDocument::getControllers( ) throw (
::std::transform( m_aControllers.begin(), m_aControllers.end(), aController.getArray(), CreateAny() );
return new ::comphelper::OAnyEnumeration(aController);
}
-// -----------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL ODatabaseDocument::getAvailableViewControllerNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aNames(1);
aNames[0] = SERVICE_SDB_APPLICATIONCONTROLLER;
return aNames;
}
-// -----------------------------------------------------------------------------
+
Reference< XController2 > SAL_CALL ODatabaseDocument::createDefaultViewController( const Reference< XFrame >& _Frame ) throw (IllegalArgumentException, Exception, RuntimeException)
{
return createViewController(
@@ -2021,7 +1937,6 @@ Reference< XController2 > SAL_CALL ODatabaseDocument::createDefaultViewControlle
);
}
-// -----------------------------------------------------------------------------
Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( const ::rtl::OUString& _ViewName, const Sequence< PropertyValue >& _Arguments, const Reference< XFrame >& _Frame ) throw (IllegalArgumentException, Exception, RuntimeException)
{
if ( !_ViewName.equalsAscii( "Default" ) && !_ViewName.equalsAscii( "Preview" ) )
@@ -2046,8 +1961,6 @@ Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( cons
return xController;
}
-// -----------------------------------------------------------------------------
-//=============================================================================
Reference< XTitle > ODatabaseDocument::impl_getTitleHelper_throw()
{
if ( ! m_xTitleHelper.is ())
@@ -2066,7 +1979,6 @@ Reference< XTitle > ODatabaseDocument::impl_getTitleHelper_throw()
return m_xTitleHelper;
}
-//=============================================================================
uno::Reference< frame::XUntitledNumbers > ODatabaseDocument::impl_getUntitledHelper_throw(const uno::Reference< uno::XInterface >& _xComponent)
{
if ( !m_xModuleManager.is() )
@@ -2101,7 +2013,6 @@ uno::Reference< frame::XUntitledNumbers > ODatabaseDocument::impl_getUntitledHel
return xNumberedControllers;
}
-//=============================================================================
// css.frame.XTitle
::rtl::OUString SAL_CALL ODatabaseDocument::getTitle()
throw (uno::RuntimeException)
@@ -2111,7 +2022,6 @@ uno::Reference< frame::XUntitledNumbers > ODatabaseDocument::impl_getUntitledHel
return impl_getTitleHelper_throw()->getTitle();
}
-//=============================================================================
// css.frame.XTitle
void SAL_CALL ODatabaseDocument::setTitle( const ::rtl::OUString& sTitle )
throw (uno::RuntimeException)
@@ -2123,7 +2033,6 @@ void SAL_CALL ODatabaseDocument::setTitle( const ::rtl::OUString& sTitle )
// <- SYNCHRONIZED
}
-//=============================================================================
// css.frame.XTitleChangeBroadcaster
void SAL_CALL ODatabaseDocument::addTitleChangeListener( const uno::Reference< frame::XTitleChangeListener >& xListener )
throw (uno::RuntimeException)
@@ -2135,7 +2044,6 @@ void SAL_CALL ODatabaseDocument::addTitleChangeListener( const uno::Reference< f
xBroadcaster->addTitleChangeListener( xListener );
}
-//=============================================================================
// css.frame.XTitleChangeBroadcaster
void SAL_CALL ODatabaseDocument::removeTitleChangeListener( const uno::Reference< frame::XTitleChangeListener >& xListener )
throw (uno::RuntimeException)
@@ -2147,7 +2055,6 @@ void SAL_CALL ODatabaseDocument::removeTitleChangeListener( const uno::Reference
xBroadcaster->removeTitleChangeListener( xListener );
}
-//=============================================================================
// css.frame.XUntitledNumbers
::sal_Int32 SAL_CALL ODatabaseDocument::leaseNumber( const uno::Reference< uno::XInterface >& xComponent )
throw (lang::IllegalArgumentException,
@@ -2157,7 +2064,6 @@ void SAL_CALL ODatabaseDocument::removeTitleChangeListener( const uno::Reference
return impl_getUntitledHelper_throw(xComponent)->leaseNumber (xComponent);
}
-//=============================================================================
// css.frame.XUntitledNumbers
void SAL_CALL ODatabaseDocument::releaseNumber( ::sal_Int32 nNumber )
throw (lang::IllegalArgumentException,
@@ -2167,7 +2073,6 @@ void SAL_CALL ODatabaseDocument::releaseNumber( ::sal_Int32 nNumber )
impl_getUntitledHelper_throw()->releaseNumber (nNumber);
}
-//=============================================================================
// css.frame.XUntitledNumbers
void SAL_CALL ODatabaseDocument::releaseNumberForComponent( const uno::Reference< uno::XInterface >& xComponent )
throw (lang::IllegalArgumentException,
@@ -2177,17 +2082,11 @@ void SAL_CALL ODatabaseDocument::releaseNumberForComponent( const uno::Reference
impl_getUntitledHelper_throw(xComponent)->releaseNumberForComponent (xComponent);
}
-//=============================================================================
// css.frame.XUntitledNumbers
::rtl::OUString SAL_CALL ODatabaseDocument::getUntitledPrefix() throw (uno::RuntimeException)
{
return ::rtl::OUString();/*RTL_CONSTASCII_USTRINGPARAM(" : "));*/
}
-//------------------------------------------------------------------
-//........................................................................
} // 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 a299d984e..9bbeca952 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.hxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -371,12 +371,12 @@ public:
// XEventBroadcaster
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
-
+
// XDocumentEventBroadcaster
virtual void SAL_CALL addDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL notifyDocumentEvent( const ::rtl::OUString& _EventName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& _ViewController, const ::com::sun::star::uno::Any& _Supplement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
-
+
// XPrintable
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getPrinter( ) throw (::com::sun::star::uno::RuntimeException) ;
virtual void SAL_CALL setPrinter( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aPrinter ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException) ;
@@ -620,7 +620,6 @@ private:
denotes additional document parameters
@param _rDocGuard
is the guard which currently protects the document instance
-
*/
sal_Bool impl_attachResource(
const ::rtl::OUString& i_rLogicalDocumentURL,
@@ -703,7 +702,5 @@ private:
const ODatabaseDocument& m_document;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_COREDATAACCESS_DATABASEDOCUMENT_HXX_
diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.cxx b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
index 8b3741b00..83b6d482b 100644
--- a/dbaccess/source/core/dataaccess/databaseregistrations.cxx
+++ b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
@@ -1,7 +1,7 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,11 +41,8 @@
#include <tools/urlobj.hxx>
#include <unotools/confignode.hxx>
-//........................................................................
namespace dbaccess
{
-//........................................................................
-
/** === begin UNO using === **/
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::XInterface;
@@ -68,21 +65,18 @@ namespace dbaccess
using ::com::sun::star::uno::XAggregation;
/** === end UNO using === **/
- //--------------------------------------------------------------------
static const ::rtl::OUString& getConfigurationRootPath()
{
static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii("org.openoffice.Office.DataAccess/RegisteredNames");
return s_sNodeName;
}
- //--------------------------------------------------------------------
const ::rtl::OUString& getLocationNodeName()
{
static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii( "Location" );
return s_sNodeName;
}
- //--------------------------------------------------------------------
const ::rtl::OUString& getNameNodeName()
{
static ::rtl::OUString s_sNodeName = ::rtl::OUString::createFromAscii( "Name" );
@@ -151,7 +145,6 @@ namespace dbaccess
//====================================================================
//= DatabaseRegistrations - implementation
//====================================================================
- //--------------------------------------------------------------------
DatabaseRegistrations::DatabaseRegistrations( const ::comphelper::ComponentContext& _rxContext )
:m_aContext( _rxContext )
,m_aConfigurationRoot()
@@ -161,12 +154,10 @@ namespace dbaccess
m_aContext.getLegacyServiceFactory(), getConfigurationRootPath(), -1, ::utl::OConfigurationTreeRoot::CM_UPDATABLE );
}
- //--------------------------------------------------------------------
DatabaseRegistrations::~DatabaseRegistrations()
{
}
- //--------------------------------------------------------------------
::utl::OConfigurationNode DatabaseRegistrations::impl_getNodeForName_nothrow( const ::rtl::OUString& _rName )
{
Sequence< ::rtl::OUString > aNames( m_aConfigurationRoot.getNodeNames() );
@@ -185,7 +176,6 @@ namespace dbaccess
return ::utl::OConfigurationNode();
}
- //--------------------------------------------------------------------
::utl::OConfigurationNode DatabaseRegistrations::impl_getNodeForName_throw( const ::rtl::OUString& _rName, const bool _bMustExist )
{
::utl::OConfigurationNode aNodeForName( impl_getNodeForName_nothrow( _rName ) );
@@ -211,7 +201,7 @@ namespace dbaccess
::rtl::OUStringBuffer aReset( aNewNodeName );
sNewNodeName = aNewNodeName.makeStringAndClear();
sal_Int32 i=2;
- while ( m_aConfigurationRoot.hasByName( sNewNodeName ) )
+ while ( m_aConfigurationRoot.hasByName( sNewNodeName ) )
{
aNewNodeName = aReset;
aNewNodeName.appendAscii( " " );
@@ -225,7 +215,6 @@ namespace dbaccess
return aNewNode;
}
- //--------------------------------------------------------------------
::utl::OConfigurationNode DatabaseRegistrations::impl_checkValidName_throw( const ::rtl::OUString& _rName, const bool _bMustExist )
{
if ( !m_aConfigurationRoot.isValid() )
@@ -237,7 +226,6 @@ namespace dbaccess
return impl_getNodeForName_throw( _rName, _bMustExist );
}
- //--------------------------------------------------------------------
void DatabaseRegistrations::impl_checkValidLocation_throw( const ::rtl::OUString& _rLocation )
{
if ( !_rLocation.getLength() )
@@ -248,15 +236,13 @@ namespace dbaccess
throw IllegalArgumentException( ::rtl::OUString(), *this, 2 );
}
- //--------------------------------------------------------------------
::sal_Bool SAL_CALL DatabaseRegistrations::hasRegisteredDatabase( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
::utl::OConfigurationNode aNodeForName = impl_getNodeForName_nothrow( _Name );
return aNodeForName.isValid();
}
-
- //------------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL DatabaseRegistrations::getRegistrationNames() throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -274,13 +260,11 @@ namespace dbaccess
{
::utl::OConfigurationNode aRegistrationNode = m_aConfigurationRoot.openNode( *pName );
OSL_VERIFY( aRegistrationNode.getNodeValue( getNameNodeName() ) >>= *pDisplayName );
-
}
return aDisplayNames;
}
- //--------------------------------------------------------------------
::rtl::OUString SAL_CALL DatabaseRegistrations::getDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -293,8 +277,7 @@ namespace dbaccess
return sLocation;
}
-
- //--------------------------------------------------------------------
+
void SAL_CALL DatabaseRegistrations::registerDatabaseLocation( const ::rtl::OUString& _Name, const ::rtl::OUString& _Location ) throw (IllegalArgumentException, ElementExistException, RuntimeException)
{
::osl::ClearableMutexGuard aGuard( m_aMutex );
@@ -312,8 +295,7 @@ namespace dbaccess
aGuard.clear();
m_aRegistrationListeners.notifyEach( &XDatabaseRegistrationsListener::registeredDatabaseLocation, aEvent );
}
-
- //--------------------------------------------------------------------
+
void SAL_CALL DatabaseRegistrations::revokeDatabaseLocation( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException)
{
::osl::ClearableMutexGuard aGuard( m_aMutex );
@@ -338,8 +320,7 @@ namespace dbaccess
aGuard.clear();
m_aRegistrationListeners.notifyEach( &XDatabaseRegistrationsListener::revokedDatabaseLocation, aEvent );
}
-
- //--------------------------------------------------------------------
+
void SAL_CALL DatabaseRegistrations::changeDatabaseLocation( const ::rtl::OUString& _Name, const ::rtl::OUString& _NewLocation ) throw (IllegalArgumentException, NoSuchElementException, IllegalAccessException, RuntimeException)
{
::osl::ClearableMutexGuard aGuard( m_aMutex );
@@ -365,7 +346,6 @@ namespace dbaccess
m_aRegistrationListeners.notifyEach( &XDatabaseRegistrationsListener::changedDatabaseLocation, aEvent );
}
- //--------------------------------------------------------------------
::sal_Bool SAL_CALL DatabaseRegistrations::isDatabaseRegistrationReadOnly( const ::rtl::OUString& _Name ) throw (IllegalArgumentException, NoSuchElementException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -373,14 +353,12 @@ namespace dbaccess
return aDataSourceRegistration.isReadonly();
}
- //--------------------------------------------------------------------
void SAL_CALL DatabaseRegistrations::addDatabaseRegistrationsListener( const Reference< XDatabaseRegistrationsListener >& _Listener ) throw (RuntimeException)
{
if ( _Listener.is() )
m_aRegistrationListeners.addInterface( _Listener );
}
- //--------------------------------------------------------------------
void SAL_CALL DatabaseRegistrations::removeDatabaseRegistrationsListener( const Reference< XDatabaseRegistrationsListener >& _Listener ) throw (RuntimeException)
{
if ( _Listener.is() )
@@ -395,8 +373,5 @@ namespace dbaccess
return new DatabaseRegistrations( _rxContext );
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.hxx b/dbaccess/source/core/dataaccess/databaseregistrations.hxx
index 927f484b7..cdfcc5141 100644
--- a/dbaccess/source/core/dataaccess/databaseregistrations.hxx
+++ b/dbaccess/source/core/dataaccess/databaseregistrations.hxx
@@ -1,6 +1,6 @@
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,16 +36,12 @@ namespace comphelper
class ComponentContext;
}
-//........................................................................
namespace dbaccess
{
-//........................................................................
::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation >
createDataSourceRegistrations( const ::comphelper::ComponentContext& _rxContext );
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // OOO_DATASOURCEREGISTRATIONS_HXX
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 53f93d9b5..1c09997b4 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -103,10 +103,8 @@ using namespace ::dbtools;
using namespace ::comphelper;
namespace css = ::com::sun::star;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//============================================================
//= FlushNotificationAdapter
@@ -172,7 +170,6 @@ FlushNotificationAdapter::~FlushNotificationAdapter()
DBG_DTOR( FlushNotificationAdapter, NULL );
}
-//--------------------------------------------------------------------
void SAL_CALL FlushNotificationAdapter::impl_dispose( bool _bRevokeListener )
{
Reference< XFlushListener > xKeepAlive( this );
@@ -188,7 +185,6 @@ void SAL_CALL FlushNotificationAdapter::impl_dispose( bool _bRevokeListener )
m_aBroadcaster = Reference< XFlushable >();
}
-//--------------------------------------------------------------------
void SAL_CALL FlushNotificationAdapter::flushed( const EventObject& rEvent ) throw (RuntimeException)
{
Reference< XFlushListener > xListener( m_aListener );
@@ -198,7 +194,6 @@ void SAL_CALL FlushNotificationAdapter::flushed( const EventObject& rEvent ) thr
impl_dispose( true );
}
-//--------------------------------------------------------------------
void SAL_CALL FlushNotificationAdapter::disposing( const EventObject& Source ) throw (RuntimeException)
{
Reference< XFlushListener > xListener( m_aListener );
@@ -208,26 +203,22 @@ void SAL_CALL FlushNotificationAdapter::disposing( const EventObject& Source ) t
impl_dispose( false );
}
-//--------------------------------------------------------------------------
OAuthenticationContinuation::OAuthenticationContinuation()
:m_bRemberPassword(sal_True), // TODO: a meaningfull default
m_bCanSetUserName(sal_True)
{
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OAuthenticationContinuation::canSetRealm( ) throw(RuntimeException)
{
return sal_False;
}
-//--------------------------------------------------------------------------
void SAL_CALL OAuthenticationContinuation::setRealm( const ::rtl::OUString& /*Realm*/ ) throw(RuntimeException)
{
DBG_ERROR("OAuthenticationContinuation::setRealm: not supported!");
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OAuthenticationContinuation::canSetUserName( ) throw(RuntimeException)
{
// we alwas allow this, even if the database document is read-only. In this case,
@@ -235,25 +226,21 @@ sal_Bool SAL_CALL OAuthenticationContinuation::canSetUserName( ) throw(RuntimeE
return m_bCanSetUserName;
}
-//--------------------------------------------------------------------------
void SAL_CALL OAuthenticationContinuation::setUserName( const ::rtl::OUString& _rUser ) throw(RuntimeException)
{
m_sUser = _rUser;
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OAuthenticationContinuation::canSetPassword( ) throw(RuntimeException)
{
return sal_True;
}
-//--------------------------------------------------------------------------
void SAL_CALL OAuthenticationContinuation::setPassword( const ::rtl::OUString& _rPassword ) throw(RuntimeException)
{
m_sPassword = _rPassword;
}
-//--------------------------------------------------------------------------
Sequence< RememberAuthentication > SAL_CALL OAuthenticationContinuation::getRememberPasswordModes( RememberAuthentication& _reDefault ) throw(RuntimeException)
{
Sequence< RememberAuthentication > aReturn(1);
@@ -261,25 +248,21 @@ Sequence< RememberAuthentication > SAL_CALL OAuthenticationContinuation::getReme
return aReturn;
}
-//--------------------------------------------------------------------------
void SAL_CALL OAuthenticationContinuation::setRememberPassword( RememberAuthentication _eRemember ) throw(RuntimeException)
{
m_bRemberPassword = (RememberAuthentication_NO != _eRemember);
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL OAuthenticationContinuation::canSetAccount( ) throw(RuntimeException)
{
return sal_False;
}
-//--------------------------------------------------------------------------
void SAL_CALL OAuthenticationContinuation::setAccount( const ::rtl::OUString& ) throw(RuntimeException)
{
DBG_ERROR("OAuthenticationContinuation::setAccount: not supported!");
}
-//--------------------------------------------------------------------------
Sequence< RememberAuthentication > SAL_CALL OAuthenticationContinuation::getRememberAccountModes( RememberAuthentication& _reDefault ) throw(RuntimeException)
{
Sequence < RememberAuthentication > aReturn(1);
@@ -288,7 +271,6 @@ Sequence< RememberAuthentication > SAL_CALL OAuthenticationContinuation::getReme
return aReturn;
}
-//--------------------------------------------------------------------------
void SAL_CALL OAuthenticationContinuation::setRememberAccount( RememberAuthentication /*Remember*/ ) throw(RuntimeException)
{
DBG_ERROR("OAuthenticationContinuation::setRememberAccount: not supported!");
@@ -440,10 +422,8 @@ void OSharedConnectionManager::addEventListener(const Reference<XConnection>& _r
osl_incrementInterlockedCount(&_rIter->second.nALiveCount);
}
-//----------------------------------------------------------------------
namespace
{
- //------------------------------------------------------------------
Sequence< PropertyValue > lcl_filterDriverProperties( const Reference< XDriver >& _xDriver, const ::rtl::OUString& _sUrl,
const Sequence< PropertyValue >& _rDataSourceSettings, const AsciiPropertyValue* _pKnownSettings )
{
@@ -485,15 +465,13 @@ namespace
}
}
if ( !aRet.empty() )
- return Sequence< PropertyValue >(&(*aRet.begin()),aRet.size());
+ return Sequence< PropertyValue >(&(*aRet.begin()),aRet.size());
}
return Sequence< PropertyValue >();
}
- //------------------------------------------------------------------
typedef ::std::map< ::rtl::OUString, sal_Int32 > PropertyAttributeCache;
- //------------------------------------------------------------------
struct IsDefaultAndNotRemoveable : public ::std::unary_function< PropertyValue, bool >
{
private:
@@ -522,13 +500,12 @@ namespace
//= ODatabaseContext
//============================================================
DBG_NAME(ODatabaseSource)
-//--------------------------------------------------------------------------
+
extern "C" void SAL_CALL createRegistryInfo_ODatabaseSource()
{
static ::dba::OAutoRegistration< ODatabaseSource > aAutoRegistration;
}
-//--------------------------------------------------------------------------
ODatabaseSource::ODatabaseSource(const ::rtl::Reference<ODatabaseModelImpl>& _pImpl)
:ModelDependentComponent( _pImpl )
,ODatabaseSource_Base( getMutex() )
@@ -541,7 +518,6 @@ ODatabaseSource::ODatabaseSource(const ::rtl::Reference<ODatabaseModelImpl>& _pI
OSL_TRACE( "DS: ctor: %p: %p", this, m_pImpl.get() );
}
-//--------------------------------------------------------------------------
ODatabaseSource::~ODatabaseSource()
{
OSL_TRACE( "DS: dtor: %p: %p", this, m_pImpl.get() );
@@ -553,7 +529,6 @@ ODatabaseSource::~ODatabaseSource()
}
}
-//--------------------------------------------------------------------------
void ODatabaseSource::setName( const Reference< XDocumentDataSource >& _rxDocument, const ::rtl::OUString& _rNewName, DBContextAccess )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::setName" );
@@ -565,7 +540,6 @@ void ODatabaseSource::setName( const Reference< XDocumentDataSource >& _rxDocume
}
// com::sun::star::lang::XTypeProvider
-//--------------------------------------------------------------------------
Sequence< Type > ODatabaseSource::getTypes() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getTypes" );
@@ -579,7 +553,6 @@ Sequence< Type > ODatabaseSource::getTypes() throw (RuntimeException)
);
}
-//--------------------------------------------------------------------------
Sequence< sal_Int8 > ODatabaseSource::getImplementationId() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getImplementationId" );
@@ -597,55 +570,48 @@ Sequence< sal_Int8 > ODatabaseSource::getImplementationId() throw (RuntimeExcept
}
// com::sun::star::uno::XInterface
-//--------------------------------------------------------------------------
Any ODatabaseSource::queryInterface( const Type & rType ) throw (RuntimeException)
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::queryInterface" );
Any aIface = ODatabaseSource_Base::queryInterface( rType );
if ( !aIface.hasValue() )
aIface = ::cppu::OPropertySetHelper::queryInterface( rType );
return aIface;
}
-//--------------------------------------------------------------------------
void ODatabaseSource::acquire() throw ()
{
ODatabaseSource_Base::acquire();
}
-//--------------------------------------------------------------------------
void ODatabaseSource::release() throw ()
{
ODatabaseSource_Base::release();
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseSource::disposing( const ::com::sun::star::lang::EventObject& Source ) throw(RuntimeException)
{
if ( m_pImpl.is() )
m_pImpl->disposing(Source);
}
// XServiceInfo
-//------------------------------------------------------------------------------
rtl::OUString ODatabaseSource::getImplementationName( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getImplementationName" );
return getImplementationName_static();
}
-//------------------------------------------------------------------------------
rtl::OUString ODatabaseSource::getImplementationName_static( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getImplementationName_static" );
return rtl::OUString::createFromAscii("com.sun.star.comp.dba.ODatabaseSource");
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > ODatabaseSource::getSupportedServiceNames( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getSupportedServiceNames" );
return getSupportedServiceNames_static();
}
-//------------------------------------------------------------------------------
+
Reference< XInterface > ODatabaseSource::Create( const Reference< XComponentContext >& _rxContext )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::Create" );
@@ -654,7 +620,6 @@ Reference< XInterface > ODatabaseSource::Create( const Reference< XComponentCont
return xDBContext->createInstance();
}
-//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > ODatabaseSource::getSupportedServiceNames_static( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getSupportedServiceNames_static" );
@@ -664,14 +629,13 @@ Sequence< ::rtl::OUString > ODatabaseSource::getSupportedServiceNames_static( )
return aSNS;
}
-//------------------------------------------------------------------------------
sal_Bool ODatabaseSource::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::supportsService" );
return ::comphelper::findValue(getSupportedServiceNames(), _rServiceName, sal_True).getLength() != 0;
}
+
// OComponentHelper
-//------------------------------------------------------------------------------
void ODatabaseSource::disposing()
{
OSL_TRACE( "DS: disp: %p, %p", this, m_pImpl.get() );
@@ -685,7 +649,7 @@ void ODatabaseSource::disposing()
ODatabaseDocument::clearObjectContainer(m_pImpl->m_xTableDefinitions);
m_pImpl.clear();
}
-//------------------------------------------------------------------------------
+
Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const ::rtl::OUString& _rUid, const ::rtl::OUString& _rPwd)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::buildLowLevelConnection" );
@@ -796,7 +760,6 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const ::rtl::O
}
// OPropertySetHelper
-//------------------------------------------------------------------------------
Reference< XPropertySetInfo > ODatabaseSource::getPropertySetInfo() throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getPropertySetInfo" );
@@ -804,7 +767,6 @@ Reference< XPropertySetInfo > ODatabaseSource::getPropertySetInfo() throw (Runt
}
// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* ODatabaseSource::createArrayHelper( ) const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::createArrayHelper" );
@@ -826,16 +788,13 @@ Reference< XPropertySetInfo > ODatabaseSource::getPropertySetInfo() throw (Runt
}
// cppu::OPropertySetHelper
-//------------------------------------------------------------------------------
::cppu::IPropertyArrayHelper& ODatabaseSource::getInfoHelper()
{
return *getArrayHelper();
}
-//------------------------------------------------------------------------------
sal_Bool ODatabaseSource::convertFastPropertyValue(Any & rConvertedValue, Any & rOldValue, sal_Int32 nHandle, const Any& rValue ) throw( IllegalArgumentException )
{
- //RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::convertFastPropertyValue" );
sal_Bool bModified(sal_False);
if ( m_pImpl.is() )
{
@@ -907,7 +866,6 @@ sal_Bool ODatabaseSource::convertFastPropertyValue(Any & rConvertedValue, Any &
return bModified;
}
-//------------------------------------------------------------------------------
namespace
{
struct SelectPropertyName : public ::std::unary_function< PropertyValue, ::rtl::OUString >
@@ -980,7 +938,6 @@ namespace
}
}
-//------------------------------------------------------------------------------
void ODatabaseSource::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue ) throw (Exception)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::setFastPropertyValue_NoBroadcast" );
@@ -1026,7 +983,6 @@ void ODatabaseSource::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const
}
}
-//------------------------------------------------------------------------------
void ODatabaseSource::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
{
//RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getFastPropertyValue" );
@@ -1115,7 +1071,6 @@ void ODatabaseSource::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) con
}
// XDataSource
-//------------------------------------------------------------------------------
void ODatabaseSource::setLoginTimeout(sal_Int32 seconds) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::setLoginTimeout" );
@@ -1123,7 +1078,6 @@ void ODatabaseSource::setLoginTimeout(sal_Int32 seconds) throw( SQLException, Ru
m_pImpl->m_nLoginTimeout = seconds;
}
-//------------------------------------------------------------------------------
sal_Int32 ODatabaseSource::getLoginTimeout(void) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getLoginTimeout" );
@@ -1131,33 +1085,31 @@ sal_Int32 ODatabaseSource::getLoginTimeout(void) throw( SQLException, RuntimeExc
return m_pImpl->m_nLoginTimeout;
}
-
// XCompletedConnection
-//------------------------------------------------------------------------------
Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const Reference< XInteractionHandler >& _rxHandler ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::connectWithCompletion" );
return connectWithCompletion(_rxHandler,sal_False);
}
-// -----------------------------------------------------------------------------
+
Reference< XConnection > ODatabaseSource::getConnection(const rtl::OUString& user, const rtl::OUString& password) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getConnection" );
return getConnection(user,password,sal_False);
}
-// -----------------------------------------------------------------------------
+
Reference< XConnection > SAL_CALL ODatabaseSource::getIsolatedConnection( const ::rtl::OUString& user, const ::rtl::OUString& password ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getIsolatedConnection" );
return getConnection(user,password,sal_True);
}
-// -----------------------------------------------------------------------------
+
Reference< XConnection > SAL_CALL ODatabaseSource::getIsolatedConnectionWithCompletion( const Reference< XInteractionHandler >& _rxHandler ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getIsolatedConnectionWithCompletion" );
return connectWithCompletion(_rxHandler,sal_True);
}
-// -----------------------------------------------------------------------------
+
Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const Reference< XInteractionHandler >& _rxHandler,sal_Bool _bIsolated ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::connectWithCompletion" );
@@ -1245,7 +1197,6 @@ Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const
}
}
-// -----------------------------------------------------------------------------
Reference< XConnection > ODatabaseSource::buildIsolatedConnection(const rtl::OUString& user, const rtl::OUString& password)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::buildIsolatedConnection" );
@@ -1260,7 +1211,7 @@ Reference< XConnection > ODatabaseSource::buildIsolatedConnection(const rtl::OUS
}
return xConn;
}
-//------------------------------------------------------------------------------
+
Reference< XConnection > ODatabaseSource::getConnection(const rtl::OUString& user, const rtl::OUString& password,sal_Bool _bIsolated) throw( SQLException, RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getConnection" );
@@ -1293,7 +1244,6 @@ Reference< XConnection > ODatabaseSource::getConnection(const rtl::OUString& use
return xConn;
}
-//------------------------------------------------------------------------------
Reference< XNameAccess > SAL_CALL ODatabaseSource::getBookmarks( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getBookmarks" );
@@ -1301,7 +1251,6 @@ Reference< XNameAccess > SAL_CALL ODatabaseSource::getBookmarks( ) throw (Runti
return static_cast< XNameContainer* >(&m_aBookmarks);
}
-//------------------------------------------------------------------------------
Reference< XNameAccess > SAL_CALL ODatabaseSource::getQueryDefinitions( ) throw(RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getQueryDefinitions" );
@@ -1332,9 +1281,8 @@ Reference< XNameAccess > SAL_CALL ODatabaseSource::getQueryDefinitions( ) throw(
}
return xContainer;
}
-//------------------------------------------------------------------------------
+
// XTablesSupplier
-//------------------------------------------------------------------------------
Reference< XNameAccess > ODatabaseSource::getTables() throw( RuntimeException )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getTables" );
@@ -1349,7 +1297,7 @@ Reference< XNameAccess > ODatabaseSource::getTables() throw( RuntimeException )
}
return xContainer;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseSource::flush( ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::flush" );
@@ -1379,7 +1327,6 @@ void SAL_CALL ODatabaseSource::flush( ) throw (RuntimeException)
}
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseSource::flushed( const EventObject& /*rEvent*/ ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::flushed" );
@@ -1413,19 +1360,18 @@ void SAL_CALL ODatabaseSource::flushed( const EventObject& /*rEvent*/ ) throw (R
m_pImpl->setModified( bWasModified );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseSource::addFlushListener( const Reference< ::com::sun::star::util::XFlushListener >& _xListener ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::addFlushListener" );
m_aFlushListeners.addInterface(_xListener);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseSource::removeFlushListener( const Reference< ::com::sun::star::util::XFlushListener >& _xListener ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::removeFlushListener" );
m_aFlushListeners.removeInterface(_xListener);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseSource::elementInserted( const ContainerEvent& /*Event*/ ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::elementInserted" );
@@ -1433,7 +1379,7 @@ void SAL_CALL ODatabaseSource::elementInserted( const ContainerEvent& /*Event*/
if ( m_pImpl.is() )
m_pImpl->setModified(sal_True);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseSource::elementRemoved( const ContainerEvent& /*Event*/ ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::elementRemoved" );
@@ -1441,7 +1387,7 @@ void SAL_CALL ODatabaseSource::elementRemoved( const ContainerEvent& /*Event*/ )
if ( m_pImpl.is() )
m_pImpl->setModified(sal_True);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODatabaseSource::elementReplaced( const ContainerEvent& /*Event*/ ) throw (RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::elementReplaced" );
@@ -1449,7 +1395,7 @@ void SAL_CALL ODatabaseSource::elementReplaced( const ContainerEvent& /*Event*/
if ( m_pImpl.is() )
m_pImpl->setModified(sal_True);
}
-// -----------------------------------------------------------------------------
+
// XDocumentDataSource
Reference< XOfficeDatabaseDocument > SAL_CALL ODatabaseSource::getDatabaseDocument() throw (RuntimeException)
{
@@ -1462,16 +1408,12 @@ Reference< XOfficeDatabaseDocument > SAL_CALL ODatabaseSource::getDatabaseDocume
return Reference< XOfficeDatabaseDocument >( xModel, UNO_QUERY_THROW );
}
-// -----------------------------------------------------------------------------
+
Reference< XInterface > ODatabaseSource::getThis() const
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "ODatabaseSource::getThis" );
return *const_cast< ODatabaseSource* >( this );
}
-// -----------------------------------------------------------------------------
-//........................................................................
-} // namespace dbaccess
-//........................................................................
-
+} // 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 305cf584b..94c91fc59 100644
--- a/dbaccess/source/core/dataaccess/datasource.hxx
+++ b/dbaccess/source/core/dataaccess/datasource.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -61,10 +61,8 @@
#include <com/sun/star/sdb/XDocumentDataSource.hpp>
#include "ModelImpl.hxx"
-//........................................................................
namespace dbaccess
{
-//........................................................................
class OSharedConnectionManager;
class OChildCommitListen_Impl;
@@ -232,9 +230,7 @@ protected:
using ::cppu::OPropertySetHelper::getFastPropertyValue;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_COREDATAACCESS_DATALINK_HXX_
diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index 9d229988d..0efce9c4a 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -60,15 +60,12 @@ using namespace ::comphelper;
using namespace ::cppu;
using namespace ::com::sun::star::ucb;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= ODefinitionContainer_Impl
//==========================================================================
-//--------------------------------------------------------------------------
void ODefinitionContainer_Impl::erase( TContentPtr _pDefinition )
{
NamedDefinitions::iterator aPos = find( _pDefinition );
@@ -76,7 +73,6 @@ void ODefinitionContainer_Impl::erase( TContentPtr _pDefinition )
m_aDefinitions.erase( aPos );
}
-//--------------------------------------------------------------------------
ODefinitionContainer_Impl::const_iterator ODefinitionContainer_Impl::find( TContentPtr _pDefinition ) const
{
return ::std::find_if(
@@ -89,7 +85,6 @@ ODefinitionContainer_Impl::const_iterator ODefinitionContainer_Impl::find( TCont
);
}
-//--------------------------------------------------------------------------
ODefinitionContainer_Impl::iterator ODefinitionContainer_Impl::find( TContentPtr _pDefinition )
{
return ::std::find_if(
@@ -106,7 +101,7 @@ ODefinitionContainer_Impl::iterator ODefinitionContainer_Impl::find( TContentPtr
//= ODefinitionContainer
//==========================================================================
DBG_NAME(ODefinitionContainer)
-//--------------------------------------------------------------------------
+
ODefinitionContainer::ODefinitionContainer( const Reference< XMultiServiceFactory >& _xORB
, const Reference< XInterface >& _xParentContainer
, const TContentPtr& _pImpl
@@ -134,7 +129,6 @@ ODefinitionContainer::ODefinitionContainer( const Reference< XMultiServiceFact
DBG_CTOR(ODefinitionContainer, NULL);
}
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::disposing()
{
OContentHelper::disposing();
@@ -166,7 +160,6 @@ void SAL_CALL ODefinitionContainer::disposing()
m_aDocumentMap.clear();
}
-//--------------------------------------------------------------------------
ODefinitionContainer::~ODefinitionContainer()
{
DBG_DTOR(ODefinitionContainer, NULL);
@@ -175,12 +168,11 @@ ODefinitionContainer::~ODefinitionContainer()
IMPLEMENT_FORWARD_XINTERFACE2( ODefinitionContainer,OContentHelper,ODefinitionContainer_Base)
IMPLEMENT_TYPEPROVIDER2(ODefinitionContainer,OContentHelper,ODefinitionContainer_Base);
// XServiceInfo
-//--------------------------------------------------------------------------
::rtl::OUString SAL_CALL ODefinitionContainer::getImplementationName( ) throw(RuntimeException)
{
return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.ODefinitionContainer"));
}
-//--------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL ODefinitionContainer::getSupportedServiceNames( ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aReturn(2);
@@ -190,7 +182,6 @@ Sequence< ::rtl::OUString > SAL_CALL ODefinitionContainer::getSupportedServiceNa
}
// XNameContainer
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::insertByName( const ::rtl::OUString& _rName, const Any& aElement ) throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
{
ResettableMutexGuard aGuard(m_aMutex);
@@ -204,7 +195,6 @@ void SAL_CALL ODefinitionContainer::insertByName( const ::rtl::OUString& _rName,
notifyByName( aGuard, _rName, xNewElement, NULL, E_INSERTED, ContainerListemers );
}
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::removeByName( const ::rtl::OUString& _rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
{
ResettableMutexGuard aGuard(m_aMutex);
@@ -229,7 +219,6 @@ void SAL_CALL ODefinitionContainer::removeByName( const ::rtl::OUString& _rName
}
// XNameReplace
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::replaceByName( const ::rtl::OUString& _rName, const Any& aElement ) throw(IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
{
ResettableMutexGuard aGuard(m_aMutex);
@@ -249,7 +238,6 @@ void SAL_CALL ODefinitionContainer::replaceByName( const ::rtl::OUString& _rName
disposeComponent(xOldElement);
}
-// -----------------------------------------------------------------------------
namespace
{
typedef Reference< XVeto > ( SAL_CALL XContainerApproveListener::*ContainerApprovalMethod )( const ContainerEvent& );
@@ -288,7 +276,6 @@ namespace
};
}
-// -----------------------------------------------------------------------------
void ODefinitionContainer::notifyByName( ResettableMutexGuard& _rGuard, const ::rtl::OUString& _rName,
const Reference< XContent >& _xNewElement, const Reference< XContent >& _xOldElement,
ContainerOperation _eOperation, ListenerType _eType )
@@ -331,43 +318,36 @@ void ODefinitionContainer::notifyByName( ResettableMutexGuard& _rGuard, const ::
_rGuard.reset();
}
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::addContainerListener( const Reference< XContainerListener >& _rxListener ) throw(RuntimeException)
{
if (_rxListener.is())
m_aContainerListeners.addInterface(_rxListener);
}
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::removeContainerListener( const Reference< XContainerListener >& _rxListener ) throw(RuntimeException)
{
if (_rxListener.is())
m_aContainerListeners.removeInterface(_rxListener);
}
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::addContainerApproveListener( const Reference< XContainerApproveListener >& _Listener ) throw (RuntimeException)
{
if ( _Listener.is() )
m_aApproveListeners.addInterface( _Listener );
}
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::removeContainerApproveListener( const Reference< XContainerApproveListener >& _Listener ) throw (RuntimeException)
{
if ( _Listener.is() )
m_aApproveListeners.removeInterface( _Listener );
}
-
// XElementAccess
-//--------------------------------------------------------------------------
Type SAL_CALL ODefinitionContainer::getElementType( ) throw (RuntimeException)
{
return ::getCppuType( static_cast< Reference< XContent >* >(NULL) );
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL ODefinitionContainer::hasElements( ) throw (RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -375,14 +355,12 @@ sal_Bool SAL_CALL ODefinitionContainer::hasElements( ) throw (RuntimeException)
}
// XEnumerationAccess
-//--------------------------------------------------------------------------
Reference< XEnumeration > SAL_CALL ODefinitionContainer::createEnumeration( ) throw(RuntimeException)
{
MutexGuard aGuard(m_aMutex);
return new ::comphelper::OEnumerationByIndex(static_cast<XIndexAccess*>(this));
}
-//--------------------------------------------------------------------------
// XIndexAccess
sal_Int32 SAL_CALL ODefinitionContainer::getCount( ) throw(RuntimeException)
{
@@ -390,7 +368,6 @@ sal_Int32 SAL_CALL ODefinitionContainer::getCount( ) throw(RuntimeException)
return m_aDocuments.size();
}
-//--------------------------------------------------------------------------
Any SAL_CALL ODefinitionContainer::getByIndex( sal_Int32 _nIndex ) throw(IndexOutOfBoundsException, WrappedTargetException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -411,7 +388,6 @@ Any SAL_CALL ODefinitionContainer::getByIndex( sal_Int32 _nIndex ) throw(IndexOu
return makeAny(xProp);
}
-//--------------------------------------------------------------------------
Any SAL_CALL ODefinitionContainer::getByName( const ::rtl::OUString& _rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -419,7 +395,6 @@ Any SAL_CALL ODefinitionContainer::getByName( const ::rtl::OUString& _rName ) th
return makeAny( implGetByName( _rName, sal_True ) );
}
-//--------------------------------------------------------------------------
Reference< XContent > ODefinitionContainer::implGetByName(const ::rtl::OUString& _rName, sal_Bool _bReadIfNeccessary) throw (NoSuchElementException)
{
Documents::iterator aMapPos = m_aDocumentMap.find(_rName);
@@ -441,7 +416,6 @@ Reference< XContent > ODefinitionContainer::implGetByName(const ::rtl::OUString&
return xProp;
}
-//--------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL ODefinitionContainer::getElementNames( ) throw(RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -460,7 +434,6 @@ Sequence< ::rtl::OUString > SAL_CALL ODefinitionContainer::getElementNames( ) t
return aNames;
}
-//--------------------------------------------------------------------------
sal_Bool SAL_CALL ODefinitionContainer::hasByName( const ::rtl::OUString& _rName ) throw(RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -468,7 +441,6 @@ sal_Bool SAL_CALL ODefinitionContainer::hasByName( const ::rtl::OUString& _rName
return checkExistence(_rName);
}
-//--------------------------------------------------------------------------
void SAL_CALL ODefinitionContainer::disposing( const EventObject& _rSource ) throw(RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -487,7 +459,6 @@ void SAL_CALL ODefinitionContainer::disposing( const EventObject& _rSource ) thr
}
}
-//--------------------------------------------------------------------------
void ODefinitionContainer::implRemove(const ::rtl::OUString& _rName)
{
// from the object maps
@@ -503,7 +474,6 @@ void ODefinitionContainer::implRemove(const ::rtl::OUString& _rName)
}
}
-//--------------------------------------------------------------------------
namespace
{
bool lcl_ensureName( const Reference< XContent >& _rxContent, const ::rtl::OUString& _rName )
@@ -511,7 +481,6 @@ namespace
if ( !_rxContent.is() )
return true;
- // ..........................................................
// obtain the current name. If it's the same as the new one,
// don't do anything
try
@@ -530,7 +499,6 @@ namespace
OSL_ENSURE( sal_False, "lcl_ensureName: caught an exception while obtaining the current name!" );
}
- // ..........................................................
// set the new name
Reference< XRename > xRename( _rxContent, UNO_QUERY );
OSL_ENSURE( xRename.is(), "lcl_ensureName: invalid content (not renameable)!" );
@@ -548,7 +516,7 @@ namespace
return false;
}
}
-//--------------------------------------------------------------------------
+
void ODefinitionContainer::implAppend(const ::rtl::OUString& _rName, const Reference< XContent >& _rxNewObject)
{
MutexGuard aGuard(m_aMutex);
@@ -592,7 +560,6 @@ void ODefinitionContainer::implAppend(const ::rtl::OUString& _rName, const Refer
}
}
-//--------------------------------------------------------------------------
void ODefinitionContainer::implReplace(const ::rtl::OUString& _rName, const Reference< XContent >& _rxNewObject)
{
DBG_ASSERT(checkExistence(_rName), "ODefinitionContainer::implReplace : invalid name !");
@@ -603,7 +570,6 @@ void ODefinitionContainer::implReplace(const ::rtl::OUString& _rName, const Refe
addObjectListener(aFind->second);
}
-// -----------------------------------------------------------------------------
void ODefinitionContainer::approveNewObject(const ::rtl::OUString& _sName,const Reference< XContent >& _rxObject) const
{
// check the arguments
@@ -644,7 +610,6 @@ void ODefinitionContainer::approveNewObject(const ::rtl::OUString& _sName,const
*this );
}
-// -----------------------------------------------------------------------------
// XPropertyChangeListener
void SAL_CALL ODefinitionContainer::propertyChange( const PropertyChangeEvent& evt ) throw (RuntimeException)
{
@@ -670,7 +635,7 @@ void SAL_CALL ODefinitionContainer::propertyChange( const PropertyChangeEvent& e
m_bInPropertyChange = sal_False;
}
}
-// -----------------------------------------------------------------------------
+
// XVetoableChangeListener
void SAL_CALL ODefinitionContainer::vetoableChange( const PropertyChangeEvent& aEvent ) throw (PropertyVetoException, RuntimeException)
{
@@ -684,7 +649,7 @@ void SAL_CALL ODefinitionContainer::vetoableChange( const PropertyChangeEvent& a
throw PropertyVetoException();
}
}
-// -----------------------------------------------------------------------------
+
void ODefinitionContainer::addObjectListener(const Reference< XContent >& _xNewObject)
{
OSL_ENSURE(_xNewObject.is(),"ODefinitionContainer::addObjectListener: Object is null!");
@@ -695,7 +660,7 @@ void ODefinitionContainer::addObjectListener(const Reference< XContent >& _xNewO
xProp->addVetoableChangeListener(PROPERTY_NAME, this);
}
}
-// -----------------------------------------------------------------------------
+
void ODefinitionContainer::removeObjectListener(const Reference< XContent >& _xNewObject)
{
Reference<XPropertySet> xProp(_xNewObject,UNO_QUERY);
@@ -705,15 +670,12 @@ void ODefinitionContainer::removeObjectListener(const Reference< XContent >& _xN
xProp->removeVetoableChangeListener(PROPERTY_NAME, this);
}
}
-// -----------------------------------------------------------------------------
+
sal_Bool ODefinitionContainer::checkExistence(const ::rtl::OUString& _rName)
{
return m_aDocumentMap.find(_rName) != m_aDocumentMap.end();
}
-//........................................................................
}
// 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 9e9c228f4..de94176e3 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -68,13 +68,11 @@ using namespace ::osl;
using namespace ::comphelper;
using namespace ::cppu;
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
-//= LocalNameApproval
+//= LocalNameApproval
//==========================================================================
class LocalNameApproval : public IContainerApprove
{
@@ -92,7 +90,6 @@ public:
void SAL_CALL approveElement( const ::rtl::OUString& _rName, const Reference< XInterface >& _rxElement );
};
-//--------------------------------------------------------------------------
void SAL_CALL LocalNameApproval::approveElement( const ::rtl::OUString& _rName, const Reference< XInterface >& /*_rxElement*/ )
{
if ( _rName.indexOf( '/' ) != -1 )
@@ -107,7 +104,7 @@ void SAL_CALL LocalNameApproval::approveElement( const ::rtl::OUString& _rName,
//= ODocumentContainer
//==========================================================================
DBG_NAME(ODocumentContainer)
-//--------------------------------------------------------------------------
+
ODocumentContainer::ODocumentContainer(const Reference< XMultiServiceFactory >& _xORB
,const Reference< XInterface >& _xParentContainer
,const TContentPtr& _pImpl
@@ -124,7 +121,6 @@ ODocumentContainer::ODocumentContainer(const Reference< XMultiServiceFactory >&
setElementApproval( PContainerApprove( new LocalNameApproval ( _xORB ) ) );
}
-//--------------------------------------------------------------------------
ODocumentContainer::~ODocumentContainer()
{
DBG_DTOR(ODocumentContainer, NULL);
@@ -135,7 +131,7 @@ ODocumentContainer::~ODocumentContainer()
dispose();
}
}
-// -----------------------------------------------------------------------------
+
IMPLEMENT_FORWARD_XINTERFACE3( ODocumentContainer,ODefinitionContainer,ODocumentContainer_Base,OPropertyStateContainer)
IMPLEMENT_TYPEPROVIDER3(ODocumentContainer,ODefinitionContainer,OPropertyStateContainer,ODocumentContainer_Base);
IMPLEMENT_SERVICE_INFO_IMPLNAME(ODocumentContainer, "com.sun.star.comp.dba.ODocumentContainer");
@@ -149,13 +145,11 @@ Sequence< ::rtl::OUString > SAL_CALL ODocumentContainer::getSupportedServiceName
return aSupported;
}
-// -----------------------------------------------------------------------------
::rtl::OUString ODocumentContainer::determineContentType() const
{
return ::rtl::OUString();
}
-//--------------------------------------------------------------------------
Reference< XContent > ODocumentContainer::createObject( const ::rtl::OUString& _rName)
{
const ODefinitionContainer_Impl& rDefinitions( getDefinitions() );
@@ -165,7 +159,7 @@ Reference< XContent > ODocumentContainer::createObject( const ::rtl::OUString& _
return new ODocumentContainer( m_aContext.getLegacyServiceFactory(), *this, aFind->second, m_bFormsContainer );
return new ODocumentDefinition( *this, m_aContext.getLegacyServiceFactory(), aFind->second, m_bFormsContainer );
}
-// -----------------------------------------------------------------------------
+
Reference< XInterface > SAL_CALL ODocumentContainer::createInstance( const ::rtl::OUString& aServiceSpecifier ) throw (Exception, RuntimeException)
{
return createInstanceWithArguments( aServiceSpecifier, Sequence< Any >() );
@@ -184,7 +178,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments( const ::rtl::OUString& ServiceSpecifier, const Sequence< Any >& _aArguments ) throw (Exception, RuntimeException)
{
Reference< XInterface > xRet;
@@ -238,7 +231,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
if ( bNew )
{
const static ::rtl::OUString sBaseName(RTL_CONSTASCII_USTRINGPARAM("Obj"));
- // -----------------------------------------------------------------------------
+
sPersistentName = sBaseName;
sPersistentName += ::rtl::OUString::valueOf(sal_Int32(rDefinitions.size() + 1));
Reference<XNameAccess> xElements(getContainerStorage(),UNO_QUERY);
@@ -317,11 +310,9 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
Reference< XCommandProcessor > xCommandProcessor(xContent,UNO_QUERY);
if ( xContent.is() )
{
- xCommandProcessor->execute(aCommand,-1,Reference< XCommandEnvironment >());
+ xCommandProcessor->execute(aCommand,-1,Reference< XCommandEnvironment >());
}
}
-
- // xRet = xContent;
}
else if ( ServiceSpecifier == SERVICE_NAME_FORM_COLLECTION || SERVICE_NAME_REPORT_COLLECTION == ServiceSpecifier )
{
@@ -356,7 +347,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
pElementImpl = aFind->second;
OSL_ENSURE( pElementImpl ," Invalid entry in map!");
xContent = new ODocumentContainer( m_aContext.getLegacyServiceFactory(), *this, pElementImpl, ServiceSpecifier == SERVICE_NAME_FORM_COLLECTION );
-
+
// copy children
if ( xCopyFrom.is() )
{
@@ -392,7 +383,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
{
if ( m_bFormsContainer )
sServiceName = SERVICE_NAME_FORM_COLLECTION;
- else
+ else
sServiceName = SERVICE_NAME_REPORT_COLLECTION;
}
else
@@ -409,7 +400,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
xRet = xContent;
return xRet;
}
-// -----------------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL ODocumentContainer::getAvailableServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSe(3);
@@ -418,11 +409,11 @@ Sequence< ::rtl::OUString > SAL_CALL ODocumentContainer::getAvailableServiceName
aSe[2] = SERVICE_NAME_REPORT_COLLECTION;
return aSe;
}
-// -----------------------------------------------------------------------------
+
Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 CommandId, const Reference< XCommandEnvironment >& Environment ) throw (Exception, CommandAbortedException, RuntimeException)
{
Any aRet;
- if ( aCommand.Name.compareToAscii( "open" ) == 0 )
+ if ( aCommand.Name.compareToAscii( "open" ) == 0 )
{
//////////////////////////////////////////////////////////////////
// open command for a folder content
@@ -499,11 +490,11 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com
dispose();
}
- else
+ else
aRet = OContentHelper::execute(aCommand,CommandId,Environment);
return aRet;
}
-// -----------------------------------------------------------------------------
+
namespace
{
sal_Bool lcl_queryContent(const ::rtl::OUString& _sName,Reference< XNameContainer >& _xNameContainer,Any& _rRet,::rtl::OUString& _sSimpleName)
@@ -530,13 +521,13 @@ namespace
}
}
if ( nIndex == -1 )
- _sSimpleName = sName; // a content
- else
+ _sSimpleName = sName; // a content
+ else
_xNameContainer.clear(); // a sub folder doesn't exist
return bRet;
}
}
-// -----------------------------------------------------------------------------
+
Reference< XComponent > SAL_CALL ODocumentContainer::loadComponentFromURL( const ::rtl::OUString& _sURL
, const ::rtl::OUString& /*TargetFrameName*/
, sal_Int32 /*SearchFlags*/
@@ -586,7 +577,7 @@ Reference< XComponent > SAL_CALL ODocumentContainer::loadComponentFromURL( const
}
return xComp;
}
-// -----------------------------------------------------------------------------
+
Any SAL_CALL ODocumentContainer::getByHierarchicalName( const ::rtl::OUString& _sName ) throw (NoSuchElementException, RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -597,7 +588,7 @@ Any SAL_CALL ODocumentContainer::getByHierarchicalName( const ::rtl::OUString& _
return aContent;
throw NoSuchElementException(_sName,*this);
}
-// -----------------------------------------------------------------------------
+
sal_Bool SAL_CALL ODocumentContainer::hasByHierarchicalName( const ::rtl::OUString& _sName ) throw (RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -606,7 +597,7 @@ sal_Bool SAL_CALL ODocumentContainer::hasByHierarchicalName( const ::rtl::OUStri
::rtl::OUString sName;
return lcl_queryContent(_sName,xNameContainer,aContent,sName);
}
-// -----------------------------------------------------------------------------
+
// XHierarchicalNameContainer
void SAL_CALL ODocumentContainer::insertByHierarchicalName( const ::rtl::OUString& _sName, const Any& _aElement ) throw (IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
{
@@ -620,7 +611,7 @@ void SAL_CALL ODocumentContainer::insertByHierarchicalName( const ::rtl::OUStrin
::rtl::OUString sName;
if ( lcl_queryContent(_sName,xNameContainer,aContent,sName) )
throw ElementExistException(_sName,*this);
-
+
if ( !xNameContainer.is() )
{
::rtl::OUString sMessage( DBA_RES( RID_STR_NO_SUB_FOLDER ) );
@@ -631,7 +622,7 @@ void SAL_CALL ODocumentContainer::insertByHierarchicalName( const ::rtl::OUStrin
xNameContainer->insertByName(sName,_aElement);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODocumentContainer::removeByHierarchicalName( const ::rtl::OUString& _sName ) throw (NoSuchElementException, WrappedTargetException, RuntimeException)
{
if ( !_sName.getLength() )
@@ -646,7 +637,7 @@ void SAL_CALL ODocumentContainer::removeByHierarchicalName( const ::rtl::OUStrin
xNameContainer->removeByName(sName);
}
-// -----------------------------------------------------------------------------
+
// XHierarchicalNameReplace
void SAL_CALL ODocumentContainer::replaceByHierarchicalName( const ::rtl::OUString& _sName, const Any& _aElement ) throw (IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
{
@@ -664,14 +655,12 @@ void SAL_CALL ODocumentContainer::replaceByHierarchicalName( const ::rtl::OUStri
xNameContainer->replaceByName(sName,_aElement);
}
-// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL ODocumentContainer::getHierarchicalName() throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
return impl_getHierarchicalName( false );
}
-// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL ODocumentContainer::composeHierarchicalName( const ::rtl::OUString& i_rRelativeName ) throw (IllegalArgumentException, NoSupportException, RuntimeException)
{
::rtl::OUStringBuffer aBuffer;
@@ -681,7 +670,6 @@ void SAL_CALL ODocumentContainer::replaceByHierarchicalName( const ::rtl::OUStri
return aBuffer.makeStringAndClear();
}
-// -----------------------------------------------------------------------------
::rtl::Reference<OContentHelper> ODocumentContainer::getContent(const ::rtl::OUString& _sName) const
{
::rtl::Reference<OContentHelper> pContent = NULL;
@@ -696,12 +684,12 @@ void SAL_CALL ODocumentContainer::replaceByHierarchicalName( const ::rtl::OUStri
}
return pContent;
}
-// -----------------------------------------------------------------------------
+
void ODocumentContainer::getPropertyDefaultByHandle( sal_Int32 /*_nHandle*/, Any& _rDefault ) const
{
_rDefault.clear();
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODocumentContainer::commit( ) throw (::com::sun::star::io::IOException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -717,7 +705,7 @@ void SAL_CALL ODocumentContainer::commit( ) throw (::com::sun::star::io::IOExce
if ( xTrans.is() )
xTrans->commit();
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODocumentContainer::revert( ) throw (::com::sun::star::io::IOException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException)
{
MutexGuard aGuard(m_aMutex);
@@ -733,15 +721,14 @@ void SAL_CALL ODocumentContainer::revert( ) throw (::com::sun::star::io::IOExce
if ( xTrans.is() )
xTrans->revert();
}
-// -----------------------------------------------------------------------------
+
Reference< XStorage> ODocumentContainer::getContainerStorage() const
-{
+{
return m_pImpl->m_pDataSource
? m_pImpl->m_pDataSource->getStorage( m_bFormsContainer ? ODatabaseModelImpl::E_FORM : ODatabaseModelImpl::E_REPORT )
: Reference< XStorage>();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODocumentContainer::removeByName( const ::rtl::OUString& _rName ) throw(NoSuchElementException, WrappedTargetException, RuntimeException)
{
ResettableMutexGuard aGuard(m_aMutex);
@@ -769,8 +756,7 @@ void SAL_CALL ODocumentContainer::removeByName( const ::rtl::OUString& _rName )
notifyByName( aGuard, _rName, NULL, NULL, E_REMOVED, ContainerListemers );
}
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODocumentContainer::rename( const ::rtl::OUString& newName ) throw (SQLException, ElementExistException, RuntimeException)
{
try
@@ -794,8 +780,5 @@ void SAL_CALL ODocumentContainer::rename( const ::rtl::OUString& newName ) throw
}
}
-//........................................................................
} // 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 0998a8209..5ef9950ef 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.hxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,10 +39,8 @@
#include <comphelper/proparrhlp.hxx>
#include "apitools.hxx"
-//........................................................................
namespace dbaccess
{
-//........................................................................
typedef ::cppu::ImplHelper5 < ::com::sun::star::frame::XComponentLoader
, ::com::sun::star::lang::XMultiServiceFactory
, ::com::sun::star::container::XHierarchicalNameContainer
@@ -140,9 +138,6 @@ protected:
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_COREDATAACCESS_DOCUMENTCONTAINER_HXX_
-
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 096cec1c6..1cc87e2fc 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -141,10 +141,9 @@ namespace DatabaseObject = sdb::application::DatabaseObject;
#define DEFAULT_WIDTH 10000
#define DEFAULT_HEIGHT 7500
-//.............................................................................
+
namespace dbaccess
{
-//.............................................................................
typedef ::boost::optional< bool > optional_bool;
@@ -206,7 +205,7 @@ namespace dbaccess
virtual void SAL_CALL stateChanged( const lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (uno::RuntimeException);
virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw (uno::RuntimeException);
};
- //------------------------------------------------------------------
+
void SAL_CALL OEmbedObjectHolder::disposing()
{
if ( m_xBroadCaster.is() )
@@ -214,7 +213,7 @@ namespace dbaccess
m_xBroadCaster = NULL;
m_pDefinition = NULL;
}
- //------------------------------------------------------------------
+
void SAL_CALL OEmbedObjectHolder::changingState( const lang::EventObject& /*aEvent*/, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (embed::WrongStateException, uno::RuntimeException)
{
if ( !m_bInChangingState && nNewState == EmbedStates::RUNNING && nOldState == EmbedStates::ACTIVE && m_pDefinition )
@@ -224,7 +223,7 @@ namespace dbaccess
m_bInChangingState = false;
}
}
- //------------------------------------------------------------------
+
void SAL_CALL OEmbedObjectHolder::stateChanged( const lang::EventObject& aEvent, ::sal_Int32 nOldState, ::sal_Int32 nNewState ) throw (uno::RuntimeException)
{
if ( !m_bInStateChange && nNewState == EmbedStates::RUNNING && nOldState == EmbedStates::ACTIVE && m_pDefinition )
@@ -239,7 +238,7 @@ namespace dbaccess
m_bInStateChange = false;
}
}
- //------------------------------------------------------------------
+
void SAL_CALL OEmbedObjectHolder::disposing( const lang::EventObject& /*Source*/ ) throw (uno::RuntimeException)
{
m_xBroadCaster = NULL;
@@ -353,7 +352,6 @@ namespace dbaccess
protected:
};
- //------------------------------------------------------------------
void SAL_CALL LifetimeCoupler::disposing( const css::lang::EventObject& /*Source*/ ) throw (RuntimeException)
{
m_xClient.clear();
@@ -377,14 +375,12 @@ namespace dbaccess
virtual void SAL_CALL setName( const ::rtl::OUString& _sName,const Reference<XContent>& _xParent) throw(RuntimeException);
};
- //------------------------------------------------------------------
void SAL_CALL ODocumentSaveContinuation::setName( const ::rtl::OUString& _sName,const Reference<XContent>& _xParent) throw(RuntimeException)
{
m_sName = _sName;
m_xParentContainer = _xParent;
}
-// -----------------------------------------------------------------------------
::rtl::OUString ODocumentDefinition::GetDocumentServiceFromMediaType( const Reference< XStorage >& _rxContainerStorage,
const ::rtl::OUString& _rEntityName, const ::comphelper::ComponentContext& _rContext,
Sequence< sal_Int8 >& _rClassId )
@@ -394,7 +390,6 @@ namespace dbaccess
_rContext, _rClassId );
}
-// -----------------------------------------------------------------------------
::rtl::OUString ODocumentDefinition::GetDocumentServiceFromMediaType( const ::rtl::OUString& _rMediaType,
const ::comphelper::ComponentContext& _rContext, Sequence< sal_Int8 >& _rClassId )
{
@@ -442,13 +437,12 @@ namespace dbaccess
}
return sResult;
}
-// -----------------------------------------------------------------------------
+
//==========================================================================
//= ODocumentDefinition
//==========================================================================
DBG_NAME(ODocumentDefinition)
-//--------------------------------------------------------------------------
ODocumentDefinition::ODocumentDefinition( const Reference< XInterface >& _rxContainer, const Reference< XMultiServiceFactory >& _xORB,
const TContentPtr& _pImpl, sal_Bool _bForm )
:OContentHelper(_xORB,_rxContainer,_pImpl)
@@ -464,7 +458,6 @@ ODocumentDefinition::ODocumentDefinition( const Reference< XInterface >& _rxCont
registerProperties();
}
-//--------------------------------------------------------------------------
void ODocumentDefinition::initialLoad( const Sequence< sal_Int8 >& i_rClassID, const Sequence< PropertyValue >& i_rCreationArgs,
const Reference< XConnection >& i_rConnection )
{
@@ -475,7 +468,6 @@ void ODocumentDefinition::initialLoad( const Sequence< sal_Int8 >& i_rClassID, c
loadEmbeddedObject( i_rConnection, i_rClassID, i_rCreationArgs, false, false );
}
-//--------------------------------------------------------------------------
ODocumentDefinition::~ODocumentDefinition()
{
DBG_DTOR(ODocumentDefinition, NULL);
@@ -492,7 +484,7 @@ ODocumentDefinition::~ODocumentDefinition()
m_pInterceptor = NULL;
}
}
-// -----------------------------------------------------------------------------
+
void ODocumentDefinition::closeObject()
{
::osl::MutexGuard aGuard(m_aMutex);
@@ -516,7 +508,7 @@ void ODocumentDefinition::closeObject()
}
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODocumentDefinition::disposing()
{
OContentHelper::disposing();
@@ -530,11 +522,11 @@ void SAL_CALL ODocumentDefinition::disposing()
xCloseable->removeCloseListener(this);
}
}
-// -----------------------------------------------------------------------------
+
IMPLEMENT_TYPEPROVIDER3(ODocumentDefinition,OContentHelper,OPropertyStateContainer,ODocumentDefinition_Base);
IMPLEMENT_FORWARD_XINTERFACE3( ODocumentDefinition,OContentHelper,OPropertyStateContainer,ODocumentDefinition_Base)
IMPLEMENT_SERVICE_INFO1(ODocumentDefinition,"com.sun.star.comp.dba.ODocumentDefinition",SERVICE_SDB_DOCUMENTDEFINITION)
-//--------------------------------------------------------------------------
+
void ODocumentDefinition::registerProperties()
{
#define REGISTER_PROPERTY( name, location ) \
@@ -549,7 +541,6 @@ void ODocumentDefinition::registerProperties()
REGISTER_PROPERTY ( IS_FORM, m_bForm );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODocumentDefinition::getFastPropertyValue( Any& o_rValue, sal_Int32 i_nHandle ) const
{
if ( i_nHandle == PROPERTY_ID_PERSISTENT_PATH )
@@ -570,21 +561,17 @@ void SAL_CALL ODocumentDefinition::getFastPropertyValue( Any& o_rValue, sal_Int3
OPropertyStateContainer::getFastPropertyValue( o_rValue, i_nHandle );
}
-// -----------------------------------------------------------------------------
Reference< XPropertySetInfo > SAL_CALL ODocumentDefinition::getPropertySetInfo( ) throw(RuntimeException)
{
Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) );
return xInfo;
}
-//--------------------------------------------------------------------------
IPropertyArrayHelper& ODocumentDefinition::getInfoHelper()
{
return *getArrayHelper();
}
-
-//--------------------------------------------------------------------------
IPropertyArrayHelper* ODocumentDefinition::createArrayHelper( ) const
{
// properties maintained by our base class (see registerProperties)
@@ -601,7 +588,6 @@ IPropertyArrayHelper* ODocumentDefinition::createArrayHelper( ) const
return new OPropertyArrayHelper( ::comphelper::concatSequences( aProps, aManualProps ) );
}
-// -----------------------------------------------------------------------------
class OExecuteImpl
{
sal_Bool& m_rbSet;
@@ -610,7 +596,6 @@ public:
~OExecuteImpl(){ m_rbSet = sal_False; }
};
-// -----------------------------------------------------------------------------
namespace
{
bool lcl_extractOpenMode( const Any& _rValue, sal_Int32& _out_rMode )
@@ -630,7 +615,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
void ODocumentDefinition::impl_removeFrameFromDesktop_throw( const ::comphelper::ComponentContext& _rContxt, const Reference< XFrame >& _rxFrame )
{
Reference< XFramesSupplier > xDesktop( _rContxt.createComponent( (::rtl::OUString)SERVICE_FRAME_DESKTOP ), UNO_QUERY_THROW );
@@ -638,7 +622,6 @@ void ODocumentDefinition::impl_removeFrameFromDesktop_throw( const ::comphelper:
xFrames->remove( _rxFrame );
}
-// -----------------------------------------------------------------------------
void ODocumentDefinition::impl_onActivateEmbeddedObject_nothrow( const bool i_bReactivated )
{
try
@@ -675,7 +658,6 @@ void ODocumentDefinition::impl_onActivateEmbeddedObject_nothrow( const bool i_bR
}
}
-// -----------------------------------------------------------------------------
namespace
{
// =========================================================================
@@ -768,7 +750,6 @@ namespace
};
}
-// -----------------------------------------------------------------------------
void ODocumentDefinition::impl_initFormEditView( const Reference< XController >& _rxController )
{
try
@@ -803,7 +784,6 @@ void ODocumentDefinition::impl_initFormEditView( const Reference< XController >&
}
}
-// -----------------------------------------------------------------------------
void ODocumentDefinition::impl_showOrHideComponent_throw( const bool i_bShow )
{
const sal_Int32 nCurrentState = m_xEmbeddedObject.is() ? m_xEmbeddedObject->getCurrentState() : EmbedStates::LOADED;
@@ -836,7 +816,6 @@ void ODocumentDefinition::impl_showOrHideComponent_throw( const bool i_bShow )
}
}
-// -----------------------------------------------------------------------------
Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, const bool _bActivate,
const Reference< XCommandEnvironment >& _rxEnvironment )
{
@@ -1020,7 +999,6 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
return makeAny( xModel );
}
-// -----------------------------------------------------------------------------
Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 CommandId, const Reference< XCommandEnvironment >& Environment ) throw (Exception, CommandAbortedException, RuntimeException)
{
Any aRet;
@@ -1097,7 +1075,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
::rtl::OUString sPersistentName;
aIni[1] >>= sPersistentName;
Reference< XStorage> xStorage = getContainerStorage();
- // -----------------------------------------------------------------------------
+
xStorage->copyElementTo(m_pImpl->m_aProps.sPersistentName,xDest,sPersistentName);
}
else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "preview" ) ) )
@@ -1169,7 +1147,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
return aRet;
}
-// -----------------------------------------------------------------------------
+
namespace
{
void lcl_resetChildFormsToEmptyDataSource( const Reference< XIndexAccess>& _rxFormsContainer )
@@ -1221,7 +1199,7 @@ namespace
}
}
-// -----------------------------------------------------------------------------
+
void ODocumentDefinition::onCommandInsert( const ::rtl::OUString& _sURL, const Reference< XCommandEnvironment >& Environment )
throw( Exception )
{
@@ -1243,7 +1221,6 @@ void ODocumentDefinition::onCommandInsert( const ::rtl::OUString& _sURL, const R
// Unreachable
}
-
if ( !m_xEmbeddedObject.is() )
{
Reference< XStorage> xStorage = getContainerStorage();
@@ -1282,13 +1259,9 @@ void ODocumentDefinition::onCommandInsert( const ::rtl::OUString& _sURL, const R
}
}
-// @@@
-// storeData();
-
aGuard.clear();
-// inserted();
}
-// -----------------------------------------------------------------------------
+
sal_Bool ODocumentDefinition::save(sal_Bool _bApprove)
{
// default handling: instantiate an interaction handler and let it handle the parameter request
@@ -1376,7 +1349,7 @@ sal_Bool ODocumentDefinition::save(sal_Bool _bApprove)
}
return sal_True;
}
-// -----------------------------------------------------------------------------
+
sal_Bool ODocumentDefinition::saveAs()
{
// default handling: instantiate an interaction handler and let it handle the parameter request
@@ -1434,7 +1407,7 @@ sal_Bool ODocumentDefinition::saveAs()
{
Reference< XStorage> xStorage = getContainerStorage();
const static ::rtl::OUString sBaseName(RTL_CONSTASCII_USTRINGPARAM("Obj"));
- // -----------------------------------------------------------------------------
+
Reference<XNameAccess> xElements(xStorage,UNO_QUERY_THROW);
::rtl::OUString sPersistentName = ::dbtools::createUniqueName(xElements,sBaseName);
xStorage->copyElementTo(m_pImpl->m_aProps.sPersistentName,xStorage,sPersistentName);
@@ -1478,7 +1451,6 @@ sal_Bool ODocumentDefinition::saveAs()
}
}
-
}
catch(Exception&)
{
@@ -1514,7 +1486,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
namespace
{
Reference< XFrame > lcl_getDatabaseDocumentFrame( ODatabaseModelImpl& _rImpl )
@@ -1533,7 +1504,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
sal_Bool ODocumentDefinition::objectSupportsEmbeddedScripts() const
{
bool bAllowDocumentMacros = !m_pImpl->m_pDataSource
@@ -1546,13 +1516,11 @@ sal_Bool ODocumentDefinition::objectSupportsEmbeddedScripts() const
return bAllowDocumentMacros;
}
-// -----------------------------------------------------------------------------
::rtl::OUString ODocumentDefinition::determineContentType() const
{
return lcl_determineContentType_nothrow( getContainerStorage(), m_pImpl->m_aProps.sPersistentName );
}
-// -----------------------------------------------------------------------------
void ODocumentDefinition::separateOpenCommandArguments( const Sequence< PropertyValue >& i_rOpenCommandArguments,
::comphelper::NamedValueCollection& o_rDocumentLoadArgs, ::comphelper::NamedValueCollection& o_rEmbeddedObjectDescriptor )
{
@@ -1574,7 +1542,6 @@ void ODocumentDefinition::separateOpenCommandArguments( const Sequence< Property
o_rDocumentLoadArgs.merge( aOpenCommandArguments, false );
}
-// -----------------------------------------------------------------------------
Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XConnection>& _xConnection, const bool _bSuppressMacros, const bool _bReadOnly,
const Sequence< PropertyValue >& i_rOpenCommandArguments, Sequence< PropertyValue >& _out_rEmbeddedObjectDescriptor )
{
@@ -1658,7 +1625,7 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC
return aMediaDesc.getPropertyValues();
}
-// -----------------------------------------------------------------------------
+
void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_rConnection, const Sequence< sal_Int8 >& _aClassID,
const Sequence< PropertyValue >& i_rOpenCommandArguments, const bool _bSuppressMacros, const bool _bReadOnly )
{
@@ -1824,7 +1791,6 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_
m_xLastKnownConnection = i_rConnection;
}
-// -----------------------------------------------------------------------------
void ODocumentDefinition::onCommandPreview(Any& _rImage)
{
loadEmbeddedObjectForPreview();
@@ -1848,12 +1814,12 @@ void ODocumentDefinition::onCommandPreview(Any& _rImage)
}
}
}
-// -----------------------------------------------------------------------------
+
void ODocumentDefinition::getPropertyDefaultByHandle( sal_Int32 /*_nHandle*/, Any& _rDefault ) const
{
_rDefault.clear();
}
-// -----------------------------------------------------------------------------
+
void ODocumentDefinition::onCommandGetDocumentProperties( Any& _rProps )
{
loadEmbeddedObjectForPreview();
@@ -1872,7 +1838,7 @@ void ODocumentDefinition::onCommandGetDocumentProperties( Any& _rProps )
}
}
}
-// -----------------------------------------------------------------------------
+
Reference< util::XCloseable > ODocumentDefinition::impl_getComponent_throw( const bool i_ForceCreate )
{
OSL_ENSURE(m_xEmbeddedObject.is(),"Illegal call for embeddedObject");
@@ -1900,14 +1866,12 @@ Reference< util::XCloseable > ODocumentDefinition::impl_getComponent_throw( cons
return xComp;
}
-// -----------------------------------------------------------------------------
Reference< util::XCloseable > ODocumentDefinition::getComponent() throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
return impl_getComponent_throw( true );
}
-// -----------------------------------------------------------------------------
namespace
{
Reference< XDatabaseDocumentUI > lcl_getDatabaseDocumentUI( ODatabaseModelImpl& _rModelImpl )
@@ -1921,7 +1885,6 @@ namespace
}
}
-// -----------------------------------------------------------------------------
Reference< XComponent > ODocumentDefinition::impl_openUI_nolck_throw( bool _bForEditing )
{
::osl::ClearableMutexGuard aGuard( m_aMutex );
@@ -1958,7 +1921,6 @@ Reference< XComponent > ODocumentDefinition::impl_openUI_nolck_throw( bool _bFor
return xComponent;
}
-// -----------------------------------------------------------------------------
void ODocumentDefinition::impl_store_throw()
{
Reference<XEmbedPersist> xPersist( m_xEmbeddedObject, UNO_QUERY );
@@ -1969,7 +1931,6 @@ void ODocumentDefinition::impl_store_throw()
}
}
-// -----------------------------------------------------------------------------
bool ODocumentDefinition::impl_close_throw()
{
bool bSuccess = prepareClose();
@@ -1981,19 +1942,16 @@ bool ODocumentDefinition::impl_close_throw()
return bSuccess;
}
-// -----------------------------------------------------------------------------
Reference< XComponent > SAL_CALL ODocumentDefinition::open( ) throw (WrappedTargetException, RuntimeException)
{
return impl_openUI_nolck_throw( false );
}
-// -----------------------------------------------------------------------------
Reference< XComponent > SAL_CALL ODocumentDefinition::openDesign( ) throw (WrappedTargetException, RuntimeException)
{
return impl_openUI_nolck_throw( true );
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODocumentDefinition::store( ) throw (WrappedTargetException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -2009,7 +1967,6 @@ void SAL_CALL ODocumentDefinition::store( ) throw (WrappedTargetException, Runt
}
}
-// -----------------------------------------------------------------------------
::sal_Bool SAL_CALL ODocumentDefinition::close( ) throw (WrappedTargetException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -2028,14 +1985,12 @@ void SAL_CALL ODocumentDefinition::store( ) throw (WrappedTargetException, Runt
return bSuccess;
}
-// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL ODocumentDefinition::getHierarchicalName() throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
return impl_getHierarchicalName( false );
}
-// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL ODocumentDefinition::composeHierarchicalName( const ::rtl::OUString& i_rRelativeName ) throw (IllegalArgumentException, NoSupportException, RuntimeException)
{
::rtl::OUStringBuffer aBuffer;
@@ -2045,7 +2000,6 @@ void SAL_CALL ODocumentDefinition::store( ) throw (WrappedTargetException, Runt
return aBuffer.makeStringAndClear();
}
-// -----------------------------------------------------------------------------
void SAL_CALL ODocumentDefinition::rename( const ::rtl::OUString& _rNewName ) throw (SQLException, ElementExistException, RuntimeException)
{
try
@@ -2070,14 +2024,14 @@ void SAL_CALL ODocumentDefinition::rename( const ::rtl::OUString& _rNewName ) th
throw ElementExistException(_rNewName,*this);
}
}
-// -----------------------------------------------------------------------------
+
Reference< XStorage> ODocumentDefinition::getContainerStorage() const
{
return m_pImpl->m_pDataSource
? m_pImpl->m_pDataSource->getStorage( m_bForm ? ODatabaseModelImpl::E_FORM : ODatabaseModelImpl::E_REPORT )
: Reference< XStorage>();
}
-// -----------------------------------------------------------------------------
+
sal_Bool ODocumentDefinition::isModified()
{
osl::ClearableGuard< osl::Mutex > aGuard(m_aMutex);
@@ -2089,7 +2043,7 @@ sal_Bool ODocumentDefinition::isModified()
}
return bRet;
}
-// -----------------------------------------------------------------------------
+
bool ODocumentDefinition::prepareClose()
{
if ( !m_xEmbeddedObject.is() )
@@ -2147,7 +2101,7 @@ bool ODocumentDefinition::prepareClose()
return true;
}
-// -----------------------------------------------------------------------------
+
void ODocumentDefinition::fillReportData( const ::comphelper::ComponentContext& _rContext,
const Reference< util::XCloseable >& _rxComponent,
const Reference< XConnection >& _rxActiveConnection )
@@ -2172,7 +2126,7 @@ void ODocumentDefinition::fillReportData( const ::comphelper::ComponentContext&
DBG_UNHANDLED_EXCEPTION();
}
}
-// -----------------------------------------------------------------------------
+
void ODocumentDefinition::updateDocumentTitle()
{
::rtl::OUString sName = m_pImpl->m_aProps.aTitle;
@@ -2188,7 +2142,7 @@ void ODocumentDefinition::updateDocumentTitle()
if ( xUntitledProvider.is() )
sName += ::rtl::OUString::valueOf( xUntitledProvider->leaseNumber(getComponent()) );
}
-
+
Reference< XTitle > xDatabaseDocumentModel(m_pImpl->m_pDataSource->getModel_noCreate(),uno::UNO_QUERY);
if ( xDatabaseDocumentModel.is() )
sName = xDatabaseDocumentModel->getTitle() + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" : ")) + sName;
@@ -2197,7 +2151,7 @@ void ODocumentDefinition::updateDocumentTitle()
if ( xTitle.is() )
xTitle->setTitle(sName);
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODocumentDefinition::queryClosing( const lang::EventObject& Source, ::sal_Bool GetsOwnership ) throw (util::CloseVetoException, uno::RuntimeException)
{
(void) Source;
@@ -2212,16 +2166,15 @@ void SAL_CALL ODocumentDefinition::queryClosing( const lang::EventObject& Source
throw util::CloseVetoException();
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODocumentDefinition::notifyClosing( const lang::EventObject& /*Source*/ ) throw (uno::RuntimeException)
{
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL ODocumentDefinition::disposing( const lang::EventObject& /*Source*/ ) throw (uno::RuntimeException)
{
}
-// -----------------------------------------------------------------------------
void ODocumentDefinition::firePropertyChange( sal_Int32 i_nHandle, const Any& i_rNewValue, const Any& i_rOldValue,
sal_Bool i_bVetoable, const NotifierAccess )
{
@@ -2231,7 +2184,6 @@ void ODocumentDefinition::firePropertyChange( sal_Int32 i_nHandle, const Any& i_
// =============================================================================
// NameChangeNotifier
// =============================================================================
-// -----------------------------------------------------------------------------
NameChangeNotifier::NameChangeNotifier( ODocumentDefinition& i_rDocumentDefinition, const ::rtl::OUString& i_rNewName,
::osl::ResettableMutexGuard& i_rClearForNotify )
:m_rDocumentDefinition( i_rDocumentDefinition )
@@ -2242,13 +2194,11 @@ NameChangeNotifier::NameChangeNotifier( ODocumentDefinition& i_rDocumentDefiniti
impl_fireEvent_throw( sal_True );
}
-// -----------------------------------------------------------------------------
NameChangeNotifier::~NameChangeNotifier()
{
impl_fireEvent_throw( sal_False );
}
-// -----------------------------------------------------------------------------
void NameChangeNotifier::impl_fireEvent_throw( const sal_Bool i_bVetoable )
{
m_rClearForNotify.clear();
@@ -2257,8 +2207,5 @@ void NameChangeNotifier::impl_fireEvent_throw( const sal_Bool i_bVetoable )
m_rClearForNotify.reset();
}
-//........................................................................
} // 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 a17d40a9e..6b63a15d6 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.hxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -344,9 +344,7 @@ private:
*/
sal_Bool objectSupportsEmbeddedScripts() const;
- //-------------------------------------------------------------------------
//- commands
- //-------------------------------------------------------------------------
void onCommandGetDocumentProperties( ::com::sun::star::uno::Any& _rProps );
void onCommandInsert( const ::rtl::OUString& _sURL, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& Environment ) throw( ::com::sun::star::uno::Exception );
@@ -380,9 +378,6 @@ private:
void impl_fireEvent_throw( const sal_Bool i_bVetoable );
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_COREDATAACCESS_DOCUMENTDEFINITION_HXX_
-
diff --git a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
index c94a54310..e044ba1b4 100644
--- a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
+++ b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
@@ -1,7 +1,7 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,10 +44,8 @@
#include <vcl/svapp.hxx>
#include <vos/mutex.hxx>
-//........................................................................
namespace dbaccess
{
-//........................................................................
/** === begin UNO using === **/
using ::com::sun::star::uno::Reference;
@@ -90,7 +88,6 @@ namespace dbaccess
}
};
- //--------------------------------------------------------------------
namespace
{
static void lcl_dispatchScriptURL_throw( DocumentEventExecutor_Data& _rDocExecData,
@@ -135,7 +132,6 @@ namespace dbaccess
//====================================================================
//= DocumentEventExecutor
//====================================================================
- //--------------------------------------------------------------------
DocumentEventExecutor::DocumentEventExecutor( const ::comphelper::ComponentContext& _rContext,
const Reference< XEventsSupplier >& _rxDocument )
:m_pData( new DocumentEventExecutor_Data( _rxDocument ) )
@@ -158,12 +154,10 @@ namespace dbaccess
}
}
- //--------------------------------------------------------------------
DocumentEventExecutor::~DocumentEventExecutor()
{
}
- //--------------------------------------------------------------------
void SAL_CALL DocumentEventExecutor::documentEventOccured( const DocumentEvent& _Event ) throw (RuntimeException)
{
Reference< XEventsSupplier > xEventsSupplier( m_pData->xDocument.get(), UNO_QUERY );
@@ -188,7 +182,6 @@ namespace dbaccess
const ::comphelper::NamedValueCollection aScriptDescriptor( xDocEvents->getByName( _Event.EventName ) );
-
::rtl::OUString sEventType;
bool bScriptAssigned = aScriptDescriptor.get_ensureType( "EventType", sEventType );
@@ -219,16 +212,11 @@ namespace dbaccess
DBG_UNHANDLED_EXCEPTION();
}
}
-
- //--------------------------------------------------------------------
+
void SAL_CALL DocumentEventExecutor::disposing( const lang::EventObject& /*_Source*/ ) throw (RuntimeException)
{
// not interested in
}
-
-//........................................................................
} // 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 518c2c6c0..e48e13f91 100644
--- a/dbaccess/source/core/dataaccess/documenteventexecutor.hxx
+++ b/dbaccess/source/core/dataaccess/documenteventexecutor.hxx
@@ -1,6 +1,6 @@
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,10 +41,8 @@ namespace comphelper
class ComponentContext;
}
-//........................................................................
namespace dbaccess
{
-//........................................................................
struct DocumentEventExecutor_Data;
//====================================================================
@@ -71,8 +69,6 @@ namespace dbaccess
::std::auto_ptr< DocumentEventExecutor_Data > m_pData;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_DOCUMENTEVENTEXECUTOR_HXX
diff --git a/dbaccess/source/core/dataaccess/documenteventnotifier.cxx b/dbaccess/source/core/dataaccess/documenteventnotifier.cxx
index 735b03419..dabd16a93 100644
--- a/dbaccess/source/core/dataaccess/documenteventnotifier.cxx
+++ b/dbaccess/source/core/dataaccess/documenteventnotifier.cxx
@@ -1,7 +1,7 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,10 +39,8 @@
#include <cppuhelper/weak.hxx>
#include <tools/diagnose_ex.h>
-//........................................................................
namespace dbaccess
{
-//........................................................................
/** === begin UNO using === **/
using ::com::sun::star::uno::Reference;
@@ -149,20 +147,17 @@ namespace dbaccess
void impl_notifyEventAsync_nothrow( const DocumentEvent& _rEvent );
};
- //--------------------------------------------------------------------
void SAL_CALL DocumentEventNotifier_Impl::acquire()
{
osl_incrementInterlockedCount( &m_refCount );
}
- //--------------------------------------------------------------------
void SAL_CALL DocumentEventNotifier_Impl::release()
{
if ( 0 == osl_decrementInterlockedCount( &m_refCount ) )
delete this;
}
- //--------------------------------------------------------------------
void DocumentEventNotifier_Impl::disposing()
{
// SYNCHRONIZED ->
@@ -188,7 +183,6 @@ namespace dbaccess
// <-- SYNCHRONIZED
}
- //--------------------------------------------------------------------
void DocumentEventNotifier_Impl::onDocumentInitialized()
{
if ( m_bInitialized )
@@ -200,7 +194,6 @@ namespace dbaccess
m_pEventBroadcaster->create();
}
- //--------------------------------------------------------------------
void DocumentEventNotifier_Impl::impl_notifyEvent_nothrow( const DocumentEvent& _rEvent )
{
OSL_PRECOND( m_bInitialized,
@@ -224,7 +217,6 @@ namespace dbaccess
}
}
- //--------------------------------------------------------------------
void DocumentEventNotifier_Impl::impl_notifyEventAsync_nothrow( const DocumentEvent& _rEvent )
{
if ( !m_pEventBroadcaster.is() )
@@ -238,7 +230,6 @@ namespace dbaccess
m_pEventBroadcaster->addEvent( new DocumentEventHolder( _rEvent ), this );
}
- // -----------------------------------------------------------------------------
void DocumentEventNotifier_Impl::processEvent( const ::comphelper::AnyEvent& _rEvent )
{
// beware, this is called from the notification thread
@@ -254,69 +245,56 @@ namespace dbaccess
//====================================================================
//= DocumentEventNotifier
//====================================================================
- //--------------------------------------------------------------------
DocumentEventNotifier::DocumentEventNotifier( ::cppu::OWeakObject& _rBroadcasterDocument, ::osl::Mutex& _rMutex )
:m_pImpl( new DocumentEventNotifier_Impl( _rBroadcasterDocument, _rMutex ) )
{
}
- //--------------------------------------------------------------------
DocumentEventNotifier::~DocumentEventNotifier()
{
}
- //--------------------------------------------------------------------
void DocumentEventNotifier::disposing()
{
m_pImpl->disposing();
}
- //--------------------------------------------------------------------
void DocumentEventNotifier::onDocumentInitialized()
{
m_pImpl->onDocumentInitialized();
}
- //--------------------------------------------------------------------
void DocumentEventNotifier::addLegacyEventListener( const Reference< document::XEventListener >& _Listener )
{
m_pImpl->addLegacyEventListener( _Listener );
}
- //--------------------------------------------------------------------
void DocumentEventNotifier::removeLegacyEventListener( const Reference< document::XEventListener >& _Listener )
{
m_pImpl->removeLegacyEventListener( _Listener );
}
- //--------------------------------------------------------------------
void DocumentEventNotifier::addDocumentEventListener( const Reference< XDocumentEventListener >& _Listener )
{
m_pImpl->addDocumentEventListener( _Listener );
}
- //--------------------------------------------------------------------
void DocumentEventNotifier::removeDocumentEventListener( const Reference< XDocumentEventListener >& _Listener )
{
m_pImpl->removeDocumentEventListener( _Listener );
}
- //--------------------------------------------------------------------
void DocumentEventNotifier::notifyDocumentEvent( const ::rtl::OUString& _EventName,
const Reference< XController2 >& _ViewController, const Any& _Supplement )
{
m_pImpl->notifyDocumentEvent( _EventName, _ViewController, _Supplement );
}
- //--------------------------------------------------------------------
void DocumentEventNotifier::notifyDocumentEventAsync( const ::rtl::OUString& _EventName,
const Reference< XController2 >& _ViewController, const Any& _Supplement )
{
m_pImpl->notifyDocumentEventAsync( _EventName, _ViewController, _Supplement );
}
-//........................................................................
} // 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 3beb9b3cf..7cc3c2b1c 100644
--- a/dbaccess/source/core/dataaccess/documenteventnotifier.hxx
+++ b/dbaccess/source/core/dataaccess/documenteventnotifier.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,10 +40,8 @@ namespace cppu
class OWeakObject;
}
-//........................................................................
namespace dbaccess
{
-//........................................................................
class DocumentEventNotifier_Impl;
//====================================================================
@@ -137,8 +135,6 @@ namespace dbaccess
::rtl::Reference< DocumentEventNotifier_Impl > m_pImpl;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_DOCUMENTEVENTNOTIFIER_HXX
diff --git a/dbaccess/source/core/dataaccess/documentevents.cxx b/dbaccess/source/core/dataaccess/documentevents.cxx
index 9ba3a199a..208b2486c 100644
--- a/dbaccess/source/core/dataaccess/documentevents.cxx
+++ b/dbaccess/source/core/dataaccess/documentevents.cxx
@@ -1,7 +1,7 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -39,10 +39,8 @@
#include <algorithm>
#include <functional>
-//........................................................................
namespace dbaccess
{
-//........................................................................
/** === begin UNO using === **/
using ::com::sun::star::uno::Reference;
@@ -88,7 +86,6 @@ namespace dbaccess
bool bNeedsSyncNotify;
};
- //--------------------------------------------------------------------
namespace
{
static const DocumentEventData* lcl_getDocumentEventData()
@@ -127,7 +124,6 @@ namespace dbaccess
//====================================================================
//= DocumentEvents
//====================================================================
- //--------------------------------------------------------------------
DocumentEvents::DocumentEvents( ::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex, DocumentEventsData& _rEventsData )
:m_pData( new DocumentEvents_Data( _rParent, _rMutex, _rEventsData ) )
{
@@ -142,24 +138,20 @@ namespace dbaccess
}
}
- //--------------------------------------------------------------------
DocumentEvents::~DocumentEvents()
{
}
- //--------------------------------------------------------------------
void SAL_CALL DocumentEvents::acquire() throw()
{
m_pData->rParent.acquire();
}
- //--------------------------------------------------------------------
void SAL_CALL DocumentEvents::release() throw()
{
m_pData->rParent.release();
}
- //--------------------------------------------------------------------
bool DocumentEvents::needsSynchronousNotification( const ::rtl::OUString& _rEventName )
{
const DocumentEventData* pEventData = lcl_getDocumentEventData();
@@ -174,7 +166,6 @@ namespace dbaccess
return false;
}
- //--------------------------------------------------------------------
void SAL_CALL DocumentEvents::replaceByName( const ::rtl::OUString& _Name, const Any& _Element ) throw (IllegalArgumentException, NoSuchElementException, WrappedTargetException, RuntimeException)
{
::osl::MutexGuard aGuard( m_pData->rMutex );
@@ -207,8 +198,7 @@ namespace dbaccess
elementPos->second = aEventDescriptor;
}
-
- //--------------------------------------------------------------------
+
Any SAL_CALL DocumentEvents::getByName( const ::rtl::OUString& _Name ) throw (NoSuchElementException, WrappedTargetException, RuntimeException)
{
::osl::MutexGuard aGuard( m_pData->rMutex );
@@ -223,8 +213,7 @@ namespace dbaccess
aReturn <<= rEventDesc;
return aReturn;
}
-
- //--------------------------------------------------------------------
+
Sequence< ::rtl::OUString > SAL_CALL DocumentEvents::getElementNames( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_pData->rMutex );
@@ -238,31 +227,24 @@ namespace dbaccess
);
return aNames;
}
-
- //--------------------------------------------------------------------
+
::sal_Bool SAL_CALL DocumentEvents::hasByName( const ::rtl::OUString& _Name ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_pData->rMutex );
return m_pData->rEventsData.find( _Name ) != m_pData->rEventsData.end();
}
-
- //--------------------------------------------------------------------
+
Type SAL_CALL DocumentEvents::getElementType( ) throw (RuntimeException)
{
return ::cppu::UnoType< Sequence< PropertyValue > >::get();
}
-
- //--------------------------------------------------------------------
+
::sal_Bool SAL_CALL DocumentEvents::hasElements( ) throw (RuntimeException)
{
::osl::MutexGuard aGuard( m_pData->rMutex );
return !m_pData->rEventsData.empty();
}
-
-//........................................................................
} // 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 4951cefe5..b053a9790 100644
--- a/dbaccess/source/core/dataaccess/documentevents.hxx
+++ b/dbaccess/source/core/dataaccess/documentevents.hxx
@@ -1,6 +1,6 @@
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,10 +38,8 @@
#include <map>
#include <boost/noncopyable.hpp>
-//........................................................................
namespace dbaccess
{
-//........................................................................
typedef ::std::map< ::rtl::OUString, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > >
DocumentEventsData;
@@ -83,8 +81,6 @@ namespace dbaccess
::std::auto_ptr< DocumentEvents_Data > m_pData;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_DOCUMENTEVENTS_HXX
diff --git a/dbaccess/source/core/dataaccess/intercept.cxx b/dbaccess/source/core/dataaccess/intercept.cxx
index 4e2312a1b..1b950f285 100644
--- a/dbaccess/source/core/dataaccess/intercept.cxx
+++ b/dbaccess/source/core/dataaccess/intercept.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -183,7 +183,7 @@ void SAL_CALL OInterceptor::dispatch( const URL& _URL,const Sequence<PropertyVal
return;
}
- if ( _URL.Complete == m_aInterceptedURL[ DISPATCH_CLOSEDOC ]
+ if ( _URL.Complete == m_aInterceptedURL[ DISPATCH_CLOSEDOC ]
|| _URL.Complete == m_aInterceptedURL[ DISPATCH_CLOSEWIN ]
|| _URL.Complete == m_aInterceptedURL[ DISPATCH_CLOSEFRAME ]
)
@@ -237,7 +237,7 @@ void SAL_CALL OInterceptor::addStatusListener(
if ( m_pContentHolder && _URL.Complete == m_aInterceptedURL[DISPATCH_SAVEAS] )
{ // SaveAs
-
+
if ( !m_pContentHolder->isNewReport() )
{
FeatureStateEvent aStateEvent;
@@ -247,7 +247,7 @@ void SAL_CALL OInterceptor::addStatusListener(
aStateEvent.Requery = sal_False;
aStateEvent.State <<= (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("($3)")));
Control->statusChanged(aStateEvent);
- }
+ }
{
osl::MutexGuard aGuard(m_aMutex);
@@ -417,7 +417,7 @@ void SAL_CALL OInterceptor::setMasterDispatchProvider(
osl::MutexGuard aGuard(m_aMutex);
m_xMasterDispatchProvider = NewSupplier;
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OInterceptor::notifyEvent( const ::com::sun::star::document::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException)
{
osl::ResettableMutexGuard _rGuard(m_aMutex);
@@ -437,13 +437,10 @@ void SAL_CALL OInterceptor::notifyEvent( const ::com::sun::star::document::Event
}
}
}
-// -----------------------------------------------------------------------------
+
void SAL_CALL OInterceptor::disposing( const ::com::sun::star::lang::EventObject& /*Source*/ ) throw (::com::sun::star::uno::RuntimeException)
{
}
-//........................................................................
} // namespace dbaccess
-//........................................................................
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/intercept.hxx b/dbaccess/source/core/dataaccess/intercept.hxx
index ca9a6d634..ba0cb4c55 100644
--- a/dbaccess/source/core/dataaccess/intercept.hxx
+++ b/dbaccess/source/core/dataaccess/intercept.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,104 +53,102 @@ protected:
public:
OInterceptor( ODocumentDefinition* _pContentHolder,sal_Bool _bAllowEditDoc );
-
+
void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
-
+
//XDispatch
- virtual void SAL_CALL
- dispatch(
+ virtual void SAL_CALL
+ dispatch(
const ::com::sun::star::util::URL& URL,
const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue >& Arguments )
throw (::com::sun::star::uno::RuntimeException);
-
+
virtual void SAL_CALL
- addStatusListener(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XStatusListener >& Control,
+ addStatusListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XStatusListener >& Control,
const ::com::sun::star::util::URL& URL )
throw (
::com::sun::star::uno::RuntimeException
);
-
+
virtual void SAL_CALL
- removeStatusListener(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XStatusListener >& Control,
- const ::com::sun::star::util::URL& URL )
+ removeStatusListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XStatusListener >& Control,
+ const ::com::sun::star::util::URL& URL )
throw (
::com::sun::star::uno::RuntimeException
);
-
+
//XInterceptorInfo
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString >
SAL_CALL getInterceptedURLs( )
throw (
::com::sun::star::uno::RuntimeException
);
-
+
//XDispatchProvider ( inherited by XDispatchProviderInterceptor )
- virtual ::com::sun::star::uno::Reference<
+ virtual ::com::sun::star::uno::Reference<
::com::sun::star::frame::XDispatch > SAL_CALL
- queryDispatch(
+ queryDispatch(
const ::com::sun::star::util::URL& URL,
- const ::rtl::OUString& TargetFrameName,
+ const ::rtl::OUString& TargetFrameName,
sal_Int32 SearchFlags )
throw (
::com::sun::star::uno::RuntimeException
);
-
- virtual ::com::sun::star::uno::Sequence<
- ::com::sun::star::uno::Reference<
+
+ virtual ::com::sun::star::uno::Sequence<
+ ::com::sun::star::uno::Reference<
::com::sun::star::frame::XDispatch > > SAL_CALL
- queryDispatches(
+ queryDispatches(
const ::com::sun::star::uno::Sequence<
::com::sun::star::frame::DispatchDescriptor >& Requests )
throw (
::com::sun::star::uno::RuntimeException
);
-
-
+
//XDispatchProviderInterceptor
virtual ::com::sun::star::uno::Reference<
- ::com::sun::star::frame::XDispatchProvider > SAL_CALL
- getSlaveDispatchProvider( )
+ ::com::sun::star::frame::XDispatchProvider > SAL_CALL
+ getSlaveDispatchProvider( )
throw (
::com::sun::star::uno::RuntimeException
);
-
+
virtual void SAL_CALL
- setSlaveDispatchProvider(
- const ::com::sun::star::uno::Reference<
+ setSlaveDispatchProvider(
+ const ::com::sun::star::uno::Reference<
::com::sun::star::frame::XDispatchProvider >& NewDispatchProvider )
throw (
::com::sun::star::uno::RuntimeException
);
- virtual ::com::sun::star::uno::Reference<
+ virtual ::com::sun::star::uno::Reference<
::com::sun::star::frame::XDispatchProvider > SAL_CALL
- getMasterDispatchProvider( )
+ getMasterDispatchProvider( )
throw (
::com::sun::star::uno::RuntimeException
);
-
+
virtual void SAL_CALL
- setMasterDispatchProvider(
- const ::com::sun::star::uno::Reference<
+ setMasterDispatchProvider(
+ const ::com::sun::star::uno::Reference<
::com::sun::star::frame::XDispatchProvider >& NewSupplier )
throw (
::com::sun::star::uno::RuntimeException
- );
+ );
// XEventListener
virtual void SAL_CALL notifyEvent( const ::com::sun::star::document::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
-
-
+
private:
-
+
osl::Mutex m_aMutex;
-
+
ODocumentDefinition* m_pContentHolder;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xSlaveDispatchProvider;
@@ -163,12 +161,6 @@ private:
sal_Bool m_bAllowEditDoc;
};
-
-//........................................................................
} // namespace dbaccess
-//........................................................................
-
#endif //DBA_INTERCEPT_HXX
-
-
diff --git a/dbaccess/source/core/dataaccess/makefile.mk b/dbaccess/source/core/dataaccess/makefile.mk
index 831eae349..e37544b70 100644
--- a/dbaccess/source/core/dataaccess/makefile.mk
+++ b/dbaccess/source/core/dataaccess/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
index dc98f41b6..93177d05b 100644
--- a/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
+++ b/dbaccess/source/core/dataaccess/myucp_datasupplier.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -126,12 +126,10 @@ DataSupplier_Impl::~DataSupplier_Impl()
}
//=========================================================================
-//=========================================================================
//
// DataSupplier Implementation.
//
//=========================================================================
-//=========================================================================
DBG_NAME(DataSupplier)
DataSupplier::DataSupplier( const Reference< XMultiServiceFactory >& rxSMgr,
@@ -143,16 +141,12 @@ DataSupplier::DataSupplier( const Reference< XMultiServiceFactory >& rxSMgr,
}
-//=========================================================================
-// virtual
DataSupplier::~DataSupplier()
{
DBG_DTOR(DataSupplier,NULL);
}
-//=========================================================================
-// virtual
rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -183,9 +177,7 @@ rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
return rtl::OUString();
}
-//=========================================================================
-// virtual
-Reference< XContentIdentifier >
+Reference< XContentIdentifier >
DataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -210,9 +202,7 @@ DataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
return Reference< XContentIdentifier >();
}
-//=========================================================================
-// virtual
-Reference< XContent >
+Reference< XContent >
DataSupplier::queryContent( sal_uInt32 _nIndex )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -238,7 +228,7 @@ DataSupplier::queryContent( sal_uInt32 _nIndex )
sName = sName.getToken(0,'/',nIndex);
m_pImpl->m_aResults[ _nIndex ]->xContent = m_pImpl->m_xContent->getContent(sName);
-
+
xContent = m_pImpl->m_aResults[ _nIndex ]->xContent.get();
return xContent;
@@ -250,8 +240,6 @@ DataSupplier::queryContent( sal_uInt32 _nIndex )
return Reference< XContent >();
}
-//=========================================================================
-// virtual
sal_Bool DataSupplier::getResult( sal_uInt32 nIndex )
{
osl::ClearableGuard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -313,8 +301,6 @@ sal_Bool DataSupplier::getResult( sal_uInt32 nIndex )
return bFound;
}
-//=========================================================================
-// virtual
sal_uInt32 DataSupplier::totalCount()
{
osl::ClearableGuard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -350,23 +336,17 @@ sal_uInt32 DataSupplier::totalCount()
return m_pImpl->m_aResults.size();
}
-//=========================================================================
-// virtual
sal_uInt32 DataSupplier::currentCount()
{
return m_pImpl->m_aResults.size();
}
-//=========================================================================
-// virtual
sal_Bool DataSupplier::isCountFinal()
{
return m_pImpl->m_bCountFinal;
}
-//=========================================================================
-// virtual
-Reference< XRow >
+Reference< XRow >
DataSupplier::queryPropertyValues( sal_uInt32 nIndex )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -394,8 +374,6 @@ DataSupplier::queryPropertyValues( sal_uInt32 nIndex )
return Reference< XRow >();
}
-//=========================================================================
-// virtual
void DataSupplier::releasePropertyValues( sal_uInt32 nIndex )
{
osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
@@ -404,17 +382,12 @@ void DataSupplier::releasePropertyValues( sal_uInt32 nIndex )
m_pImpl->m_aResults[ nIndex ]->xRow = Reference< XRow >();
}
-//=========================================================================
-// virtual
void DataSupplier::close()
{
}
-//=========================================================================
-// virtual
void DataSupplier::validate()
throw( ResultSetException )
{
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/myucp_datasupplier.hxx b/dbaccess/source/core/dataaccess/myucp_datasupplier.hxx
index a9e7f0bdd..cf9c90383 100644
--- a/dbaccess/source/core/dataaccess/myucp_datasupplier.hxx
+++ b/dbaccess/source/core/dataaccess/myucp_datasupplier.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/dataaccess/myucp_resultset.cxx b/dbaccess/source/core/dataaccess/myucp_resultset.cxx
index c7e2794a4..d59336d87 100644
--- a/dbaccess/source/core/dataaccess/myucp_resultset.cxx
+++ b/dbaccess/source/core/dataaccess/myucp_resultset.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,12 +53,10 @@ using namespace ::com::sun::star::container;
using namespace dbaccess;
//=========================================================================
-//=========================================================================
//
// DynamicResultSet Implementation.
//
//=========================================================================
-//=========================================================================
DynamicResultSet::DynamicResultSet(
const Reference< XMultiServiceFactory >& rxSMgr,
@@ -76,7 +74,6 @@ DynamicResultSet::DynamicResultSet(
// Non-interface methods.
//
//=========================================================================
-
void DynamicResultSet::initStatic()
{
m_xResultSet1
@@ -88,7 +85,6 @@ void DynamicResultSet::initStatic()
m_xEnv );
}
-//=========================================================================
void DynamicResultSet::initDynamic()
{
m_xResultSet1
@@ -100,5 +96,4 @@ void DynamicResultSet::initDynamic()
m_xEnv );
m_xResultSet2 = m_xResultSet1;
}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/myucp_resultset.hxx b/dbaccess/source/core/dataaccess/myucp_resultset.hxx
index 2008dc6f2..f1457793a 100644
--- a/dbaccess/source/core/dataaccess/myucp_resultset.hxx
+++ b/dbaccess/source/core/dataaccess/myucp_resultset.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/inc/ContainerListener.hxx b/dbaccess/source/core/inc/ContainerListener.hxx
index 2c9fc6995..c528ba822 100644
--- a/dbaccess/source/core/inc/ContainerListener.hxx
+++ b/dbaccess/source/core/inc/ContainerListener.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,10 +33,8 @@
#include <cppuhelper/weak.hxx>
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OContainerListener
@@ -45,7 +43,7 @@ namespace dbaccess
, ::com::sun::star::container::XContainerApproveListener
> OContainerListener_BASE;
- /** is helper class to avoid a cycle in refcount
+ /** is helper class to avoid a cycle in refcount
*/
class OContainerListener : public OContainerListener_BASE
{
@@ -82,8 +80,7 @@ namespace dbaccess
protected:
virtual ~OContainerListener();
};
-//........................................................................
+
} // namespace dbaccess
-//........................................................................
-#endif // DBA_CONTAINERLISTENER_HXX
+#endif // DBA_CONTAINERLISTENER_HXX
diff --git a/dbaccess/source/core/inc/ContainerMediator.hxx b/dbaccess/source/core/inc/ContainerMediator.hxx
index a05522a4d..7081a9da6 100644
--- a/dbaccess/source/core/inc/ContainerMediator.hxx
+++ b/dbaccess/source/core/inc/ContainerMediator.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,11 +40,9 @@
#include <map>
-//........................................................................
namespace dbaccess
{
-//........................................................................
-
+
class OPropertyForward;
class OContainerMediator : public ::comphelper::OBaseMutex
@@ -98,8 +96,7 @@ namespace dbaccess
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDestination
);
};
-//........................................................................
+
} // namespace dbaccess
-//........................................................................
#endif // DBA_CONTAINERMEDIATOR_HXX
diff --git a/dbaccess/source/core/inc/ContentHelper.hxx b/dbaccess/source/core/inc/ContentHelper.hxx
index fd86bdd63..7d09bb584 100644
--- a/dbaccess/source/core/inc/ContentHelper.hxx
+++ b/dbaccess/source/core/inc/ContentHelper.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -126,7 +126,7 @@ namespace dbaccess
// helper
virtual void SAL_CALL disposing();
-
+
virtual void notifyDataSourceModified();
/**
@@ -193,13 +193,12 @@ namespace dbaccess
const ::comphelper::ComponentContext& getContext() const { return m_aContext; }
- inline TContentPtr getImpl() const { return m_pImpl; }
+ inline TContentPtr getImpl() const { return m_pImpl; }
protected:
virtual ::rtl::OUString determineContentType() const = 0;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
+
#endif // DBA_CONTENTHELPER_HXX
diff --git a/dbaccess/source/core/inc/DatabaseDataProvider.hxx b/dbaccess/source/core/inc/DatabaseDataProvider.hxx
index 85f956a0b..836f17fd2 100644
--- a/dbaccess/source/core/inc/DatabaseDataProvider.hxx
+++ b/dbaccess/source/core/inc/DatabaseDataProvider.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -260,7 +260,7 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> m_xParent;
::com::sun::star::uno::Sequence< ::rtl::OUString > m_MasterFields;
::com::sun::star::uno::Sequence< ::rtl::OUString > m_DetailFields;
-
+
::rtl::OUString m_Command;
::rtl::OUString m_DataSourceName;
::sal_Int32 m_CommandType;
diff --git a/dbaccess/source/core/inc/FilteredContainer.hxx b/dbaccess/source/core/inc/FilteredContainer.hxx
index 28ba22e17..67ad3d5b6 100644
--- a/dbaccess/source/core/inc/FilteredContainer.hxx
+++ b/dbaccess/source/core/inc/FilteredContainer.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,7 +50,7 @@ namespace dbaccess
::dbtools::IWarningsContainer* m_pWarningsContainer;
IRefreshListener* m_pRefreshListener;
oslInterlockedCount& m_nInAppend;
-
+
// holds the original container which where set in construct but they can be null
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xMasterContainer;
::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XConnection > m_xConnection;
diff --git a/dbaccess/source/core/inc/PropertyForward.hxx b/dbaccess/source/core/inc/PropertyForward.hxx
index 5334e59e1..33aae0329 100644
--- a/dbaccess/source/core/inc/PropertyForward.hxx
+++ b/dbaccess/source/core/inc/PropertyForward.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,10 +36,8 @@
#include <vector>
-//........................................................................
namespace dbaccess
{
-//........................................................................
// ===================================================================
// = OPropertyForward
@@ -77,8 +75,6 @@ namespace dbaccess
inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getDefinition() const { return m_xDest; }
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
-#endif // DBA_PROPERTYSETFORWARD_HXX
+#endif // DBA_PROPERTYSETFORWARD_HXX
diff --git a/dbaccess/source/core/inc/RefreshListener.hxx b/dbaccess/source/core/inc/RefreshListener.hxx
index b7a7330f2..fe6a59814 100644
--- a/dbaccess/source/core/inc/RefreshListener.hxx
+++ b/dbaccess/source/core/inc/RefreshListener.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,10 +36,8 @@ namespace com { namespace sun { namespace star { namespace container
}
}}}
-//.........................................................................
namespace dbaccess
{
-//.........................................................................
//=====================================================================
//= IRefreshListener
@@ -49,9 +47,7 @@ namespace dbaccess
public:
virtual void refresh(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rToBeRefreshed) = 0;
};
-//.........................................................................
+
} // namespace dbaccess
-//.........................................................................
#endif // DBA_CORE_REFRESHLISTENER_HXX
-
diff --git a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
index 21dfa7e5e..c42d8d183 100644
--- a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
+++ b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/inc/TableDeco.hxx b/dbaccess/source/core/inc/TableDeco.hxx
index 455a071aa..826f14c94 100644
--- a/dbaccess/source/core/inc/TableDeco.hxx
+++ b/dbaccess/source/core/inc/TableDeco.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -110,7 +110,7 @@ namespace dbaccess
sal_Int32 nHandle,
const ::com::sun::star::uno::Any& rValue
)
-
+
throw (::com::sun::star::uno::Exception);
virtual ~ODBTableDecorator();
@@ -129,7 +129,7 @@ namespace dbaccess
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxColumnDefinitions
) throw(::com::sun::star::sdbc::SQLException);
-
+
// ODescriptor
virtual void construct();
@@ -156,7 +156,7 @@ namespace dbaccess
virtual void SAL_CALL alterColumnByName( const ::rtl::OUString& _rName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDescriptor ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL alterColumnByIndex( sal_Int32 _nIndex, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDescriptor ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException);
- // XNamed
+ // XNamed
virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL setName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException);
// com::sun::star::lang::XUnoTunnel
diff --git a/dbaccess/source/core/inc/View.hxx b/dbaccess/source/core/inc/View.hxx
index 49d4b9190..2611b6ef8 100644
--- a/dbaccess/source/core/inc/View.hxx
+++ b/dbaccess/source/core/inc/View.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,10 +41,8 @@
#include <comphelper/uno3.hxx>
#include <cppuhelper/implbase1.hxx>
-//........................................................................
namespace dbaccess
{
-//........................................................................
//====================================================================
//= View
@@ -84,8 +82,6 @@ namespace dbaccess
using View_Base::getFastPropertyValue;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_VIEW_HXX
diff --git a/dbaccess/source/core/inc/callablestatement.hxx b/dbaccess/source/core/inc/callablestatement.hxx
index 3e3874d91..e772732b3 100644
--- a/dbaccess/source/core/inc/callablestatement.hxx
+++ b/dbaccess/source/core/inc/callablestatement.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/inc/column.hxx b/dbaccess/source/core/inc/column.hxx
index 9ca29d4b0..c34b9a48f 100644
--- a/dbaccess/source/core/inc/column.hxx
+++ b/dbaccess/source/core/inc/column.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -73,7 +73,6 @@ namespace dbaccess
::com::sun::star::container::XNamed
> OColumnBase;
- //------------------------------------------------------------
class OColumn :public comphelper::OBaseMutex
,public OColumnBase
,public ::comphelper::OPropertyContainer
@@ -163,7 +162,7 @@ namespace dbaccess
class OContainerMediator;
typedef ::cppu::ImplHelper1< ::com::sun::star::container::XChild > TXChild;
typedef connectivity::OColumnsHelper OColumns_BASE;
- //------------------------------------------------------------
+
class OColumns : public OColumns_BASE
,public TXChild
{
@@ -218,7 +217,7 @@ namespace dbaccess
OColumns(
::cppu::OWeakObject& _rParent,
- ::osl::Mutex& _rMutex,
+ ::osl::Mutex& _rMutex,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxDrvColumns,
sal_Bool _bCaseSensitive,
const ::std::vector< ::rtl::OUString> &_rVector,
@@ -255,4 +254,3 @@ namespace dbaccess
};
}
#endif // _DBA_COREAPI_COLUMN_HXX_
-
diff --git a/dbaccess/source/core/inc/columnsettings.hxx b/dbaccess/source/core/inc/columnsettings.hxx
index 032055d1b..7de06fa93 100644
--- a/dbaccess/source/core/inc/columnsettings.hxx
+++ b/dbaccess/source/core/inc/columnsettings.hxx
@@ -1,6 +1,6 @@
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,28 +31,26 @@
#include <com/sun/star/beans/XPropertySet.hpp>
/** === end UNO includes === **/
-//........................................................................
namespace dbaccess
{
-//........................................................................
// TODO: move the following to comphelper/propertycontainerhelper.hxx
class IPropertyContainer
{
public:
virtual void registerProperty(
- const ::rtl::OUString& _rName,
- sal_Int32 _nHandle,
- sal_Int32 _nAttributes,
- void* _pPointerToMember,
+ const ::rtl::OUString& _rName,
+ sal_Int32 _nHandle,
+ sal_Int32 _nAttributes,
+ void* _pPointerToMember,
const ::com::sun::star::uno::Type& _rMemberType
) = 0;
virtual void registerMayBeVoidProperty(
- const ::rtl::OUString& _rName,
- sal_Int32 _nHandle,
- sal_Int32 _nAttributes,
- ::com::sun::star::uno::Any* _pPointerToMember,
+ const ::rtl::OUString& _rName,
+ sal_Int32 _nHandle,
+ sal_Int32 _nAttributes,
+ ::com::sun::star::uno::Any* _pPointerToMember,
const ::com::sun::star::uno::Type& _rExpectedType
) = 0;
@@ -102,8 +100,6 @@ namespace dbaccess
static bool hasDefaultSettings( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn );
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // COLUMNSETTINGS_HXX
diff --git a/dbaccess/source/core/inc/commandbase.hxx b/dbaccess/source/core/inc/commandbase.hxx
index 3d12602f1..1f1a2949c 100644
--- a/dbaccess/source/core/inc/commandbase.hxx
+++ b/dbaccess/source/core/inc/commandbase.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,10 +31,8 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= OCommandBase - a base class (in fact just a container for some members)
@@ -44,7 +42,7 @@ class OCommandBase
{
public: // need public access
// <properties>
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>
m_aLayoutInformation;
::rtl::OUString m_sCommand;
sal_Bool m_bEscapeProcessing; // no BitField ! so it can be used with a OPropertyStateContainer
@@ -58,10 +56,6 @@ protected:
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_CORE_COMMANDBASE_HXX_
-
-
diff --git a/dbaccess/source/core/inc/composertools.hxx b/dbaccess/source/core/inc/composertools.hxx
index 2d6257d1e..4febd4c93 100644
--- a/dbaccess/source/core/inc/composertools.hxx
+++ b/dbaccess/source/core/inc/composertools.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,10 +35,8 @@
#include <functional>
-//........................................................................
namespace dbaccess
{
-//........................................................................
//====================================================================
//= TokenComposer
@@ -132,9 +130,6 @@ namespace dbaccess
}
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_SOURCE_CORE_INC_COMPOSERTOOLS_HXX
-
diff --git a/dbaccess/source/core/inc/containerapprove.hxx b/dbaccess/source/core/inc/containerapprove.hxx
index 9ecfe1c98..e9bebd874 100644
--- a/dbaccess/source/core/inc/containerapprove.hxx
+++ b/dbaccess/source/core/inc/containerapprove.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,10 +34,8 @@
#include <boost/shared_ptr.hpp>
-//........................................................................
namespace dbaccess
{
-//........................................................................
//====================================================================
//= IContainerApprove
@@ -70,9 +68,6 @@ namespace dbaccess
typedef ::boost::shared_ptr< IContainerApprove > PContainerApprove;
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_CONTAINERAPPROVE_HXX
-
diff --git a/dbaccess/source/core/inc/core_resource.hrc b/dbaccess/source/core/inc/core_resource.hrc
index c438314d6..77745302a 100644
--- a/dbaccess/source/core/inc/core_resource.hrc
+++ b/dbaccess/source/core/inc/core_resource.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -32,10 +32,8 @@
#include <svl/solar.hrc>
#endif
-//------------------------------------------------------------------------------
#define RID_CORE_STRINGS_START RID_DBACCESS_START
-//------------------------------------------------------------------------------
//- String-IDs
#define RID_STR_TRIED_OPEN_TABLE ( RID_CORE_STRINGS_START + 0 )
#define RID_STR_CONNECTION_INVALID ( RID_CORE_STRINGS_START + 1 )
@@ -110,4 +108,3 @@
#define RID_NO_SUCH_DATA_SOURCE ( RID_CORE_STRINGS_START + 67 )
#endif // _DBA_CORE_RESOURCE_HRC_
-
diff --git a/dbaccess/source/core/inc/core_resource.hxx b/dbaccess/source/core/inc/core_resource.hxx
index 695e61f20..ad114d6ce 100644
--- a/dbaccess/source/core/inc/core_resource.hxx
+++ b/dbaccess/source/core/inc/core_resource.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,7 +33,7 @@
#include <sal/macros.h>
class ResMgr;
-//.........................................................................
+
namespace dbaccess
{
@@ -52,7 +52,7 @@ namespace dbaccess
friend class OModuleClient;
static ::osl::Mutex s_aMutex; /// access safety
static sal_Int32 s_nClients; /// number of registered clients
- static ResMgr* m_pImpl;
+ static ResMgr* m_pImpl;
private:
// no instantiation allowed
@@ -111,7 +111,7 @@ namespace dbaccess
//=========================================================================
//= OModuleClient
//=========================================================================
- /** base class for objects which uses any global module-specific ressources
+ /** base class for objects which uses any global module-specific ressources
*/
class OModuleClient
{
@@ -119,11 +119,6 @@ namespace dbaccess
OModuleClient() { ResourceManager::registerClient(); }
~OModuleClient() { ResourceManager::revokeClient(); }
};
-
-
-//.........................................................................
}
-//.........................................................................
#endif // _DBA_CORE_RESOURCE_HXX_
-
diff --git a/dbaccess/source/core/inc/datasettings.hxx b/dbaccess/source/core/inc/datasettings.hxx
index 795dc22d9..0749c923d 100644
--- a/dbaccess/source/core/inc/datasettings.hxx
+++ b/dbaccess/source/core/inc/datasettings.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,10 +35,8 @@
#include <rtl/ustring.hxx>
#include <comphelper/propertystatecontainer.hxx>
-//........................................................................
namespace dbaccess
{
-//........................................................................
//==========================================================================
//= ODataSettings_Base - a base class which implements the property member
@@ -89,9 +87,6 @@ protected:
void registerPropertiesFor(ODataSettings_Base* _pItem);
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_CORE_DATASETTINGS_HXX_
-
diff --git a/dbaccess/source/core/inc/dbamiscres.hrc b/dbaccess/source/core/inc/dbamiscres.hrc
index b1eb879b0..dbb4713c0 100644
--- a/dbaccess/source/core/inc/dbamiscres.hrc
+++ b/dbaccess/source/core/inc/dbamiscres.hrc
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,16 +47,16 @@
#define STR_OUTLOOK 15
#define STR_OUTLOOKEXP 16
#define STR_EVOLUTION 17
-#define STR_EVOLUTION_GROUPWISE 18
+#define STR_EVOLUTION_GROUPWISE 18
#define STR_EVOLUTION_LDAP 19
#define STR_KAB 20
#define STR_MACAB 21
#define STR_EMBEDDED_HSQLDB 22
#define STR_THUNDERBIRD 23
#define STR_MYSQL_NATIVE 24
-
+
#define STR_END STR_MYSQL_NATIVE + 1
-
-#endif // _DBA_MISCRES_HRC_
+
+#endif // _DBA_MISCRES_HRC_
diff --git a/dbaccess/source/core/inc/definitioncolumn.hxx b/dbaccess/source/core/inc/definitioncolumn.hxx
index 462e273d0..e2812367f 100644
--- a/dbaccess/source/core/inc/definitioncolumn.hxx
+++ b/dbaccess/source/core/inc/definitioncolumn.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/inc/definitioncontainer.hxx b/dbaccess/source/core/inc/definitioncontainer.hxx
index 0112cfa6a..eb6986fac 100644
--- a/dbaccess/source/core/inc/definitioncontainer.hxx
+++ b/dbaccess/source/core/inc/definitioncontainer.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,10 +47,9 @@
#include <comphelper/uno3.hxx>
#include <rtl/ref.hxx>
#include "apitools.hxx"
-//........................................................................
+
namespace dbaccess
{
-//........................................................................
class ODefinitionContainer_Impl : public OContentHelper_Impl
{
@@ -329,9 +328,6 @@ private:
}
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_CORE_DEFINITIONCONTAINER_HXX_
-
diff --git a/dbaccess/source/core/inc/module_dba.hxx b/dbaccess/source/core/inc/module_dba.hxx
index ef9a8cd75..df70bf259 100644
--- a/dbaccess/source/core/inc/module_dba.hxx
+++ b/dbaccess/source/core/inc/module_dba.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,16 +30,11 @@
#include <unotools/componentresmodule.hxx>
-//........................................................................
namespace dba
{
-//........................................................................
DEFINE_MODULE( DbaModule, DbaClient, DbaRes )
-//........................................................................
} // namespace sdbtools
-//........................................................................
#endif // DBACCESS_MODULE_DBA_HXX
-
diff --git a/dbaccess/source/core/inc/object.hxx b/dbaccess/source/core/inc/object.hxx
index 9d2032d88..917cc9e05 100644
--- a/dbaccess/source/core/inc/object.hxx
+++ b/dbaccess/source/core/inc/object.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/inc/objectnameapproval.hxx b/dbaccess/source/core/inc/objectnameapproval.hxx
index 31cd7c369..3db920ac9 100644
--- a/dbaccess/source/core/inc/objectnameapproval.hxx
+++ b/dbaccess/source/core/inc/objectnameapproval.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,10 +34,8 @@
#include <com/sun/star/sdbc/XConnection.hpp>
/** === end UNO includes === **/
-//........................................................................
namespace dbaccess
{
-//........................................................................
//====================================================================
//= ObjectNameApproval
@@ -76,7 +74,7 @@ namespace dbaccess
ObjectNameApproval(
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection,
ObjectType _eType
- );
+ );
virtual ~ObjectNameApproval();
// IContainerApprove
@@ -84,8 +82,6 @@ namespace dbaccess
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_OBJECTNAMEAPPROVAL_HXX
diff --git a/dbaccess/source/core/inc/preparedstatement.hxx b/dbaccess/source/core/inc/preparedstatement.hxx
index 2823a4f4e..9177c6cd6 100644
--- a/dbaccess/source/core/inc/preparedstatement.hxx
+++ b/dbaccess/source/core/inc/preparedstatement.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/inc/querycomposer.hxx b/dbaccess/source/core/inc/querycomposer.hxx
index 9bc59155a..1a56370c3 100644
--- a/dbaccess/source/core/inc/querycomposer.hxx
+++ b/dbaccess/source/core/inc/querycomposer.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/inc/querycontainer.hxx b/dbaccess/source/core/inc/querycontainer.hxx
index 54dd2b819..2be7cf20a 100644
--- a/dbaccess/source/core/inc/querycontainer.hxx
+++ b/dbaccess/source/core/inc/querycontainer.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -60,10 +60,8 @@ namespace dbtools
class IWarningsContainer;
}
-//........................................................................
namespace dbaccess
{
-//........................................................................
typedef ::cppu::ImplHelper5 < ::com::sun::star::container::XContainerListener
, ::com::sun::star::container::XContainerApproveListener
@@ -93,7 +91,6 @@ namespace dbaccess
OContainerListener* m_pCommandsListener;
- // ------------------------------------------------------------------------
/** a class which automatically resets m_eDoingCurrently in it's destructor
*/
class OAutoActionReset; // just for the following friend declaration
@@ -119,7 +116,7 @@ namespace dbaccess
@param _pWarnings
specifies a warnings container (May be <NULL/>)
-
+
Any errors which occur during the lifetime of the query container,
which cannot be reported as exceptionts (for instance in methods where throwing an SQLException is
not allowed) will be appended to this container.</p>
@@ -131,7 +128,7 @@ namespace dbaccess
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
::dbtools::IWarningsContainer* _pWarnings
);
-
+
DECLARE_XINTERFACE( )
DECLARE_XTYPEPROVIDER( )
DECLARE_SERVICE_INFO();
@@ -181,10 +178,6 @@ namespace dbaccess
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent > implCreateWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent >& _rxCommandDesc);
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // _DBA_CORE_QUERYCONTAINER_HXX_
-
-
diff --git a/dbaccess/source/core/inc/recovery/dbdocrecovery.hxx b/dbaccess/source/core/inc/recovery/dbdocrecovery.hxx
index afc3ba88a..14baf5357 100644
--- a/dbaccess/source/core/inc/recovery/dbdocrecovery.hxx
+++ b/dbaccess/source/core/inc/recovery/dbdocrecovery.hxx
@@ -1,6 +1,6 @@
/*************************************************************************
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-*
+*
* Copyright 2009 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,10 +41,8 @@ namespace comphelper
class ComponentContext;
}
-//........................................................................
namespace dbaccess
{
-//........................................................................
//====================================================================
//= DatabaseDocumentRecovery
@@ -85,8 +83,6 @@ namespace dbaccess
const ::std::auto_ptr< DatabaseDocumentRecovery_Data > m_pData;
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_DBDOCRECOVERY_HXX
diff --git a/dbaccess/source/core/inc/sdbcoretools.hxx b/dbaccess/source/core/inc/sdbcoretools.hxx
index a5f7ad284..65ea32b8c 100644
--- a/dbaccess/source/core/inc/sdbcoretools.hxx
+++ b/dbaccess/source/core/inc/sdbcoretools.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,21 +42,14 @@ namespace comphelper
class ComponentContext;
}
-//.........................................................................
namespace dbaccess
{
-//.........................................................................
- // -----------------------------------------------------------------------------
void notifyDataSourceModified(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxObject,sal_Bool _bModified);
- // -----------------------------------------------------------------------------
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
getDataSource( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxDependentObject );
- // -----------------------------------------------------------------------------
-
- // -----------------------------------------------------------------------------
/** retrieves a to-be-displayed string for a given caught exception;
*/
::rtl::OUString extractExceptionMessage( const ::comphelper::ComponentContext& _rContext, const ::com::sun::star::uno::Any& _rError );
@@ -82,7 +75,5 @@ namespace dbaccess
}
} // namespace dbaccess
-//.........................................................................
#endif // DBACORE_SDBCORETOOLS_HXX
-
diff --git a/dbaccess/source/core/inc/statement.hxx b/dbaccess/source/core/inc/statement.hxx
index f841554ce..5b950a99d 100644
--- a/dbaccess/source/core/inc/statement.hxx
+++ b/dbaccess/source/core/inc/statement.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -73,7 +73,7 @@ protected:
public:
OStatementBase(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > & _xConn,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & _xStatement);
-
+
// ::com::sun::star::lang::XTypeProvider
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException);
diff --git a/dbaccess/source/core/inc/table.hxx b/dbaccess/source/core/inc/table.hxx
index ec35f805d..c5e8e07cf 100644
--- a/dbaccess/source/core/inc/table.hxx
+++ b/dbaccess/source/core/inc/table.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/inc/tablecontainer.hxx b/dbaccess/source/core/inc/tablecontainer.hxx
index 592f1e946..7b4ff3740 100644
--- a/dbaccess/source/core/inc/tablecontainer.hxx
+++ b/dbaccess/source/core/inc/tablecontainer.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,14 +55,14 @@ namespace dbaccess
class OTable;
class OTableContainer;
class OContainerMediator;
-
+
class OTableContainer : public OFilteredContainer,
public OTableContainer_Base
{
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > m_xTableDefinitions;
::rtl::Reference< OContainerMediator > m_pTableMediator;
sal_Bool m_bInDrop; // set when we are in the drop method
-
+
// OFilteredContainer
virtual void addMasterContainerListener();
diff --git a/dbaccess/source/core/inc/userinformation.hxx b/dbaccess/source/core/inc/userinformation.hxx
index 313995506..1792803fa 100644
--- a/dbaccess/source/core/inc/userinformation.hxx
+++ b/dbaccess/source/core/inc/userinformation.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/dbaccess/source/core/inc/veto.hxx b/dbaccess/source/core/inc/veto.hxx
index d87d9d0bb..ffdbf70cd 100644
--- a/dbaccess/source/core/inc/veto.hxx
+++ b/dbaccess/source/core/inc/veto.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,10 +34,8 @@
#include <cppuhelper/implbase1.hxx>
-//........................................................................
namespace dbaccess
{
-//........................................................................
//====================================================================
//= Veto
@@ -67,9 +65,6 @@ namespace dbaccess
Veto& operator=( const Veto& ); // never implemented
};
-//........................................................................
} // namespace dbaccess
-//........................................................................
#endif // DBACCESS_VETO_HXX
-
diff --git a/dbaccess/source/core/inc/viewcontainer.hxx b/dbaccess/source/core/inc/viewcontainer.hxx
index cb2c6bd8e..4f617ffe0 100644
--- a/dbaccess/source/core/inc/viewcontainer.hxx
+++ b/dbaccess/source/core/inc/viewcontainer.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -78,7 +78,7 @@ namespace dbaccess
oslInterlockedCount& _nInAppend
);
- virtual ~OViewContainer();
+ virtual ~OViewContainer();
protected:
// OFilteredContainer overridables