summaryrefslogtreecommitdiff
path: root/svx/source/fmcomp
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-08-24 12:37:28 +0200
committerNoel Grandin <noel@peralex.com>2016-08-25 08:40:00 +0200
commit271bd3522e1148c0260688a42fd78959225db8cb (patch)
tree4bed1e26667e9609a0973205420e1e26c666da8b /svx/source/fmcomp
parent6cb3884898a39f57bcb30b2663a258e3971083fe (diff)
convert DataAccessDescriptorProperty to scoped enum
Change-Id: Ifb8fb1d28464f0638ec1485d77ad333b1acc667c
Diffstat (limited to 'svx/source/fmcomp')
-rw-r--r--svx/source/fmcomp/dbaexchange.cxx74
-rw-r--r--svx/source/fmcomp/dbaobjectex.cxx4
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx34
3 files changed, 56 insertions, 56 deletions
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
{