summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dbaccess/source/ui/app/AppController.cxx2
-rw-r--r--dbaccess/source/ui/app/AppControllerDnD.cxx16
-rw-r--r--dbaccess/source/ui/browser/dbexchange.cxx36
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx48
-rw-r--r--dbaccess/source/ui/misc/TableCopyHelper.cxx24
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx20
-rw-r--r--include/svx/dataaccessdescriptor.hxx30
-rw-r--r--include/svx/dbaexchange.hxx4
-rw-r--r--reportdesign/source/ui/dlg/AddField.cxx14
-rw-r--r--reportdesign/source/ui/dlg/Formula.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx8
-rw-r--r--sc/source/filter/xml/XMLExportDatabaseRanges.cxx4
-rw-r--r--sc/source/ui/docshell/dbdocfun.cxx4
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx16
-rw-r--r--sc/source/ui/unoobj/datauno.cxx4
-rw-r--r--sc/source/ui/unoobj/dispuno.cxx10
-rw-r--r--svx/source/fmcomp/dbaexchange.cxx74
-rw-r--r--svx/source/fmcomp/dbaobjectex.cxx4
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx34
-rw-r--r--svx/source/form/dataaccessdescriptor.cxx63
-rw-r--r--svx/source/form/fmview.cxx6
-rw-r--r--svx/source/form/fmvwimp.cxx8
-rw-r--r--svx/source/form/tabwin.cxx18
-rw-r--r--sw/source/core/unocore/unofield.cxx4
-rw-r--r--sw/source/uibase/app/apphdl.cxx14
-rw-r--r--sw/source/uibase/app/swmodul1.cxx4
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx44
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx14
-rw-r--r--sw/source/uibase/shells/textsh2.cxx8
-rw-r--r--sw/source/uibase/uno/unodispatch.cxx8
-rw-r--r--sw/source/uibase/uno/unomailmerge.cxx16
-rw-r--r--sw/source/uibase/utlui/condedit.cxx4
32 files changed, 284 insertions, 281 deletions
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index d1206dcbc959..18c2fe562bcd 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -2447,7 +2447,7 @@ sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt )
sal_Int8 nAction = _rEvt.mnAction;
Reference<XContent> xContent;
- m_aAsyncDrop.aDroppedData[daComponent] >>= xContent;
+ m_aAsyncDrop.aDroppedData[DataAccessDescriptorProperty::Component] >>= xContent;
if ( xContent.is() )
{
OUString sName = xContent->getIdentifier()->getContentIdentifier();
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 3e2141f6962b..692d9868a024 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -586,8 +586,8 @@ bool OApplicationController::paste( ElementType _eType, const svx::ODataAccessDe
if ( _eType == E_QUERY )
{
sal_Int32 nCommandType = CommandType::TABLE;
- if ( _rPasteData.has(daCommandType) )
- _rPasteData[daCommandType] >>= nCommandType;
+ if ( _rPasteData.has(DataAccessDescriptorProperty::CommandType) )
+ _rPasteData[DataAccessDescriptorProperty::CommandType] >>= nCommandType;
if ( CommandType::QUERY == nCommandType || CommandType::COMMAND == nCommandType )
{
@@ -596,9 +596,9 @@ bool OApplicationController::paste( ElementType _eType, const svx::ODataAccessDe
OUString sCommand;
bool bEscapeProcessing = true;
- _rPasteData[daCommand] >>= sCommand;
- if ( _rPasteData.has(daEscapeProcessing) )
- _rPasteData[daEscapeProcessing] >>= bEscapeProcessing;
+ _rPasteData[DataAccessDescriptorProperty::Command] >>= sCommand;
+ if ( _rPasteData.has(DataAccessDescriptorProperty::EscapeProcessing) )
+ _rPasteData[DataAccessDescriptorProperty::EscapeProcessing] >>= bEscapeProcessing;
// plausibility check
bool bValidDescriptor = false;
@@ -749,10 +749,10 @@ bool OApplicationController::paste( ElementType _eType, const svx::ODataAccessDe
OSL_TRACE("There should be a sequence in it!");
return true;
}
- else if ( _rPasteData.has(daComponent) ) // forms or reports
+ else if ( _rPasteData.has(DataAccessDescriptorProperty::Component) ) // forms or reports
{
Reference<XContent> xContent;
- _rPasteData[daComponent] >>= xContent;
+ _rPasteData[DataAccessDescriptorProperty::Component] >>= xContent;
return insertHierachyElement(_eType,_sParentFolder,Reference<XNameAccess>(xContent,UNO_QUERY).is(),xContent,_bMove);
}
}
@@ -815,7 +815,7 @@ IMPL_LINK_NOARG_TYPED( OApplicationController, OnAsyncDrop, void*, void )
&& m_aAsyncDrop.nAction == DND_ACTION_MOVE )
{
Reference<XContent> xContent;
- m_aAsyncDrop.aDroppedData[daComponent] >>= xContent;
+ m_aAsyncDrop.aDroppedData[DataAccessDescriptorProperty::Component] >>= xContent;
::std::vector< OUString> aList;
sal_Int32 nIndex = 0;
OUString sName = xContent->getIdentifier()->getContentIdentifier();
diff --git a/dbaccess/source/ui/browser/dbexchange.cxx b/dbaccess/source/ui/browser/dbexchange.cxx
index 9cf3126d0306..00e9ab6c95e6 100644
--- a/dbaccess/source/ui/browser/dbexchange.cxx
+++ b/dbaccess/source/ui/browser/dbexchange.cxx
@@ -104,7 +104,7 @@ namespace dbaui
osl_atomic_increment( &m_refCount );
Reference<XConnection> xConnection;
- getDescriptor()[ daConnection ] >>= xConnection;
+ getDescriptor()[ DataAccessDescriptorProperty::Connection ] >>= xConnection;
lcl_setListener( xConnection, this, true );
// do not pass the form itself as source result set, since the client might operate on the form, which
@@ -116,9 +116,9 @@ namespace dbaui
OSL_ENSURE( xResultSetClone.is(), "ODataClipboard::ODataClipboard: could not clone the form's result set" );
lcl_setListener( xResultSetClone, this, true );
- getDescriptor()[daCursor] <<= xResultSetClone;
- getDescriptor()[daSelection] <<= i_rSelectedRows;
- getDescriptor()[daBookmarkSelection]<<= i_bBookmarkSelection;
+ getDescriptor()[DataAccessDescriptorProperty::Cursor] <<= xResultSetClone;
+ getDescriptor()[DataAccessDescriptorProperty::Selection] <<= i_rSelectedRows;
+ getDescriptor()[DataAccessDescriptorProperty::BookmarkSelection]<<= i_bBookmarkSelection;
addCompatibleSelectionDescription( i_rSelectedRows );
if ( xConnection.is() && i_rORB.is() )
@@ -194,15 +194,15 @@ namespace dbaui
m_pRtf.clear();
}
- if ( getDescriptor().has( daConnection ) )
+ if ( getDescriptor().has( DataAccessDescriptorProperty::Connection ) )
{
- Reference<XConnection> xConnection( getDescriptor()[daConnection], UNO_QUERY );
+ Reference<XConnection> xConnection( getDescriptor()[DataAccessDescriptorProperty::Connection], UNO_QUERY );
lcl_setListener( xConnection, this, false );
}
- if ( getDescriptor().has( daCursor ) )
+ if ( getDescriptor().has( DataAccessDescriptorProperty::Cursor ) )
{
- Reference< XResultSet > xResultSet( getDescriptor()[ daCursor ], UNO_QUERY );
+ Reference< XResultSet > xResultSet( getDescriptor()[ DataAccessDescriptorProperty::Cursor ], UNO_QUERY );
lcl_setListener( xResultSet, this, false );
}
@@ -213,26 +213,26 @@ namespace dbaui
{
ODataAccessDescriptor& rDescriptor( getDescriptor() );
- if ( rDescriptor.has( daConnection ) )
+ if ( rDescriptor.has( DataAccessDescriptorProperty::Connection ) )
{
- Reference< XConnection > xConnection( rDescriptor[daConnection], UNO_QUERY );
+ Reference< XConnection > xConnection( rDescriptor[DataAccessDescriptorProperty::Connection], UNO_QUERY );
if ( xConnection == i_rSource.Source )
{
- rDescriptor.erase( daConnection );
+ rDescriptor.erase( DataAccessDescriptorProperty::Connection );
}
}
- if ( rDescriptor.has( daCursor ) )
+ if ( rDescriptor.has( DataAccessDescriptorProperty::Cursor ) )
{
- Reference< XResultSet > xResultSet( rDescriptor[ daCursor ], UNO_QUERY );
+ Reference< XResultSet > xResultSet( rDescriptor[ DataAccessDescriptorProperty::Cursor ], UNO_QUERY );
if ( xResultSet == i_rSource.Source )
{
- rDescriptor.erase( daCursor );
+ rDescriptor.erase( DataAccessDescriptorProperty::Cursor );
// Selection and BookmarkSelection are meaningless without a result set
- if ( rDescriptor.has( daSelection ) )
- rDescriptor.erase( daSelection );
- if ( rDescriptor.has( daBookmarkSelection ) )
- rDescriptor.erase( daBookmarkSelection );
+ if ( rDescriptor.has( DataAccessDescriptorProperty::Selection ) )
+ rDescriptor.erase( DataAccessDescriptorProperty::Selection );
+ if ( rDescriptor.has( DataAccessDescriptorProperty::BookmarkSelection ) )
+ rDescriptor.erase( DataAccessDescriptorProperty::BookmarkSelection );
}
}
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index c38e5b4b93ca..a0d9ac0f12bc 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1002,11 +1002,11 @@ void SAL_CALL SbaTableQueryBrowser::statusChanged( const FeatureStateEvent& _rEv
OSL_ENSURE(bProperFormat, "SbaTableQueryBrowser::statusChanged: need a data access descriptor here!");
m_aDocumentDataSource.initializeFrom(aDescriptor);
- OSL_ENSURE( ( m_aDocumentDataSource.has(daDataSource)
- || m_aDocumentDataSource.has(daDatabaseLocation)
+ OSL_ENSURE( ( m_aDocumentDataSource.has(DataAccessDescriptorProperty::DataSource)
+ || m_aDocumentDataSource.has(DataAccessDescriptorProperty::DatabaseLocation)
)
- && m_aDocumentDataSource.has(daCommand)
- && m_aDocumentDataSource.has(daCommandType),
+ && m_aDocumentDataSource.has(DataAccessDescriptorProperty::Command)
+ && m_aDocumentDataSource.has(DataAccessDescriptorProperty::CommandType),
"SbaTableQueryBrowser::statusChanged: incomplete descriptor!");
// check if we know the object which is set as document data source
@@ -1041,13 +1041,13 @@ void SbaTableQueryBrowser::checkDocumentDataSource()
// TODO: should we expand the object container? This may be too expensive just for checking ....
else
{
- if ((nullptr == pObjectEntry) && m_aDocumentDataSource.has(daCommandType) && m_aDocumentDataSource.has(daCommand))
+ if ((nullptr == pObjectEntry) && m_aDocumentDataSource.has(DataAccessDescriptorProperty::CommandType) && m_aDocumentDataSource.has(DataAccessDescriptorProperty::Command))
{ // maybe we have a command to be displayed ?
sal_Int32 nCommandType = CommandType::TABLE;
- m_aDocumentDataSource[daCommandType] >>= nCommandType;
+ m_aDocumentDataSource[DataAccessDescriptorProperty::CommandType] >>= nCommandType;
OUString sCommand;
- m_aDocumentDataSource[daCommand] >>= sCommand;
+ m_aDocumentDataSource[DataAccessDescriptorProperty::Command] >>= sCommand;
bKnownDocDataSource = (CommandType::COMMAND == nCommandType) && (!sCommand.isEmpty());
}
@@ -1065,15 +1065,15 @@ void SbaTableQueryBrowser::checkDocumentDataSource()
void SbaTableQueryBrowser::extractDescriptorProps(const svx::ODataAccessDescriptor& _rDescriptor, OUString& _rDataSource, OUString& _rCommand, sal_Int32& _rCommandType, bool& _rEscapeProcessing)
{
_rDataSource = _rDescriptor.getDataSource();
- if ( _rDescriptor.has(daCommand) )
- _rDescriptor[daCommand] >>= _rCommand;
- if ( _rDescriptor.has(daCommandType) )
- _rDescriptor[daCommandType] >>= _rCommandType;
+ if ( _rDescriptor.has(DataAccessDescriptorProperty::Command) )
+ _rDescriptor[DataAccessDescriptorProperty::Command] >>= _rCommand;
+ if ( _rDescriptor.has(DataAccessDescriptorProperty::CommandType) )
+ _rDescriptor[DataAccessDescriptorProperty::CommandType] >>= _rCommandType;
// escape processing is the only one allowed not to be present
_rEscapeProcessing = true;
- if (_rDescriptor.has(daEscapeProcessing))
- _rEscapeProcessing = ::cppu::any2bool(_rDescriptor[daEscapeProcessing]);
+ if (_rDescriptor.has(DataAccessDescriptorProperty::EscapeProcessing))
+ _rEscapeProcessing = ::cppu::any2bool(_rDescriptor[DataAccessDescriptorProperty::EscapeProcessing]);
}
namespace
@@ -1446,7 +1446,7 @@ sal_Bool SAL_CALL SbaTableQueryBrowser::select( const Any& _rSelection ) throw (
}
// check the presence of the props we need
- if ( !(aDescriptor.has(daDataSource) || aDescriptor.has(daDatabaseLocation)) || !aDescriptor.has(daCommand) || !aDescriptor.has(daCommandType))
+ if ( !(aDescriptor.has(DataAccessDescriptorProperty::DataSource) || aDescriptor.has(DataAccessDescriptorProperty::DatabaseLocation)) || !aDescriptor.has(DataAccessDescriptorProperty::Command) || !aDescriptor.has(DataAccessDescriptorProperty::CommandType))
throw IllegalArgumentException(OUString(), *this, 1);
// TODO: error message
@@ -1465,8 +1465,8 @@ Any SAL_CALL SbaTableQueryBrowser::getSelection( ) throw (RuntimeException, std
Reference< XPropertySet > aFormProps(getRowSet(), UNO_QUERY);
ODataAccessDescriptor aDescriptor(aFormProps);
// remove properties which are not part of our "selection"
- aDescriptor.erase(daConnection);
- aDescriptor.erase(daCursor);
+ aDescriptor.erase(DataAccessDescriptorProperty::Connection);
+ aDescriptor.erase(DataAccessDescriptorProperty::Cursor);
aReturn <<= aDescriptor.createPropertyValueSequence();
}
@@ -1974,14 +1974,14 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue
xProp->getPropertyValue(PROPERTY_DATASOURCENAME) >>= sDataSourceName;
aDescriptor.setDataSource(sDataSourceName);
- aDescriptor[daCommand] = xProp->getPropertyValue(PROPERTY_COMMAND);
- aDescriptor[daCommandType] = xProp->getPropertyValue(PROPERTY_COMMAND_TYPE);
- aDescriptor[daConnection] = xProp->getPropertyValue(PROPERTY_ACTIVE_CONNECTION);
- aDescriptor[daCursor] <<= xCursorClone;
+ aDescriptor[DataAccessDescriptorProperty::Command] = xProp->getPropertyValue(PROPERTY_COMMAND);
+ aDescriptor[DataAccessDescriptorProperty::CommandType] = xProp->getPropertyValue(PROPERTY_COMMAND_TYPE);
+ aDescriptor[DataAccessDescriptorProperty::Connection] = xProp->getPropertyValue(PROPERTY_ACTIVE_CONNECTION);
+ aDescriptor[DataAccessDescriptorProperty::Cursor] <<= xCursorClone;
if ( aSelection.getLength() )
{
- aDescriptor[daSelection] <<= aSelection;
- aDescriptor[daBookmarkSelection] <<= false;
+ aDescriptor[DataAccessDescriptorProperty::Selection] <<= aSelection;
+ aDescriptor[DataAccessDescriptorProperty::BookmarkSelection] <<= false;
// these are selection indices
// before we change this, all clients have to be adjusted
// so that they recognize the new BookmarkSelection property!
@@ -3543,8 +3543,8 @@ bool SbaTableQueryBrowser::implGetQuerySignature( OUString& _rCommand, bool& _bE
Reference< XPropertySet > xRowsetProps( getRowSet(), UNO_QUERY );
ODataAccessDescriptor aDesc( xRowsetProps );
sDataSourceName = aDesc.getDataSource();
- aDesc[ daCommand ] >>= sCommand;
- aDesc[ daCommandType ] >>= nCommandType;
+ aDesc[ DataAccessDescriptorProperty::Command ] >>= sCommand;
+ aDesc[ DataAccessDescriptorProperty::CommandType ] >>= nCommandType;
// do we need to do anything?
if ( CommandType::QUERY != nCommandType )
diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index 1b14e462b7c9..527072d59c04 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -140,37 +140,37 @@ void OTableCopyHelper::pasteTable( const svx::ODataAccessDescriptor& _rPasteData
OUString sSrcDataSourceName = _rPasteData.getDataSource();
OUString sCommand;
- _rPasteData[ daCommand ] >>= sCommand;
+ _rPasteData[ DataAccessDescriptorProperty::Command ] >>= sCommand;
Reference<XConnection> xSrcConnection;
- if ( _rPasteData.has(daConnection) )
+ if ( _rPasteData.has(DataAccessDescriptorProperty::Connection) )
{
- OSL_VERIFY( _rPasteData[daConnection] >>= xSrcConnection );
+ OSL_VERIFY( _rPasteData[DataAccessDescriptorProperty::Connection] >>= xSrcConnection );
}
Reference< XResultSet > xResultSet;
- if ( _rPasteData.has(daCursor) )
+ if ( _rPasteData.has(DataAccessDescriptorProperty::Cursor) )
{
- OSL_VERIFY( _rPasteData[ daCursor ] >>= xResultSet );
+ OSL_VERIFY( _rPasteData[ DataAccessDescriptorProperty::Cursor ] >>= xResultSet );
}
Sequence< Any > aSelection;
- if ( _rPasteData.has( daSelection ) )
+ if ( _rPasteData.has( DataAccessDescriptorProperty::Selection ) )
{
- OSL_VERIFY( _rPasteData[ daSelection ] >>= aSelection );
- OSL_ENSURE( _rPasteData.has( daBookmarkSelection ), "OTableCopyHelper::pasteTable: you should specify BookmarkSelection, too, to be on the safe side!" );
+ OSL_VERIFY( _rPasteData[ DataAccessDescriptorProperty::Selection ] >>= aSelection );
+ OSL_ENSURE( _rPasteData.has( DataAccessDescriptorProperty::BookmarkSelection ), "OTableCopyHelper::pasteTable: you should specify BookmarkSelection, too, to be on the safe side!" );
}
bool bBookmarkSelection( true );
- if ( _rPasteData.has( daBookmarkSelection ) )
+ if ( _rPasteData.has( DataAccessDescriptorProperty::BookmarkSelection ) )
{
- OSL_VERIFY( _rPasteData[ daBookmarkSelection ] >>= bBookmarkSelection );
+ OSL_VERIFY( _rPasteData[ DataAccessDescriptorProperty::BookmarkSelection ] >>= bBookmarkSelection );
}
OSL_ENSURE( bBookmarkSelection, "OTableCopyHelper::pasteTable: working with selection-indicies (instead of bookmarks) is error-prone, and thus deprecated!" );
sal_Int32 nCommandType = CommandType::COMMAND;
- if ( _rPasteData.has(daCommandType) )
- _rPasteData[daCommandType] >>= nCommandType;
+ if ( _rPasteData.has(DataAccessDescriptorProperty::CommandType) )
+ _rPasteData[DataAccessDescriptorProperty::CommandType] >>= nCommandType;
insertTable( sSrcDataSourceName, xSrcConnection, sCommand, nCommandType,
xResultSet, aSelection, bBookmarkSelection,
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index 98a3312919be..cb7d8873356c 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -190,12 +190,12 @@ void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor
if ( !_bPlusDefaultInit )
{
m_sDataSourceName = _aDataDescriptor.getDataSource();
- _aDataDescriptor[daCommandType] >>= m_nCommandType;
- _aDataDescriptor[daCommand] >>= m_sName;
+ _aDataDescriptor[DataAccessDescriptorProperty::CommandType] >>= m_nCommandType;
+ _aDataDescriptor[DataAccessDescriptorProperty::Command] >>= m_sName;
// some additional information
- if(_aDataDescriptor.has(daConnection))
+ if(_aDataDescriptor.has(DataAccessDescriptorProperty::Connection))
{
- Reference< XConnection > xPureConn( _aDataDescriptor[daConnection], UNO_QUERY );
+ Reference< XConnection > xPureConn( _aDataDescriptor[DataAccessDescriptorProperty::Connection], UNO_QUERY );
m_xConnection.reset( xPureConn, SharedConnection::NoTakeOwnership );
Reference< XEventListener> xEvt(static_cast<cppu::OWeakObject*>(this),UNO_QUERY);
Reference< XComponent > xComponent(m_xConnection, UNO_QUERY);
@@ -203,15 +203,15 @@ void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor
xComponent->addEventListener(xEvt);
}
- if ( _aDataDescriptor.has( daSelection ) )
- _aDataDescriptor[ daSelection ] >>= m_aSelection;
+ if ( _aDataDescriptor.has( DataAccessDescriptorProperty::Selection ) )
+ _aDataDescriptor[ DataAccessDescriptorProperty::Selection ] >>= m_aSelection;
- if ( _aDataDescriptor.has( daBookmarkSelection ) )
- _aDataDescriptor[ daBookmarkSelection ] >>= m_bBookmarkSelection;
+ if ( _aDataDescriptor.has( DataAccessDescriptorProperty::BookmarkSelection ) )
+ _aDataDescriptor[ DataAccessDescriptorProperty::BookmarkSelection ] >>= m_bBookmarkSelection;
- if ( _aDataDescriptor.has( daCursor ) )
+ if ( _aDataDescriptor.has( DataAccessDescriptorProperty::Cursor ) )
{
- _aDataDescriptor[ daCursor ] >>= m_xResultSet;
+ _aDataDescriptor[ DataAccessDescriptorProperty::Cursor ] >>= m_xResultSet;
m_xRowLocate.set( m_xResultSet, UNO_QUERY );
}
diff --git a/include/svx/dataaccessdescriptor.hxx b/include/svx/dataaccessdescriptor.hxx
index fe04960c4bb4..802e58c96d2f 100644
--- a/include/svx/dataaccessdescriptor.hxx
+++ b/include/svx/dataaccessdescriptor.hxx
@@ -30,26 +30,26 @@ namespace svx
class ODADescriptorImpl;
//= DataAccessDescriptorProperty
- enum DataAccessDescriptorProperty
+ enum class DataAccessDescriptorProperty
{
- daDataSource, /// data source name (string)
- daDatabaseLocation, /// database file URL (string)
- daConnectionResource, /// database driver URL (string)
- daConnection, /// connection (XConnection)
+ DataSource, /// data source name (string)
+ DatabaseLocation, /// database file URL (string)
+ ConnectionResource, /// database driver URL (string)
+ Connection, /// connection (XConnection)
- daCommand, /// command (string)
- daCommandType, /// command type (long)
- daEscapeProcessing, /// escape processing (boolean)
- daFilter, /// additional filter (string)
- daCursor, /// the cursor (XResultSet)
+ Command, /// command (string)
+ CommandType, /// command type (long)
+ EscapeProcessing, /// escape processing (boolean)
+ Filter, /// additional filter (string)
+ Cursor, /// the cursor (XResultSet)
- daColumnName, /// column name (string)
- daColumnObject, /// column object (XPropertySet)
+ ColumnName, /// column name (string)
+ ColumnObject, /// column object (XPropertySet)
- daSelection, /// selection (sequence< any >)
- daBookmarkSelection, /// selection are bookmarks? (boolean)
+ Selection, /// selection (sequence< any >)
+ BookmarkSelection, /// selection are bookmarks? (boolean)
- daComponent /// component name (XContent)
+ Component /// component name (XContent)
};
//= ODataAccessDescriptor
diff --git a/include/svx/dbaexchange.hxx b/include/svx/dbaexchange.hxx
index b76ad73cbc13..8fd2ed77f4bf 100644
--- a/include/svx/dbaexchange.hxx
+++ b/include/svx/dbaexchange.hxx
@@ -76,7 +76,7 @@ namespace svx
@param _rDescriptor
The descriptor for the column. It must contain at least
<ul><li>information sufficient to create a connection, that is, either one of DataSource, DatabaseLocation,
- ConnectionResource, and daConnection</li>
+ ConnectionResource, and DataAccessDescriptorProperty::Connection</li>
<li>a Command</li>
<li>a CommandType</li>
<li>a ColumnName or ColumnObject</li>
@@ -244,7 +244,7 @@ namespace svx
void addCompatibleSelectionDescription(
const css::uno::Sequence< css::uno::Any >& _rSelRows
);
- // normally, a derived class could simply access getDescriptor[daSelection] and place the sequence therein
+ // normally, a derived class could simply access getDescriptor[DataAccessDescriptorProperty::Selection] and place the sequence therein
// but unfortunately, we have this damned compatible format, and this can't be accessed in
// derived classes (our class is the only one which should be contaminated with this)
diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx
index 3d7ee4f7f7c0..4a2e21a69ead 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -444,19 +444,19 @@ void OAddFieldWindow::fillDescriptor(SvTreeListEntry* _pSelected,svx::ODataAcces
{
uno::Reference<frame::XModel> xModel(xDocument->getDatabaseDocument(),uno::UNO_QUERY);
if ( xModel.is() )
- _rDescriptor[ daDatabaseLocation ] <<= xModel->getURL();
+ _rDescriptor[ DataAccessDescriptorProperty::DatabaseLocation ] <<= xModel->getURL();
}
}
- _rDescriptor[ svx::daCommand ] <<= GetCommand();
- _rDescriptor[ svx::daCommandType ] <<= GetCommandType();
- _rDescriptor[ svx::daEscapeProcessing ] <<= GetEscapeProcessing();
- _rDescriptor[ svx::daConnection ] <<= getConnection();
+ _rDescriptor[ svx::DataAccessDescriptorProperty::Command ] <<= GetCommand();
+ _rDescriptor[ svx::DataAccessDescriptorProperty::CommandType ] <<= GetCommandType();
+ _rDescriptor[ svx::DataAccessDescriptorProperty::EscapeProcessing ] <<= GetEscapeProcessing();
+ _rDescriptor[ svx::DataAccessDescriptorProperty::Connection ] <<= getConnection();
ColumnInfo* pInfo = static_cast<ColumnInfo*>(_pSelected->GetUserData());
- _rDescriptor[ svx::daColumnName ] <<= pInfo->sColumnName;
+ _rDescriptor[ svx::DataAccessDescriptorProperty::ColumnName ] <<= pInfo->sColumnName;
if ( m_xColumns->hasByName( pInfo->sColumnName ) )
- _rDescriptor[ svx::daColumnObject ] <<= m_xColumns->getByName(pInfo->sColumnName);
+ _rDescriptor[ svx::DataAccessDescriptorProperty::ColumnObject ] <<= m_xColumns->getByName(pInfo->sColumnName);
}
}
diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx
index 77c9cb0f05e3..1df8dbd9268e 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -227,7 +227,7 @@ IMPL_LINK_TYPED( FormulaDialog, OnClickHdl, OAddFieldWindow& ,_rAddFieldDlg, voi
aArgs[0].Value >>= aValue;
svx::ODataAccessDescriptor aDescriptor(aValue);
OUString sName;
- aDescriptor[ svx::daColumnName ] >>= sName;
+ aDescriptor[ svx::DataAccessDescriptorProperty::ColumnName ] >>= sName;
if ( !sName.isEmpty() )
{
sName = "[" + sName + "]";
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 60b8ddca3777..a62fdadc3271 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -3364,16 +3364,16 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
// clear all selections
getDesignView()->unmarkAllObjects();
- uno::Reference< beans::XPropertySet > xField( aDescriptor[ svx::daColumnObject ], uno::UNO_QUERY );
+ uno::Reference< beans::XPropertySet > xField( aDescriptor[ svx::DataAccessDescriptorProperty::ColumnObject ], uno::UNO_QUERY );
uno::Reference< lang::XComponent > xHoldAlive;
if ( !xField.is() )
{
OUString sCommand;
OUString sColumnName;
sal_Int32 nCommandType( -1 );
- OSL_VERIFY( aDescriptor[ svx::daCommand ] >>= sCommand );
- OSL_VERIFY( aDescriptor[ svx::daColumnName ] >>= sColumnName );
- OSL_VERIFY( aDescriptor[ svx::daCommandType ] >>= nCommandType );
+ OSL_VERIFY( aDescriptor[ svx::DataAccessDescriptorProperty::Command ] >>= sCommand );
+ OSL_VERIFY( aDescriptor[ svx::DataAccessDescriptorProperty::ColumnName ] >>= sColumnName );
+ OSL_VERIFY( aDescriptor[ svx::DataAccessDescriptorProperty::CommandType ] >>= nCommandType );
uno::Reference< container::XNameAccess > xColumns;
uno::Reference< sdbc::XConnection > xConnection( getConnection() );
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index f8cef27a78d8..8a627f117e3b 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -227,11 +227,11 @@ private:
svx::ODataAccessDescriptor aDescriptor;
aDescriptor.setDataSource(aParam.aDBName);
- if (aDescriptor.has(svx::daDataSource))
+ if (aDescriptor.has(svx::DataAccessDescriptorProperty::DataSource))
{
sDatabaseName = aParam.aDBName;
}
- else if (aDescriptor.has(svx::daConnectionResource))
+ else if (aDescriptor.has(svx::DataAccessDescriptorProperty::ConnectionResource))
{
sConRes = aParam.aDBName;
}
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 3dac972d1ec0..628b26cc0d71 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -1618,8 +1618,8 @@ void ScDBDocFunc::UpdateImport( const OUString& rTarget, const svx::ODataAccessD
OUString sDBTable;
sal_Int32 nCommandType = 0;
sDBName = rDescriptor.getDataSource();
- rDescriptor[svx::daCommand] >>= sDBTable;
- rDescriptor[svx::daCommandType] >>= nCommandType;
+ rDescriptor[svx::DataAccessDescriptorProperty::Command] >>= sDBTable;
+ rDescriptor[svx::DataAccessDescriptorProperty::CommandType] >>= nCommandType;
aImportParam.aDBName = sDBName;
aImportParam.bSql = ( nCommandType == sdb::CommandType::COMMAND );
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 33ca862a8d7b..7c91d1d462a9 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -88,8 +88,8 @@ void ScDBDocFunc::ShowInBeamer( const ScImportParam& rParam, SfxViewFrame* pFram
svx::ODataAccessDescriptor aSelection;
aSelection.setDataSource(rParam.aDBName);
- aSelection[svx::daCommand] <<= rParam.aStatement;
- aSelection[svx::daCommandType] <<= nType;
+ aSelection[svx::DataAccessDescriptorProperty::Command] <<= rParam.aStatement;
+ aSelection[svx::DataAccessDescriptorProperty::CommandType] <<= nType;
xControllerSelection->select(uno::makeAny(aSelection.createPropertyValueSequence()));
}
@@ -158,15 +158,15 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
sal_Int32 nListCount = 0;
uno::Sequence<uno::Any> aSelection;
- if ( pDescriptor && pDescriptor->has(svx::daSelection) )
+ if ( pDescriptor && pDescriptor->has(svx::DataAccessDescriptorProperty::Selection) )
{
- (*pDescriptor)[svx::daSelection] >>= aSelection;
+ (*pDescriptor)[svx::DataAccessDescriptorProperty::Selection] >>= aSelection;
nListCount = aSelection.getLength();
if ( nListCount > 0 )
{
bDoSelection = true;
- if ( pDescriptor->has(svx::daBookmarkSelection) )
- bBookmarkSelection = ScUnoHelpFunctions::GetBoolFromAny( (*pDescriptor)[svx::daBookmarkSelection] );
+ if ( pDescriptor->has(svx::DataAccessDescriptorProperty::BookmarkSelection) )
+ bBookmarkSelection = ScUnoHelpFunctions::GetBoolFromAny( (*pDescriptor)[svx::DataAccessDescriptorProperty::BookmarkSelection] );
if ( bBookmarkSelection )
{
// From bookmarks, there's no way to detect if all records are selected.
@@ -177,8 +177,8 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
}
uno::Reference<sdbc::XResultSet> xResultSet;
- if ( pDescriptor && pDescriptor->has(svx::daCursor) )
- xResultSet.set((*pDescriptor)[svx::daCursor], uno::UNO_QUERY);
+ if ( pDescriptor && pDescriptor->has(svx::DataAccessDescriptorProperty::Cursor) )
+ xResultSet.set((*pDescriptor)[svx::DataAccessDescriptorProperty::Cursor], uno::UNO_QUERY);
// ImportDoc - also used for Redo
ScDocument* pImportDoc = new ScDocument( SCDOCMODE_UNDO );
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index dc3f64485b30..2cd9e613273c 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -179,12 +179,12 @@ void ScImportDescriptor::FillProperties( uno::Sequence<beans::PropertyValue>& rS
svx::ODataAccessDescriptor aDescriptor;
aDescriptor.setDataSource(rParam.aDBName);
- if (aDescriptor.has( svx::daDataSource ))
+ if (aDescriptor.has( svx::DataAccessDescriptorProperty::DataSource ))
{
pArray[0].Name = SC_UNONAME_DBNAME;
pArray[0].Value <<= rParam.aDBName;
}
- else if (aDescriptor.has( svx::daConnectionResource ))
+ else if (aDescriptor.has( svx::DataAccessDescriptorProperty::ConnectionResource ))
{
pArray[0].Name = SC_UNONAME_CONRES;
pArray[0].Value <<= rParam.aDBName;
diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx
index a28503943575..425816429523 100644
--- a/sc/source/ui/unoobj/dispuno.cxx
+++ b/sc/source/ui/unoobj/dispuno.cxx
@@ -249,16 +249,16 @@ static void lcl_FillDataSource( frame::FeatureStateEvent& rEvent, const ScImport
sdb::CommandType::TABLE );
aDescriptor.setDataSource(rParam.aDBName);
- aDescriptor[svx::daCommand] <<= rParam.aStatement;
- aDescriptor[svx::daCommandType] <<= nType;
+ aDescriptor[svx::DataAccessDescriptorProperty::Command] <<= rParam.aStatement;
+ aDescriptor[svx::DataAccessDescriptorProperty::CommandType] <<= nType;
}
else
{
// descriptor has to be complete anyway
- aDescriptor[svx::daDataSource] <<= OUString();
- aDescriptor[svx::daCommand] <<= OUString();
- aDescriptor[svx::daCommandType] <<= (sal_Int32)sdb::CommandType::TABLE;
+ aDescriptor[svx::DataAccessDescriptorProperty::DataSource] <<= OUString();
+ aDescriptor[svx::DataAccessDescriptorProperty::Command] <<= OUString();
+ aDescriptor[svx::DataAccessDescriptorProperty::CommandType] <<= (sal_Int32)sdb::CommandType::TABLE;
}
rEvent.State <<= aDescriptor.createPropertyValueSequence();
}
diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx
index d166af11b394..df75d54d5546 100644
--- a/svx/source/fmcomp/dbaexchange.cxx
+++ b/svx/source/fmcomp/dbaexchange.cxx
@@ -58,14 +58,14 @@ namespace svx
:m_nFormatFlags(_nFormats)
{
OUString sDataSource, sDatabaseLocation, sConnectionResource, sCommand, sFieldName;
- if ( _rDescriptor.has( daDataSource ) ) _rDescriptor[ daDataSource ] >>= sDataSource;
- if ( _rDescriptor.has( daDatabaseLocation ) ) _rDescriptor[ daDatabaseLocation ] >>= sDatabaseLocation;
- if ( _rDescriptor.has( daConnectionResource ) ) _rDescriptor[ daConnectionResource ] >>= sConnectionResource;
- if ( _rDescriptor.has( daCommand ) ) _rDescriptor[ daCommand ] >>= sCommand;
- if ( _rDescriptor.has( daColumnName ) ) _rDescriptor[ daColumnName ] >>= sFieldName;
+ if ( _rDescriptor.has( DataAccessDescriptorProperty::DataSource ) ) _rDescriptor[ DataAccessDescriptorProperty::DataSource ] >>= sDataSource;
+ if ( _rDescriptor.has( DataAccessDescriptorProperty::DatabaseLocation ) ) _rDescriptor[ DataAccessDescriptorProperty::DatabaseLocation ] >>= sDatabaseLocation;
+ if ( _rDescriptor.has( DataAccessDescriptorProperty::ConnectionResource ) ) _rDescriptor[ DataAccessDescriptorProperty::ConnectionResource ] >>= sConnectionResource;
+ if ( _rDescriptor.has( DataAccessDescriptorProperty::Command ) ) _rDescriptor[ DataAccessDescriptorProperty::Command ] >>= sCommand;
+ if ( _rDescriptor.has( DataAccessDescriptorProperty::ColumnName ) ) _rDescriptor[ DataAccessDescriptorProperty::ColumnName ] >>= sFieldName;
sal_Int32 nCommandType = CommandType::TABLE;
- OSL_VERIFY( _rDescriptor[ daCommandType ] >>= nCommandType );
+ OSL_VERIFY( _rDescriptor[ DataAccessDescriptorProperty::CommandType ] >>= nCommandType );
implConstruct(
@@ -74,10 +74,10 @@ namespace svx
if ( m_nFormatFlags & ColumnTransferFormatFlags::COLUMN_DESCRIPTOR )
{
- if ( _rDescriptor.has( daConnection ) )
- m_aDescriptor[ daConnection ] = _rDescriptor[ daConnection ];
- if ( _rDescriptor.has( daColumnObject ) )
- m_aDescriptor[ daColumnObject ] = _rDescriptor[ daColumnObject ];
+ if ( _rDescriptor.has( DataAccessDescriptorProperty::Connection ) )
+ m_aDescriptor[ DataAccessDescriptorProperty::Connection ] = _rDescriptor[ DataAccessDescriptorProperty::Connection ];
+ if ( _rDescriptor.has( DataAccessDescriptorProperty::ColumnObject ) )
+ m_aDescriptor[ DataAccessDescriptorProperty::ColumnObject ] = _rDescriptor[ DataAccessDescriptorProperty::ColumnObject ];
}
}
@@ -141,9 +141,9 @@ namespace svx
if ((m_nFormatFlags & ColumnTransferFormatFlags::COLUMN_DESCRIPTOR) == ColumnTransferFormatFlags::COLUMN_DESCRIPTOR)
{
if (_rxColumn.is())
- m_aDescriptor[daColumnObject] <<= _rxColumn;
+ m_aDescriptor[DataAccessDescriptorProperty::ColumnObject] <<= _rxColumn;
if (_rxConnection.is())
- m_aDescriptor[daConnection] <<= _rxConnection;
+ m_aDescriptor[DataAccessDescriptorProperty::Connection] <<= _rxConnection;
}
}
@@ -197,11 +197,11 @@ namespace svx
{
m_aDescriptor.setDataSource(_rDatasource);
if ( !_rConnectionResource.isEmpty() )
- m_aDescriptor[daConnectionResource] <<= _rConnectionResource;
+ m_aDescriptor[DataAccessDescriptorProperty::ConnectionResource] <<= _rConnectionResource;
- m_aDescriptor[daCommand] <<= _rCommand;
- m_aDescriptor[daCommandType] <<= _nCommandType;
- m_aDescriptor[daColumnName] <<= _rFieldName;
+ m_aDescriptor[DataAccessDescriptorProperty::Command] <<= _rCommand;
+ m_aDescriptor[DataAccessDescriptorProperty::CommandType] <<= _nCommandType;
+ m_aDescriptor[DataAccessDescriptorProperty::ColumnName] <<= _rFieldName;
}
}
@@ -290,15 +290,15 @@ namespace svx
{
// and build an own descriptor
if ( !sDatasource.isEmpty() )
- aDescriptor[daDataSource] <<= sDatasource;
+ aDescriptor[DataAccessDescriptorProperty::DataSource] <<= sDatasource;
if ( !sDatabaseLocation.isEmpty() )
- aDescriptor[daDatabaseLocation] <<= sDatabaseLocation;
+ aDescriptor[DataAccessDescriptorProperty::DatabaseLocation] <<= sDatabaseLocation;
if ( !sConnectionResource.isEmpty() )
- aDescriptor[daConnectionResource] <<= sConnectionResource;
+ aDescriptor[DataAccessDescriptorProperty::ConnectionResource] <<= sConnectionResource;
- aDescriptor[daCommand] <<= sCommand;
- aDescriptor[daCommandType] <<= nCommandType;
- aDescriptor[daColumnName] <<= sFieldName;
+ aDescriptor[DataAccessDescriptorProperty::Command] <<= sCommand;
+ aDescriptor[DataAccessDescriptorProperty::CommandType] <<= nCommandType;
+ aDescriptor[DataAccessDescriptorProperty::ColumnName] <<= sFieldName;
}
return aDescriptor;
}
@@ -315,16 +315,16 @@ namespace svx
if ( _rData.HasFormat(getDescriptorFormatId()) )
{
ODataAccessDescriptor aDescriptor = extractColumnDescriptor(_rData);
- if ( aDescriptor.has(daDataSource) )
- aDescriptor[daDataSource] >>= _rDatasource;
- if ( aDescriptor.has(daDatabaseLocation) )
- aDescriptor[daDatabaseLocation] >>= _rDatabaseLocation;
- if ( aDescriptor.has(daConnectionResource) )
- aDescriptor[daConnectionResource] >>= _rConnectionResource;
-
- aDescriptor[daCommand] >>= _rCommand;
- aDescriptor[daCommandType] >>= _nCommandType;
- aDescriptor[daColumnName] >>= _rFieldName;
+ if ( aDescriptor.has(DataAccessDescriptorProperty::DataSource) )
+ aDescriptor[DataAccessDescriptorProperty::DataSource] >>= _rDatasource;
+ if ( aDescriptor.has(DataAccessDescriptorProperty::DatabaseLocation) )
+ aDescriptor[DataAccessDescriptorProperty::DatabaseLocation] >>= _rDatabaseLocation;
+ if ( aDescriptor.has(DataAccessDescriptorProperty::ConnectionResource) )
+ aDescriptor[DataAccessDescriptorProperty::ConnectionResource] >>= _rConnectionResource;
+
+ aDescriptor[DataAccessDescriptorProperty::Command] >>= _rCommand;
+ aDescriptor[DataAccessDescriptorProperty::CommandType] >>= _nCommandType;
+ aDescriptor[DataAccessDescriptorProperty::ColumnName] >>= _rFieldName;
return true;
}
@@ -436,7 +436,7 @@ namespace svx
void ODataAccessObjectTransferable::AddSupportedFormats()
{
sal_Int32 nObjectType = CommandType::COMMAND;
- m_aDescriptor[daCommandType] >>= nObjectType;
+ m_aDescriptor[DataAccessDescriptorProperty::CommandType] >>= nObjectType;
switch (nObjectType)
{
case CommandType::TABLE:
@@ -559,11 +559,11 @@ namespace svx
m_aDescriptor.setDataSource(_rDatasource);
// build the descriptor (the property sequence)
if ( !_rConnectionResource.isEmpty() )
- m_aDescriptor[daConnectionResource] <<= _rConnectionResource;
+ m_aDescriptor[DataAccessDescriptorProperty::ConnectionResource] <<= _rConnectionResource;
if ( _rxConnection.is() )
- m_aDescriptor[daConnection] <<= _rxConnection;
- m_aDescriptor[daCommand] <<= _rCommand;
- m_aDescriptor[daCommandType] <<= _nCommandType;
+ m_aDescriptor[DataAccessDescriptorProperty::Connection] <<= _rxConnection;
+ m_aDescriptor[DataAccessDescriptorProperty::Command] <<= _rCommand;
+ m_aDescriptor[DataAccessDescriptorProperty::CommandType] <<= _nCommandType;
// extract the single values from the sequence
diff --git a/svx/source/fmcomp/dbaobjectex.cxx b/svx/source/fmcomp/dbaobjectex.cxx
index 59d0bbcef3bf..52641245b1b2 100644
--- a/svx/source/fmcomp/dbaobjectex.cxx
+++ b/svx/source/fmcomp/dbaobjectex.cxx
@@ -47,7 +47,7 @@ namespace svx
,const Reference< XContent>& _xContent)
{
m_aDescriptor.setDataSource(_rDatasourceOrLocation);
- m_aDescriptor[daComponent] <<= _xContent;
+ m_aDescriptor[DataAccessDescriptorProperty::Component] <<= _xContent;
}
@@ -75,7 +75,7 @@ namespace svx
try
{
Reference<XPropertySet> xProp;
- m_aDescriptor[daComponent] >>= xProp;
+ m_aDescriptor[DataAccessDescriptorProperty::Component] >>= xProp;
if ( xProp.is() )
xProp->getPropertyValue("IsForm") >>= bForm;
}
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 61192c074666..6b3e88bbc03d 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -253,14 +253,14 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt )
Reference< XConnection > xConnection;
ODataAccessDescriptor aColumn = OColumnTransferable::extractColumnDescriptor(aDroppedData);
- if (aColumn.has(daDataSource)) aColumn[daDataSource] >>= sDatasource;
- if (aColumn.has(daDatabaseLocation)) aColumn[daDatabaseLocation] >>= sDatabaseLocation;
- if (aColumn.has(daConnectionResource)) aColumn[daConnectionResource] >>= sConnnectionResource;
- if (aColumn.has(daCommand)) aColumn[daCommand] >>= sCommand;
- if (aColumn.has(daCommandType)) aColumn[daCommandType] >>= nCommandType;
- if (aColumn.has(daColumnName)) aColumn[daColumnName] >>= sFieldName;
- if (aColumn.has(daColumnObject))aColumn[daColumnObject] >>= xField;
- if (aColumn.has(daConnection)) aColumn[daConnection] >>= xConnection;
+ if (aColumn.has(DataAccessDescriptorProperty::DataSource)) aColumn[DataAccessDescriptorProperty::DataSource] >>= sDatasource;
+ if (aColumn.has(DataAccessDescriptorProperty::DatabaseLocation)) aColumn[DataAccessDescriptorProperty::DatabaseLocation] >>= sDatabaseLocation;
+ if (aColumn.has(DataAccessDescriptorProperty::ConnectionResource)) aColumn[DataAccessDescriptorProperty::ConnectionResource] >>= sConnnectionResource;
+ if (aColumn.has(DataAccessDescriptorProperty::Command)) aColumn[DataAccessDescriptorProperty::Command] >>= sCommand;
+ if (aColumn.has(DataAccessDescriptorProperty::CommandType)) aColumn[DataAccessDescriptorProperty::CommandType] >>= nCommandType;
+ if (aColumn.has(DataAccessDescriptorProperty::ColumnName)) aColumn[DataAccessDescriptorProperty::ColumnName] >>= sFieldName;
+ if (aColumn.has(DataAccessDescriptorProperty::ColumnObject))aColumn[DataAccessDescriptorProperty::ColumnObject] >>= xField;
+ if (aColumn.has(DataAccessDescriptorProperty::Connection)) aColumn[DataAccessDescriptorProperty::Connection] >>= xConnection;
if ( sFieldName.isEmpty()
|| sCommand.isEmpty()
@@ -355,8 +355,8 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt )
// do the drop asynchronously
// (85957 - UI actions within the drop are not allowed, but we want to open a popup menu)
m_pImpl->aDropData = aColumn;
- m_pImpl->aDropData[daConnection] <<= xConnection;
- m_pImpl->aDropData[daColumnObject] <<= xField;
+ m_pImpl->aDropData[DataAccessDescriptorProperty::Connection] <<= xConnection;
+ m_pImpl->aDropData[DataAccessDescriptorProperty::ColumnObject] <<= xField;
m_pImpl->nDropAction = _rEvt.mnAction;
m_pImpl->aDropPosPixel = _rEvt.maPosPixel;
@@ -383,13 +383,13 @@ IMPL_LINK_NOARG_TYPED( FmGridHeader, OnAsyncExecuteDrop, void*, void )
Reference< XConnection > xConnection;
OUString sDatasource = m_pImpl->aDropData.getDataSource();
- if ( sDatasource.isEmpty() && m_pImpl->aDropData.has(daConnectionResource) )
- m_pImpl->aDropData[daConnectionResource] >>= sURL;
- m_pImpl->aDropData[daCommand] >>= sCommand;
- m_pImpl->aDropData[daCommandType] >>= nCommandType;
- m_pImpl->aDropData[daColumnName] >>= sFieldName;
- m_pImpl->aDropData[daConnection] >>= xConnection;
- m_pImpl->aDropData[daColumnObject] >>= xField;
+ if ( sDatasource.isEmpty() && m_pImpl->aDropData.has(DataAccessDescriptorProperty::ConnectionResource) )
+ m_pImpl->aDropData[DataAccessDescriptorProperty::ConnectionResource] >>= sURL;
+ m_pImpl->aDropData[DataAccessDescriptorProperty::Command] >>= sCommand;
+ m_pImpl->aDropData[DataAccessDescriptorProperty::CommandType] >>= nCommandType;
+ m_pImpl->aDropData[DataAccessDescriptorProperty::ColumnName] >>= sFieldName;
+ m_pImpl->aDropData[DataAccessDescriptorProperty::Connection] >>= xConnection;
+ m_pImpl->aDropData[DataAccessDescriptorProperty::ColumnObject] >>= xField;
try
{
diff --git a/svx/source/form/dataaccessdescriptor.cxx b/svx/source/form/dataaccessdescriptor.cxx
index 29915af33312..3e6a6132557d 100644
--- a/svx/source/form/dataaccessdescriptor.cxx
+++ b/svx/source/form/dataaccessdescriptor.cxx
@@ -18,7 +18,6 @@
*/
#include <svx/dataaccessdescriptor.hxx>
-#include <comphelper/propertysetinfo.hxx>
#include <comphelper/genericpropertyset.hxx>
#include <osl/diagnose.h>
#include <com/sun/star/sdbc/XConnection.hpp>
@@ -34,6 +33,15 @@ namespace svx
using namespace ::com::sun::star::ucb;
using namespace ::comphelper;
+ struct PropertyMapEntry
+ {
+ OUString maName;
+ DataAccessDescriptorProperty mnHandle;
+ css::uno::Type maType;
+ sal_Int16 mnAttributes;
+ sal_uInt8 mnMemberId;
+ };
+
class ODADescriptorImpl
{
protected:
@@ -175,29 +183,24 @@ namespace svx
{
static PropertyMapEntry const s_aDesriptorProperties[] =
{
- { OUString("ActiveConnection"), daConnection, cppu::UnoType<XConnection>::get(), PropertyAttribute::TRANSIENT, 0 },
- { OUString("BookmarkSelection"), daBookmarkSelection, cppu::UnoType<bool>::get(), PropertyAttribute::TRANSIENT, 0 },
- { OUString("Column"), daColumnObject, cppu::UnoType<XPropertySet>::get(), PropertyAttribute::TRANSIENT, 0 },
- { OUString("ColumnName"), daColumnName, ::cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT, 0 },
- { OUString("Command"), daCommand, ::cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT, 0 },
- { OUString("CommandType"), daCommandType, ::cppu::UnoType<sal_Int32>::get(), PropertyAttribute::TRANSIENT, 0 },
- { OUString("Component"), daComponent, cppu::UnoType<XContent>::get(), PropertyAttribute::TRANSIENT, 0 },
- { OUString("ConnectionResource"), daConnectionResource, ::cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT, 0 },
- { OUString("Cursor"), daCursor, cppu::UnoType<XResultSet>::get(), PropertyAttribute::TRANSIENT, 0 },
- { OUString("DataSourceName"), daDataSource, ::cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT, 0 },
- { OUString("DatabaseLocation"), daDatabaseLocation, ::cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT, 0 },
- { OUString("EscapeProcessing"), daEscapeProcessing, cppu::UnoType<bool>::get(), PropertyAttribute::TRANSIENT, 0 },
- { OUString("Filter"), daFilter, ::cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT, 0 },
- { OUString("Selection"), daSelection, cppu::UnoType<Sequence< Any >>::get(), PropertyAttribute::TRANSIENT, 0 },
- { OUString(), 0, css::uno::Type(), 0, 0 }
+ { OUString("ActiveConnection"), DataAccessDescriptorProperty::Connection, cppu::UnoType<XConnection>::get(), PropertyAttribute::TRANSIENT, 0 },
+ { OUString("BookmarkSelection"), DataAccessDescriptorProperty::BookmarkSelection, cppu::UnoType<bool>::get(), PropertyAttribute::TRANSIENT, 0 },
+ { OUString("Column"), DataAccessDescriptorProperty::ColumnObject, cppu::UnoType<XPropertySet>::get(), PropertyAttribute::TRANSIENT, 0 },
+ { OUString("ColumnName"), DataAccessDescriptorProperty::ColumnName, ::cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT, 0 },
+ { OUString("Command"), DataAccessDescriptorProperty::Command, ::cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT, 0 },
+ { OUString("CommandType"), DataAccessDescriptorProperty::CommandType, ::cppu::UnoType<sal_Int32>::get(), PropertyAttribute::TRANSIENT, 0 },
+ { OUString("Component"), DataAccessDescriptorProperty::Component, cppu::UnoType<XContent>::get(), PropertyAttribute::TRANSIENT, 0 },
+ { OUString("ConnectionResource"), DataAccessDescriptorProperty::ConnectionResource, ::cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT, 0 },
+ { OUString("Cursor"), DataAccessDescriptorProperty::Cursor, cppu::UnoType<XResultSet>::get(), PropertyAttribute::TRANSIENT, 0 },
+ { OUString("DataSourceName"), DataAccessDescriptorProperty::DataSource, ::cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT, 0 },
+ { OUString("DatabaseLocation"), DataAccessDescriptorProperty::DatabaseLocation, ::cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT, 0 },
+ { OUString("EscapeProcessing"), DataAccessDescriptorProperty::EscapeProcessing, cppu::UnoType<bool>::get(), PropertyAttribute::TRANSIENT, 0 },
+ { OUString("Filter"), DataAccessDescriptorProperty::Filter, ::cppu::UnoType<OUString>::get(), PropertyAttribute::TRANSIENT, 0 },
+ { OUString("Selection"), DataAccessDescriptorProperty::Selection, cppu::UnoType<Sequence< Any >>::get(), PropertyAttribute::TRANSIENT, 0 }
};
- PropertyMapEntry const * pEntry = s_aDesriptorProperties;
- while ( !pEntry->maName.isEmpty() )
- {
- s_aProperties[ pEntry->maName ] = pEntry;
- ++pEntry;
- }
+ for (unsigned i=0; i<SAL_N_ELEMENTS(s_aDesriptorProperties); ++i)
+ s_aProperties[ s_aDesriptorProperties[i].maName ] = &s_aDesriptorProperties[i];
}
return s_aProperties;
@@ -207,7 +210,7 @@ namespace svx
{
const MapString2PropertyEntry& rProperties = getPropertyMap();
- sal_Int32 nNeededHandle = (sal_Int32)(_rPos->first);
+ DataAccessDescriptorProperty nNeededHandle = _rPos->first;
for ( MapString2PropertyEntry::const_iterator loop = rProperties.begin();
loop != rProperties.end();
@@ -228,7 +231,7 @@ namespace svx
// build the property value
PropertyValue aReturn;
aReturn.Name = pProperty->maName;
- aReturn.Handle = pProperty->mnHandle;
+ aReturn.Handle = (sal_Int32)pProperty->mnHandle;
aReturn.Value = _rPos->second;
aReturn.State = PropertyState_DIRECT_VALUE;
@@ -351,10 +354,10 @@ namespace svx
OUString ODataAccessDescriptor::getDataSource() const
{
OUString sDataSourceName;
- if ( has(daDataSource) )
- (*this)[daDataSource] >>= sDataSourceName;
- else if ( has(daDatabaseLocation) )
- (*this)[daDatabaseLocation] >>= sDataSourceName;
+ if ( has(DataAccessDescriptorProperty::DataSource) )
+ (*this)[DataAccessDescriptorProperty::DataSource] >>= sDataSourceName;
+ else if ( has(DataAccessDescriptorProperty::DatabaseLocation) )
+ (*this)[DataAccessDescriptorProperty::DatabaseLocation] >>= sDataSourceName;
return sDataSourceName;
}
@@ -363,10 +366,10 @@ namespace svx
if ( !_sDataSourceNameOrLocation.isEmpty() )
{
INetURLObject aURL(_sDataSourceNameOrLocation);
- (*this)[ (( aURL.GetProtocol() == INetProtocol::File ) ? daDatabaseLocation : daDataSource)] <<= _sDataSourceNameOrLocation;
+ (*this)[ (( aURL.GetProtocol() == INetProtocol::File ) ? DataAccessDescriptorProperty::DatabaseLocation : DataAccessDescriptorProperty::DataSource)] <<= _sDataSourceNameOrLocation;
}
else
- (*this)[ daDataSource ] <<= OUString();
+ (*this)[ DataAccessDescriptorProperty::DataSource ] <<= OUString();
}
}
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index f40e773cda69..bbf494b2f47b 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -418,9 +418,9 @@ SdrObject* FmFormView::CreateFieldControl(const OUString& rFieldDesc) const
ODataAccessDescriptor aColumnDescriptor;
aColumnDescriptor.setDataSource(sDataSource);
- aColumnDescriptor[ daCommand ] <<= sObjectName;
- aColumnDescriptor[ daCommandType ] <<= nObjectType;
- aColumnDescriptor[ daColumnName ] <<= sFieldName;
+ aColumnDescriptor[ DataAccessDescriptorProperty::Command ] <<= sObjectName;
+ aColumnDescriptor[ DataAccessDescriptorProperty::CommandType ] <<= nObjectType;
+ aColumnDescriptor[ DataAccessDescriptorProperty::ColumnName ] <<= sFieldName;
return pImpl->implCreateFieldControl( aColumnDescriptor );
}
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index d572c3f333a0..db36769096fb 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -1158,12 +1158,12 @@ SdrObject* FmXFormView::implCreateFieldControl( const svx::ODataAccessDescriptor
SharedConnection xConnection;
OUString sDataSource = _rColumnDescriptor.getDataSource();
- _rColumnDescriptor[ daCommand ] >>= sCommand;
- _rColumnDescriptor[ daColumnName ] >>= sFieldName;
- _rColumnDescriptor[ daCommandType ] >>= nCommandType;
+ _rColumnDescriptor[ DataAccessDescriptorProperty::Command ] >>= sCommand;
+ _rColumnDescriptor[ DataAccessDescriptorProperty::ColumnName ] >>= sFieldName;
+ _rColumnDescriptor[ DataAccessDescriptorProperty::CommandType ] >>= nCommandType;
{
Reference< XConnection > xExternalConnection;
- _rColumnDescriptor[ daConnection ] >>= xExternalConnection;
+ _rColumnDescriptor[ DataAccessDescriptorProperty::Connection ] >>= xExternalConnection;
xConnection.reset( xExternalConnection, SharedConnection::NoTakeOwnership );
}
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index 6e507f95bb3d..27c9c5b4922c 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -152,12 +152,12 @@ void FmFieldWinListBox::StartDrag( sal_Int8 /*_nAction*/, const Point& /*_rPosPi
return;
svx::ODataAccessDescriptor aDescriptor;
- aDescriptor[ daDataSource ] <<= pTabWin->GetDatabaseName();
- aDescriptor[ daConnection ] <<= pTabWin->GetConnection().getTyped();
- aDescriptor[ daCommand ] <<= pTabWin->GetObjectName();
- aDescriptor[ daCommandType ]<<= pTabWin->GetObjectType();
+ aDescriptor[ DataAccessDescriptorProperty::DataSource ] <<= pTabWin->GetDatabaseName();
+ aDescriptor[ DataAccessDescriptorProperty::Connection ] <<= pTabWin->GetConnection().getTyped();
+ aDescriptor[ DataAccessDescriptorProperty::Command ] <<= pTabWin->GetObjectName();
+ aDescriptor[ DataAccessDescriptorProperty::CommandType ]<<= pTabWin->GetObjectType();
ColumnInfo* pInfo = static_cast<ColumnInfo*>(pSelected->GetUserData());
- aDescriptor[ daColumnName ] <<= pInfo->sColumnName;
+ aDescriptor[ DataAccessDescriptorProperty::ColumnName ] <<= pInfo->sColumnName;
TransferableHelper* pTransferColumn = new OColumnTransferable(
aDescriptor, ColumnTransferFormatFlags::FIELD_DESCRIPTOR | ColumnTransferFormatFlags::CONTROL_EXCHANGE | ColumnTransferFormatFlags::COLUMN_DESCRIPTOR
@@ -219,12 +219,12 @@ bool FmFieldWin::createSelectionControls( )
ODataAccessDescriptor aDescr;
aDescr.setDataSource(GetDatabaseName());
- aDescr[ daConnection ] <<= GetConnection().getTyped();
+ aDescr[ DataAccessDescriptorProperty::Connection ] <<= GetConnection().getTyped();
- aDescr[ daCommand ] <<= GetObjectName();
- aDescr[ daCommandType ] <<= GetObjectType();
+ aDescr[ DataAccessDescriptorProperty::Command ] <<= GetObjectName();
+ aDescr[ DataAccessDescriptorProperty::CommandType ] <<= GetObjectType();
ColumnInfo* pInfo = static_cast<ColumnInfo*>(pSelected->GetUserData());
- aDescr[ daColumnName ] <<= pInfo->sColumnName;//OUString( pListBox->GetEntryText( pSelected) );
+ aDescr[ DataAccessDescriptorProperty::ColumnName ] <<= pInfo->sColumnName;//OUString( pListBox->GetEntryText( pSelected) );
// transfer this to the SFX world
SfxUnoAnyItem aDescriptorItem( SID_FM_DATACCESS_DESCRIPTOR, makeAny( aDescr.createPropertyValueSequence() ) );
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index 36bf54b9d291..71e33bb79a29 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -795,9 +795,9 @@ SwFieldType* SwXFieldMaster::GetFieldType(bool const bDontCreate) const
// set DataSource
svx::ODataAccessDescriptor aAcc;
if (!m_pImpl->m_sParam1.isEmpty())
- aAcc[svx::daDataSource] <<= m_pImpl->m_sParam1; // DataBaseName
+ aAcc[svx::DataAccessDescriptorProperty::DataSource] <<= m_pImpl->m_sParam1; // DataBaseName
else if (!m_pImpl->m_sParam5.isEmpty())
- aAcc[svx::daDatabaseLocation] <<= m_pImpl->m_sParam5; // DataBaseURL
+ aAcc[svx::DataAccessDescriptorProperty::DatabaseLocation] <<= m_pImpl->m_sParam5; // DataBaseURL
aData.sDataSource = aAcc.getDataSource();
aData.sCommand = m_pImpl->m_sParam2;
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index fc088df0496b..0610f8cc587d 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -287,18 +287,18 @@ std::shared_ptr<SwMailMergeConfigItem> SwView::EnsureMailMergeConfigItem(const S
{
SwDBData aDBData;
svx::ODataAccessDescriptor aDescriptor(aDBValues);
- aDescriptor[svx::daDataSource] >>= aDBData.sDataSource;
- aDescriptor[svx::daCommand] >>= aDBData.sCommand;
- aDescriptor[svx::daCommandType] >>= aDBData.nCommandType;
+ aDescriptor[svx::DataAccessDescriptorProperty::DataSource] >>= aDBData.sDataSource;
+ aDescriptor[svx::DataAccessDescriptorProperty::Command] >>= aDBData.sCommand;
+ aDescriptor[svx::DataAccessDescriptorProperty::CommandType] >>= aDBData.nCommandType;
uno::Sequence< uno::Any > aSelection;
uno::Reference< sdbc::XConnection> xConnection;
uno::Reference< sdbc::XDataSource> xSource;
uno::Reference< sdbcx::XColumnsSupplier> xColumnsSupplier;
- if (aDescriptor.has(svx::daSelection))
- aDescriptor[svx::daSelection] >>= aSelection;
- if (aDescriptor.has(svx::daConnection))
- aDescriptor[svx::daConnection] >>= xConnection;
+ if (aDescriptor.has(svx::DataAccessDescriptorProperty::Selection))
+ aDescriptor[svx::DataAccessDescriptorProperty::Selection] >>= aSelection;
+ if (aDescriptor.has(svx::DataAccessDescriptorProperty::Connection))
+ aDescriptor[svx::DataAccessDescriptorProperty::Connection] >>= xConnection;
uno::Reference<container::XChild> xChild(xConnection, uno::UNO_QUERY);
if (xChild.is())
xSource.set(xChild->getParent(), uno::UNO_QUERY);
diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx
index e3c080a91837..2e72374bdb66 100644
--- a/sw/source/uibase/app/swmodul1.cxx
+++ b/sw/source/uibase/app/swmodul1.cxx
@@ -379,8 +379,8 @@ void SwModule::ShowDBObj(SwView& rView, const SwDBData& rData)
ODataAccessDescriptor aSelection;
aSelection.setDataSource(rData.sDataSource);
- aSelection[daCommand] <<= rData.sCommand;
- aSelection[daCommandType] <<= rData.nCommandType;
+ aSelection[DataAccessDescriptorProperty::Command] <<= rData.sCommand;
+ aSelection[DataAccessDescriptorProperty::CommandType] <<= rData.nCommandType;
xControllerSelection->select(makeAny(aSelection.createPropertyValueSequence()));
}
else {
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 7d585512f82b..6ac018bf7933 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -464,15 +464,15 @@ bool SwDBManager::Merge( const SwMergeDescriptor& rMergeDesc )
uno::Reference< sdbc::XConnection> xConnection;
aData.sDataSource = rMergeDesc.rDescriptor.getDataSource();
- rMergeDesc.rDescriptor[svx::daCommand] >>= aData.sCommand;
- rMergeDesc.rDescriptor[svx::daCommandType] >>= aData.nCommandType;
+ rMergeDesc.rDescriptor[svx::DataAccessDescriptorProperty::Command] >>= aData.sCommand;
+ rMergeDesc.rDescriptor[svx::DataAccessDescriptorProperty::CommandType] >>= aData.nCommandType;
- if ( rMergeDesc.rDescriptor.has(svx::daCursor) )
- rMergeDesc.rDescriptor[svx::daCursor] >>= xResSet;
- if ( rMergeDesc.rDescriptor.has(svx::daSelection) )
- rMergeDesc.rDescriptor[svx::daSelection] >>= aSelection;
- if ( rMergeDesc.rDescriptor.has(svx::daConnection) )
- rMergeDesc.rDescriptor[svx::daConnection] >>= xConnection;
+ if ( rMergeDesc.rDescriptor.has(svx::DataAccessDescriptorProperty::Cursor) )
+ rMergeDesc.rDescriptor[svx::DataAccessDescriptorProperty::Cursor] >>= xResSet;
+ if ( rMergeDesc.rDescriptor.has(svx::DataAccessDescriptorProperty::Selection) )
+ rMergeDesc.rDescriptor[svx::DataAccessDescriptorProperty::Selection] >>= aSelection;
+ if ( rMergeDesc.rDescriptor.has(svx::DataAccessDescriptorProperty::Connection) )
+ rMergeDesc.rDescriptor[svx::DataAccessDescriptorProperty::Connection] >>= xConnection;
if(aData.sDataSource.isEmpty() || aData.sCommand.isEmpty() || !xResSet.is())
{
@@ -2796,13 +2796,13 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh,
svx::ODataAccessDescriptor aDescriptor(rProperties);
sDataSource = aDescriptor.getDataSource();
- OSL_VERIFY(aDescriptor[svx::daCommand] >>= sDataTableOrQuery);
- OSL_VERIFY(aDescriptor[svx::daCommandType] >>= nCmdType);
+ OSL_VERIFY(aDescriptor[svx::DataAccessDescriptorProperty::Command] >>= sDataTableOrQuery);
+ OSL_VERIFY(aDescriptor[svx::DataAccessDescriptorProperty::CommandType] >>= nCmdType);
- if ( aDescriptor.has(svx::daSelection) )
- aDescriptor[svx::daSelection] >>= aSelection;
- if ( aDescriptor.has(svx::daConnection) )
- aDescriptor[svx::daConnection] >>= xConnection;
+ if ( aDescriptor.has(svx::DataAccessDescriptorProperty::Selection) )
+ aDescriptor[svx::DataAccessDescriptorProperty::Selection] >>= aSelection;
+ if ( aDescriptor.has(svx::DataAccessDescriptorProperty::Connection) )
+ aDescriptor[svx::DataAccessDescriptorProperty::Connection] >>= xConnection;
if(sDataSource.isEmpty() || sDataTableOrQuery.isEmpty())
{
@@ -2828,11 +2828,11 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh,
assert( pImpl->pMergeDialog && "Dialog creation failed!" );
if(pImpl->pMergeDialog->Execute() == RET_OK)
{
- aDescriptor[svx::daSelection] <<= pImpl->pMergeDialog->GetSelection();
+ aDescriptor[svx::DataAccessDescriptorProperty::Selection] <<= pImpl->pMergeDialog->GetSelection();
uno::Reference<sdbc::XResultSet> xResSet = pImpl->pMergeDialog->GetResultSet();
if(xResSet.is())
- aDescriptor[svx::daCursor] <<= xResSet;
+ aDescriptor[svx::DataAccessDescriptorProperty::Cursor] <<= xResSet;
// SfxObjectShellRef is ok, since there should be no control over the document lifetime here
SfxObjectShellRef xDocShell = rSh.GetView().GetViewFrame()->GetObjectShell();
@@ -2855,7 +2855,7 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh,
// reset the cursor inside
xResSet = nullptr;
- aDescriptor[svx::daCursor] <<= xResSet;
+ aDescriptor[svx::DataAccessDescriptorProperty::Cursor] <<= xResSet;
}
if(pFound)
{
@@ -3078,11 +3078,11 @@ std::shared_ptr<SwMailMergeConfigItem> SwDBManager::PerformMailMerge(SwView* pVi
svx::ODataAccessDescriptor aDescriptor;
aDescriptor.setDataSource(xConfigItem->GetCurrentDBData().sDataSource);
- aDescriptor[ svx::daConnection ] <<= xConfigItem->GetConnection().getTyped();
- aDescriptor[ svx::daCursor ] <<= xConfigItem->GetResultSet();
- aDescriptor[ svx::daCommand ] <<= xConfigItem->GetCurrentDBData().sCommand;
- aDescriptor[ svx::daCommandType ] <<= xConfigItem->GetCurrentDBData().nCommandType;
- aDescriptor[ svx::daSelection ] <<= xConfigItem->GetSelection();
+ aDescriptor[ svx::DataAccessDescriptorProperty::Connection ] <<= xConfigItem->GetConnection().getTyped();
+ aDescriptor[ svx::DataAccessDescriptorProperty::Cursor ] <<= xConfigItem->GetResultSet();
+ aDescriptor[ svx::DataAccessDescriptorProperty::Command ] <<= xConfigItem->GetCurrentDBData().sCommand;
+ aDescriptor[ svx::DataAccessDescriptorProperty::CommandType ] <<= xConfigItem->GetCurrentDBData().nCommandType;
+ aDescriptor[ svx::DataAccessDescriptorProperty::Selection ] <<= xConfigItem->GetSelection();
SwWrtShell& rSh = pView->GetWrtShell();
xConfigItem->SetTargetView(nullptr);
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 288144bc90fb..dc75047a9158 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -2671,14 +2671,14 @@ bool SwTransferable::PasteDBData( TransferableDataHelper& rData,
if ( bDataAvailable )
{
- pConnectionItem.reset(new SfxUsrAnyItem(FN_DB_CONNECTION_ANY, aDesc[daConnection]));
- pColumnItem.reset(new SfxUsrAnyItem(FN_DB_COLUMN_ANY, aDesc[daColumnObject]));
+ pConnectionItem.reset(new SfxUsrAnyItem(FN_DB_CONNECTION_ANY, aDesc[DataAccessDescriptorProperty::Connection]));
+ pColumnItem.reset(new SfxUsrAnyItem(FN_DB_COLUMN_ANY, aDesc[DataAccessDescriptorProperty::ColumnObject]));
pSourceItem.reset(new SfxUsrAnyItem(FN_DB_DATA_SOURCE_ANY, makeAny(aDesc.getDataSource())));
- pCommandItem.reset(new SfxUsrAnyItem(FN_DB_DATA_COMMAND_ANY, aDesc[daCommand]));
- pCommandTypeItem.reset(new SfxUsrAnyItem(FN_DB_DATA_COMMAND_TYPE_ANY, aDesc[daCommandType]));
- pColumnNameItem.reset(new SfxUsrAnyItem(FN_DB_DATA_COLUMN_NAME_ANY, aDesc[daColumnName]));
- pSelectionItem.reset(new SfxUsrAnyItem(FN_DB_DATA_SELECTION_ANY, aDesc[daSelection]));
- pCursorItem.reset(new SfxUsrAnyItem(FN_DB_DATA_CURSOR_ANY, aDesc[daCursor]));
+ pCommandItem.reset(new SfxUsrAnyItem(FN_DB_DATA_COMMAND_ANY, aDesc[DataAccessDescriptorProperty::Command]));
+ pCommandTypeItem.reset(new SfxUsrAnyItem(FN_DB_DATA_COMMAND_TYPE_ANY, aDesc[DataAccessDescriptorProperty::CommandType]));
+ pColumnNameItem.reset(new SfxUsrAnyItem(FN_DB_DATA_COLUMN_NAME_ANY, aDesc[DataAccessDescriptorProperty::ColumnName]));
+ pSelectionItem.reset(new SfxUsrAnyItem(FN_DB_DATA_SELECTION_ANY, aDesc[DataAccessDescriptorProperty::Selection]));
+ pCursorItem.reset(new SfxUsrAnyItem(FN_DB_DATA_CURSOR_ANY, aDesc[DataAccessDescriptorProperty::Cursor]));
}
SwView& rView = rSh.GetView();
diff --git a/sw/source/uibase/shells/textsh2.cxx b/sw/source/uibase/shells/textsh2.cxx
index 33f2b87d32dd..47969fa7b26f 100644
--- a/sw/source/uibase/shells/textsh2.cxx
+++ b/sw/source/uibase/shells/textsh2.cxx
@@ -172,10 +172,10 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
ODataAccessDescriptor aDescriptor;
aDescriptor.setDataSource(sSourceArg);
- aDescriptor[daCommand] <<= sCommandArg;
- aDescriptor[daCursor] <<= xCursor;
- aDescriptor[daSelection] <<= aSelection;
- aDescriptor[daCommandType] <<= nCommandTypeArg;
+ aDescriptor[DataAccessDescriptorProperty::Command] <<= sCommandArg;
+ aDescriptor[DataAccessDescriptorProperty::Cursor] <<= xCursor;
+ aDescriptor[DataAccessDescriptorProperty::Selection] <<= aSelection;
+ aDescriptor[DataAccessDescriptorProperty::CommandType] <<= nCommandTypeArg;
SwMergeDescriptor aMergeDesc( DBMGR_MERGE, *GetShellPtr(), aDescriptor );
pDBManager->Merge(aMergeDesc);
diff --git a/sw/source/uibase/uno/unodispatch.cxx b/sw/source/uibase/uno/unodispatch.cxx
index 3335eebc4dfd..b64983cc8e25 100644
--- a/sw/source/uibase/uno/unodispatch.cxx
+++ b/sw/source/uibase/uno/unodispatch.cxx
@@ -257,8 +257,8 @@ void SwXDispatch::dispatch(const util::URL& aURL,
const SwDBData& rData = m_pView->GetWrtShell().GetDBDesc();
svx::ODataAccessDescriptor aDescriptor;
aDescriptor.setDataSource(rData.sDataSource);
- aDescriptor[svx::daCommand] <<= rData.sCommand;
- aDescriptor[svx::daCommandType] <<= rData.nCommandType;
+ aDescriptor[svx::DataAccessDescriptorProperty::Command] <<= rData.sCommand;
+ aDescriptor[svx::DataAccessDescriptorProperty::CommandType] <<= rData.nCommandType;
aEvent.State <<= aDescriptor.createPropertyValueSequence();
aEvent.IsEnabled = !rData.sDataSource.isEmpty();
@@ -303,8 +303,8 @@ void SwXDispatch::addStatusListener(
svx::ODataAccessDescriptor aDescriptor;
aDescriptor.setDataSource(rData.sDataSource);
- aDescriptor[svx::daCommand] <<= rData.sCommand;
- aDescriptor[svx::daCommandType] <<= rData.nCommandType;
+ aDescriptor[svx::DataAccessDescriptorProperty::Command] <<= rData.sCommand;
+ aDescriptor[svx::DataAccessDescriptorProperty::CommandType] <<= rData.nCommandType;
aEvent.State <<= aDescriptor.createPropertyValueSequence();
aEvent.IsEnabled = !rData.sDataSource.isEmpty();
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index 938a907d6a25..cacd76429d08 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -654,14 +654,14 @@ uno::Any SAL_CALL SwXMailMerge::execute(
svx::ODataAccessDescriptor aDescriptor;
aDescriptor.setDataSource(aCurDataSourceName);
- aDescriptor[ svx::daConnection ] <<= xCurConnection;
- aDescriptor[ svx::daCommand ] <<= aCurDataCommand;
- aDescriptor[ svx::daCommandType ] <<= nCurDataCommandType;
- aDescriptor[ svx::daEscapeProcessing ] <<= bCurEscapeProcessing;
- aDescriptor[ svx::daCursor ] <<= xCurResultSet;
- // aDescriptor[ svx::daColumnName ] not used
- // aDescriptor[ svx::daColumnObject ] not used
- aDescriptor[ svx::daSelection ] <<= aCurSelection;
+ aDescriptor[ svx::DataAccessDescriptorProperty::Connection ] <<= xCurConnection;
+ aDescriptor[ svx::DataAccessDescriptorProperty::Command ] <<= aCurDataCommand;
+ aDescriptor[ svx::DataAccessDescriptorProperty::CommandType ] <<= nCurDataCommandType;
+ aDescriptor[ svx::DataAccessDescriptorProperty::EscapeProcessing ] <<= bCurEscapeProcessing;
+ aDescriptor[ svx::DataAccessDescriptorProperty::Cursor ] <<= xCurResultSet;
+ // aDescriptor[ svx::DataAccessDescriptorProperty::ColumnName ] not used
+ // aDescriptor[ svx::DataAccessDescriptorProperty::ColumnObject ] not used
+ aDescriptor[ svx::DataAccessDescriptorProperty::Selection ] <<= aCurSelection;
DBManagerOptions nMergeType;
switch (nCurOutputType)
diff --git a/sw/source/uibase/utlui/condedit.cxx b/sw/source/uibase/utlui/condedit.cxx
index fd11e8a5b8a0..4dffb1b01c02 100644
--- a/sw/source/uibase/utlui/condedit.cxx
+++ b/sw/source/uibase/utlui/condedit.cxx
@@ -71,11 +71,11 @@ sal_Int8 ConditionEdit::ExecuteDrop( const ExecuteDropEvent& rEvt )
sDBName += sTmp;
sDBName += ".";
- aColDesc[daCommand] >>= sTmp;
+ aColDesc[DataAccessDescriptorProperty::Command] >>= sTmp;
sDBName += sTmp;
sDBName += ".";
- aColDesc[daColumnName] >>= sTmp;
+ aColDesc[DataAccessDescriptorProperty::ColumnName] >>= sTmp;
sDBName += sTmp;
if (bBrackets)
sDBName += "]";