Simplify Sequences initializations (desktop/e*/filter/forms/formula/fpicker)
includes removing of unused TOKEN_SEP Change-Id: Ic72d9d94bd8d07232699ee4d948f3b203d524491 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116833 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
This commit is contained in:
@@ -664,24 +664,25 @@ void UpdateDialog::notifyMenubar( bool bPrepareOnly, bool bRecheckOnly )
|
||||
sal_Int32 nCount = 0;
|
||||
for (sal_uInt16 i = 0, nItemCount = m_xUpdates->n_children(); i < nItemCount; ++i)
|
||||
{
|
||||
uno::Sequence< OUString > aItem(2);
|
||||
|
||||
UpdateDialog::Index const * p = reinterpret_cast< UpdateDialog::Index const * >(m_xUpdates->get_id(i).toInt64());
|
||||
|
||||
if ( p->m_eKind == ENABLED_UPDATE )
|
||||
{
|
||||
dp_gui::UpdateData aUpdData = m_enabledUpdates[ p->m_nIndex ];
|
||||
aItem[0] = dp_misc::getIdentifier( aUpdData.aInstalledPackage );
|
||||
|
||||
dp_misc::DescriptionInfoset aInfoset( m_context, aUpdData.aUpdateInfo );
|
||||
aItem[1] = aInfoset.getVersion();
|
||||
uno::Sequence< OUString > aItem
|
||||
{
|
||||
dp_misc::getIdentifier( aUpdData.aInstalledPackage ),
|
||||
aInfoset.getVersion()
|
||||
};
|
||||
aItemList.realloc( nCount + 1 );
|
||||
aItemList[ nCount ] = aItem;
|
||||
nCount += 1;
|
||||
}
|
||||
else
|
||||
continue;
|
||||
|
||||
aItemList.realloc( nCount + 1 );
|
||||
aItemList[ nCount ] = aItem;
|
||||
nCount += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,9 +91,7 @@ void OleEmbeddedObject::SwitchComponentToRunningState_Impl()
|
||||
uno::Sequence< sal_Int32 > OleEmbeddedObject::GetReachableStatesList_Impl(
|
||||
const uno::Sequence< embed::VerbDescriptor >& aVerbList )
|
||||
{
|
||||
uno::Sequence< sal_Int32 > aStates(2);
|
||||
aStates[0] = embed::EmbedStates::LOADED;
|
||||
aStates[1] = embed::EmbedStates::RUNNING;
|
||||
uno::Sequence< sal_Int32 > aStates { embed::EmbedStates::LOADED, embed::EmbedStates::RUNNING };
|
||||
for ( embed::VerbDescriptor const & vd : aVerbList )
|
||||
if ( vd.VerbID == embed::EmbedVerbs::MS_OLEVERB_OPEN )
|
||||
{
|
||||
|
||||
@@ -29,10 +29,11 @@ using namespace ::com::sun::star;
|
||||
|
||||
uno::Sequence< OUString > SAL_CALL VCLBitmapCreator::impl_staticGetSupportedServiceNames()
|
||||
{
|
||||
uno::Sequence< OUString > aRet(2);
|
||||
aRet[0] = "com.sun.star.embed.BitmapCreator";
|
||||
aRet[1] = "com.sun.star.comp.embed.BitmapCreator";
|
||||
return aRet;
|
||||
return
|
||||
{
|
||||
"com.sun.star.embed.BitmapCreator",
|
||||
"com.sun.star.comp.embed.BitmapCreator"
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -27,10 +27,11 @@ using namespace ::com::sun::star;
|
||||
|
||||
uno::Sequence< OUString > SAL_CALL MainThreadExecutor::impl_staticGetSupportedServiceNames()
|
||||
{
|
||||
uno::Sequence< OUString > aRet(2);
|
||||
aRet[0] = "com.sun.star.thread.MainThreadExecutor";
|
||||
aRet[1] = "com.sun.star.comp.thread.MainThreadExecutor";
|
||||
return aRet;
|
||||
return
|
||||
{
|
||||
"com.sun.star.thread.MainThreadExecutor",
|
||||
"com.sun.star.comp.thread.MainThreadExecutor"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -96,8 +96,7 @@ static Reference< XInterface > createAllListenerAdapter
|
||||
Reference< XInvocation > xInvocationToAllListenerMapper =
|
||||
new InvocationToAllListenerMapper(xListenerType, xListener, Helper);
|
||||
Type aListenerType( xListenerType->getTypeClass(), xListenerType->getName());
|
||||
Sequence<Type> arg2(1);
|
||||
arg2[0] = aListenerType;
|
||||
Sequence<Type> arg2 { aListenerType };
|
||||
xAdapter = xInvocationAdapterFactory->createAdapter( xInvocationToAllListenerMapper, arg2 );
|
||||
}
|
||||
return xAdapter;
|
||||
|
||||
@@ -53,8 +53,7 @@ void CustomToolBarImportHelper::applyIcons()
|
||||
for (auto const& concommand : iconcommands)
|
||||
{
|
||||
uno::Sequence<OUString> commands { concommand.sCommand };
|
||||
uno::Sequence< uno::Reference< graphic::XGraphic > > images(1);
|
||||
images[ 0 ] = concommand.image;
|
||||
uno::Sequence< uno::Reference< graphic::XGraphic > > images { concommand.image };
|
||||
|
||||
uno::Reference< ui::XImageManager > xImageManager( getCfgManager()->getImageManager(), uno::UNO_QUERY_THROW );
|
||||
sal_uInt16 nColor = ui::ImageType::COLOR_NORMAL;
|
||||
|
||||
@@ -89,11 +89,8 @@ XPdfDecomposer::getDecomposition(const uno::Reference<util::XBinaryDataContainer
|
||||
0));
|
||||
|
||||
// create primitive
|
||||
uno::Sequence<uno::Reference<graphic::XPrimitive2D>> aSequence(1);
|
||||
aSequence[0] = new drawinglayer::primitive2d::BitmapPrimitive2D(
|
||||
VCLUnoHelper::CreateVCLXBitmap(aReplacement), aBitmapTransform);
|
||||
|
||||
return aSequence;
|
||||
return { new drawinglayer::primitive2d::BitmapPrimitive2D(
|
||||
VCLUnoHelper::CreateVCLXBitmap(aReplacement), aBitmapTransform) };
|
||||
}
|
||||
|
||||
OUString SAL_CALL XPdfDecomposer::getImplementationName()
|
||||
|
||||
@@ -1306,17 +1306,16 @@ bool filter_info_impl::operator==( const filter_info_impl& r ) const
|
||||
|
||||
Sequence< OUString > filter_info_impl::getFilterUserData() const
|
||||
{
|
||||
Sequence< OUString > aUserData(8);
|
||||
|
||||
aUserData[0] = "com.sun.star.documentconversion.XSLTFilter";
|
||||
aUserData[1] = OUString::boolean( mbNeedsXSLT2 );
|
||||
aUserData[2] = maImportService;
|
||||
aUserData[3] = maExportService;
|
||||
aUserData[4] = maImportXSLT;
|
||||
aUserData[5] = maExportXSLT;
|
||||
aUserData[7] = maComment;
|
||||
|
||||
return aUserData;
|
||||
return
|
||||
{
|
||||
"com.sun.star.documentconversion.XSLTFilter",
|
||||
OUString::boolean( mbNeedsXSLT2 ),
|
||||
maImportService,
|
||||
maExportService,
|
||||
maImportXSLT,
|
||||
maExportXSLT,
|
||||
maComment
|
||||
};
|
||||
}
|
||||
|
||||
OUString string_encode( const OUString & rText )
|
||||
|
||||
@@ -1271,8 +1271,7 @@ namespace frm
|
||||
aValue <<= m_aDefaultSelectSeq;
|
||||
else if (m_nNULLPos != -1) // bound Listbox
|
||||
{
|
||||
Sequence<sal_Int16> aSeq(1);
|
||||
aSeq.getArray()[0] = m_nNULLPos;
|
||||
Sequence<sal_Int16> aSeq { m_nNULLPos };
|
||||
aValue <<= aSeq;
|
||||
}
|
||||
else
|
||||
@@ -1707,14 +1706,15 @@ namespace frm
|
||||
|
||||
Sequence< Type > OListBoxModel::getSupportedBindingTypes()
|
||||
{
|
||||
Sequence< Type > aTypes(6);
|
||||
aTypes[0] = cppu::UnoType<Sequence< Any >>::get();
|
||||
aTypes[1] = cppu::UnoType<Any>::get();
|
||||
aTypes[2] = cppu::UnoType<Sequence< sal_Int32 >>::get();
|
||||
aTypes[3] = cppu::UnoType<sal_Int32>::get();
|
||||
aTypes[4] = cppu::UnoType<Sequence< OUString >>::get();
|
||||
aTypes[5] = cppu::UnoType<OUString>::get();
|
||||
return aTypes;
|
||||
return
|
||||
{
|
||||
cppu::UnoType<Sequence< Any >>::get(),
|
||||
cppu::UnoType<Any>::get(),
|
||||
cppu::UnoType<Sequence< sal_Int32 >>::get(),
|
||||
cppu::UnoType<sal_Int32>::get(),
|
||||
cppu::UnoType<Sequence< OUString >>::get(),
|
||||
cppu::UnoType<OUString>::get()
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
// For tab page
|
||||
#define TOKEN_OPEN 0
|
||||
#define TOKEN_CLOSE 1
|
||||
#define TOKEN_SEP 2
|
||||
namespace formula
|
||||
{
|
||||
|
||||
@@ -355,10 +354,8 @@ void FormulaDlg_Impl::InitFormulaOpCodeMapper()
|
||||
m_aFunctionOpCodes = m_xOpCodeMapper->getAvailableMappings( sheet::FormulaLanguage::ODFF, sheet::FormulaMapGroup::FUNCTIONS);
|
||||
m_pFunctionOpCodesEnd = m_aFunctionOpCodes.getConstArray() + m_aFunctionOpCodes.getLength();
|
||||
|
||||
uno::Sequence< OUString > aArgs(3);
|
||||
aArgs[TOKEN_OPEN] = "(";
|
||||
aArgs[TOKEN_CLOSE] = ")";
|
||||
aArgs[TOKEN_SEP] = ";";
|
||||
// 0:TOKEN_OPEN, 1:TOKEN_CLOSE, 2:TOKEN_SEP
|
||||
uno::Sequence< OUString > aArgs { "(", ")", ";" };
|
||||
m_aSeparatorsOpCodes = m_xOpCodeMapper->getMappings( aArgs, sheet::FormulaLanguage::ODFF);
|
||||
|
||||
m_aSpecialOpCodes = m_xOpCodeMapper->getAvailableMappings( sheet::FormulaLanguage::ODFF, sheet::FormulaMapGroup::SPECIAL);
|
||||
@@ -395,8 +392,7 @@ sal_Int32 FormulaDlg_Impl::GetFunctionPos(sal_Int32 nPos)
|
||||
while ( pIter != pEnd )
|
||||
{
|
||||
const sal_Int32 eOp = pIter->OpCode;
|
||||
uno::Sequence<sheet::FormulaToken> aArgs(1);
|
||||
aArgs[0] = *pIter;
|
||||
uno::Sequence<sheet::FormulaToken> aArgs { *pIter };
|
||||
const OUString aString = xParser->printFormula( aArgs, aRefPos);
|
||||
const sheet::FormulaToken* pNextToken = pIter + 1;
|
||||
|
||||
@@ -593,12 +589,11 @@ void FormulaDlg_Impl::MakeTree(StructPage* _pTree, weld::TreeIter* pParent, cons
|
||||
|
||||
// #i101512# for output, the original token is needed
|
||||
const FormulaToken* pOrigToken = (_pToken->GetType() == svFAP) ? _pToken->GetFAPOrigToken() : _pToken;
|
||||
uno::Sequence<sheet::FormulaToken> aArgs(1);
|
||||
::std::map<const FormulaToken*, sheet::FormulaToken>::const_iterator itr = m_aTokenMap.find(pOrigToken);
|
||||
if (itr == m_aTokenMap.end())
|
||||
return;
|
||||
|
||||
aArgs[0] = itr->second;
|
||||
uno::Sequence<sheet::FormulaToken> aArgs { itr->second };
|
||||
try
|
||||
{
|
||||
const table::CellAddress aRefPos(m_pHelper->getReferencePosition());
|
||||
|
||||
@@ -1462,9 +1462,7 @@ bool SvtFileDialog::PrepareExecute()
|
||||
INetURLObject::DecodeMechanism::NONE ),
|
||||
Reference< XCommandEnvironment >(),
|
||||
comphelper::getProcessComponentContext() );
|
||||
Sequence< OUString > aProps(2);
|
||||
aProps[0] = "IsVolume";
|
||||
aProps[1] = "IsRemoveable";
|
||||
Sequence< OUString > aProps { "IsVolume", "IsRemoveable" };
|
||||
|
||||
Reference< XResultSet > xResultSet
|
||||
= aCnt.createCursor( aProps, ::ucbhelper::INCLUDE_FOLDERS_ONLY );
|
||||
|
||||
Reference in New Issue
Block a user