summaryrefslogtreecommitdiff
path: root/sw/source/uibase/dbui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-05-03 16:22:03 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-05-03 21:38:56 +0200
commitca734f7cfa55814a85d5940e5f64d7c53638f6a7 (patch)
tree6958c7a84693891a687f29eead25297da0470e46 /sw/source/uibase/dbui
parentdc3b0983561f9166da9f3d48f8c64f9077193b0c (diff)
Just use Any ctor instead of makeAny in sw
Change-Id: I2c9023ba8d07314d23ae7a65e670e8748c5e9322 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133766 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/uibase/dbui')
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx30
-rw-r--r--sw/source/uibase/dbui/mmconfigitem.cxx20
2 files changed, 25 insertions, 25 deletions
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 332911df9973..f7607bac9dda 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -814,7 +814,7 @@ static bool lcl_SaveDoc(
*pStoreToFilterOptions));
if( pSaveToFilterData->hasElements() )
pDstMed->GetItemSet()->Put( SfxUnoAnyItem(SID_FILTER_DATA,
- uno::makeAny(*pSaveToFilterData)));
+ uno::Any(*pSaveToFilterData)));
}
// convert fields to text if we are exporting to PDF.
@@ -1906,11 +1906,11 @@ uno::Reference< sdbcx::XColumnsSupplier> SwDBManager::GetColumnSupplier(uno::Ref
}
uno::Reference<beans::XPropertySet> xRowProperties(xRowSet, uno::UNO_QUERY);
- xRowProperties->setPropertyValue("DataSourceName", uno::makeAny(sDataSource));
- xRowProperties->setPropertyValue("Command", uno::makeAny(rTableOrQuery));
- xRowProperties->setPropertyValue("CommandType", uno::makeAny(nCommandType));
- xRowProperties->setPropertyValue("FetchSize", uno::makeAny(sal_Int32(10)));
- xRowProperties->setPropertyValue("ActiveConnection", uno::makeAny(xConnection));
+ xRowProperties->setPropertyValue("DataSourceName", uno::Any(sDataSource));
+ xRowProperties->setPropertyValue("Command", uno::Any(rTableOrQuery));
+ xRowProperties->setPropertyValue("CommandType", uno::Any(nCommandType));
+ xRowProperties->setPropertyValue("FetchSize", uno::Any(sal_Int32(10)));
+ xRowProperties->setPropertyValue("ActiveConnection", uno::Any(xConnection));
xRowSet->execute();
xRet.set( xRowSet, uno::UNO_QUERY );
}
@@ -2720,7 +2720,7 @@ OUString LoadAndRegisterDataSource_Impl(DBConnURIType type, const uno::Reference
uno::Reference < beans::XPropertySet > xDSSettings;
aSettings >>= xDSSettings;
::comphelper::copyProperties(*pSettings, xDSSettings);
- xDSSettings->setPropertyValue("Extension", uno::makeAny(sExt));
+ xDSSettings->setPropertyValue("Extension", uno::Any(sExt));
}
uno::Reference<sdb::XDocumentDataSource> xDS(xNewInstance, uno::UNO_QUERY_THROW);
@@ -2745,7 +2745,7 @@ OUString LoadAndRegisterDataSource_Impl(DBConnURIType type, const uno::Reference
// we can load it again next time the file is imported.
uno::Reference<lang::XMultiServiceFactory> xFactory(pDocShell->GetModel(), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xPropertySet(xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY);
- xPropertySet->setPropertyValue("EmbeddedDatabaseName", uno::makeAny(aStreamRelPath));
+ xPropertySet->setPropertyValue("EmbeddedDatabaseName", uno::Any(aStreamRelPath));
// Store it only after setting the above property, so that only one data source gets registered.
SwDBManager::StoreEmbeddedDataSource(xStore, xStorage, aStreamRelPath, aOwnURL);
@@ -2844,9 +2844,9 @@ void SwDBManager::StoreEmbeddedDataSource(const uno::Reference<frame::XStorable>
uno::Sequence<beans::PropertyValue> aSequence = comphelper::InitPropertySequence(
{
- {"TargetStorage", uno::makeAny(xStorage)},
- {"StreamRelPath", uno::makeAny(rStreamRelPath)},
- {"BaseURI", uno::makeAny(rOwnURL)}
+ {"TargetStorage", uno::Any(xStorage)},
+ {"StreamRelPath", uno::Any(rStreamRelPath)},
+ {"BaseURI", uno::Any(rOwnURL)}
});
if (bCopyTo)
xStorable->storeToURL(sTmpName, aSequence);
@@ -3110,10 +3110,10 @@ uno::Reference<sdbc::XResultSet> SwDBManager::createCursor(const OUString& _sDat
uno::Reference<beans::XPropertySet> xRowSetPropSet(xInstance, uno::UNO_QUERY);
if(xRowSetPropSet.is())
{
- xRowSetPropSet->setPropertyValue("DataSourceName", uno::makeAny(_sDataSourceName));
- xRowSetPropSet->setPropertyValue("ActiveConnection", uno::makeAny(_xConnection));
- xRowSetPropSet->setPropertyValue("Command", uno::makeAny(_sCommand));
- xRowSetPropSet->setPropertyValue("CommandType", uno::makeAny(_nCommandType));
+ xRowSetPropSet->setPropertyValue("DataSourceName", uno::Any(_sDataSourceName));
+ xRowSetPropSet->setPropertyValue("ActiveConnection", uno::Any(_xConnection));
+ xRowSetPropSet->setPropertyValue("Command", uno::Any(_sCommand));
+ xRowSetPropSet->setPropertyValue("CommandType", uno::Any(_nCommandType));
uno::Reference< sdb::XCompletedExecution > xRowSet(xInstance, uno::UNO_QUERY);
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx
index 200cbec1a478..86c1a73f37d4 100644
--- a/sw/source/uibase/dbui/mmconfigitem.cxx
+++ b/sw/source/uibase/dbui/mmconfigitem.cxx
@@ -855,15 +855,15 @@ Reference< XResultSet> const & SwMailMergeConfigItem::GetResultSet() const
Reference<XRowSet> xRowSet( xMgr->createInstance("com.sun.star.sdb.RowSet"), UNO_QUERY );
Reference<XPropertySet> xRowProperties(xRowSet, UNO_QUERY);
- xRowProperties->setPropertyValue("DataSourceName", makeAny(m_pImpl->m_aDBData.sDataSource));
- xRowProperties->setPropertyValue("Command", makeAny(m_pImpl->m_aDBData.sCommand));
- xRowProperties->setPropertyValue("CommandType", makeAny(m_pImpl->m_aDBData.nCommandType));
- xRowProperties->setPropertyValue("FetchSize", makeAny(sal_Int32(10)));
- xRowProperties->setPropertyValue("ActiveConnection", makeAny(m_pImpl->m_xConnection.getTyped()));
+ xRowProperties->setPropertyValue("DataSourceName", Any(m_pImpl->m_aDBData.sDataSource));
+ xRowProperties->setPropertyValue("Command", Any(m_pImpl->m_aDBData.sCommand));
+ xRowProperties->setPropertyValue("CommandType", Any(m_pImpl->m_aDBData.nCommandType));
+ xRowProperties->setPropertyValue("FetchSize", Any(sal_Int32(10)));
+ xRowProperties->setPropertyValue("ActiveConnection", Any(m_pImpl->m_xConnection.getTyped()));
try
{
- xRowProperties->setPropertyValue("ApplyFilter", makeAny(!m_pImpl->m_sFilter.isEmpty()));
- xRowProperties->setPropertyValue("Filter", makeAny(m_pImpl->m_sFilter));
+ xRowProperties->setPropertyValue("ApplyFilter", Any(!m_pImpl->m_sFilter.isEmpty()));
+ xRowProperties->setPropertyValue("Filter", Any(m_pImpl->m_sFilter));
}
catch (const Exception&)
{
@@ -909,8 +909,8 @@ void SwMailMergeConfigItem::SetFilter(OUString const & rFilter)
try
{
- xRowProperties->setPropertyValue("ApplyFilter", makeAny(!m_pImpl->m_sFilter.isEmpty()));
- xRowProperties->setPropertyValue("Filter", makeAny(m_pImpl->m_sFilter));
+ xRowProperties->setPropertyValue("ApplyFilter", Any(!m_pImpl->m_sFilter.isEmpty()));
+ xRowProperties->setPropertyValue("Filter", Any(m_pImpl->m_sFilter));
uno::Reference<XRowSet> xRowSet( m_pImpl->m_xResultSet, UNO_QUERY_THROW );
xRowSet->execute();
}
@@ -1004,7 +1004,7 @@ uno::Sequence<uno::Any> SwMailMergeConfigItem::GetSelection() const
std::vector<uno::Any> vResult;
for(sal_uInt32 nIdx=1; nIdx<nResultSetSize;++nIdx)
if( !IsRecordExcluded(nIdx) && IsRecordIncluded(nIdx) )
- vResult.push_back(uno::makeAny<sal_uInt32>(nIdx));
+ vResult.push_back(uno::Any(sal_uInt32(nIdx)));
return comphelper::containerToSequence(vResult);
}