summaryrefslogtreecommitdiff
path: root/sc
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 /sc
parent6cb3884898a39f57bcb30b2663a258e3971083fe (diff)
convert DataAccessDescriptorProperty to scoped enum
Change-Id: Ifb8fb1d28464f0638ec1485d77ad333b1acc667c
Diffstat (limited to 'sc')
-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
5 files changed, 19 insertions, 19 deletions
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();
}