summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/dptabsrc.cxx8
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx15
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewTable.cxx4
-rw-r--r--sc/source/ui/docshell/docsh4.cxx3
-rw-r--r--sc/source/ui/unoobj/appluno.cxx4
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx14
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx3
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx2
-rw-r--r--sc/source/ui/unoobj/condformatuno.cxx8
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx2
-rw-r--r--sc/source/ui/unoobj/datauno.cxx2
-rw-r--r--sc/source/ui/unoobj/fielduno.cxx3
-rw-r--r--sc/source/ui/unoobj/nameuno.cxx2
-rw-r--r--sc/source/ui/vba/vbachart.cxx5
14 files changed, 37 insertions, 38 deletions
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index b74bfd0ba152..1950c8500d39 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -410,9 +410,7 @@ uno::Sequence<double> ScDPSource::getFilteredResults(
double fVal = maResFilterSet.getLeafResult(aFilters[0]);
if (!std::isnan(fVal))
{
- uno::Sequence<double> aRet(1);
- aRet[0] = fVal;
- return aRet;
+ return { fVal };
}
}
@@ -1988,7 +1986,7 @@ uno::Sequence<sheet::MemberResult> SAL_CALL ScDPLevel::getResults()
if (pRes)
return *pRes;
- return uno::Sequence<sheet::MemberResult>(0); //TODO: Error?
+ return {}; //TODO: Error?
}
OUString SAL_CALL ScDPLevel::getName()
@@ -2059,7 +2057,7 @@ uno::Sequence<sal_Int16> ScDPLevel::getSubTotals() const
tools::Long nSrcDim = pSource->GetSourceDim( nDim );
if ( !pSource->SubTotalAllowed( nSrcDim ) )
- return uno::Sequence<sal_Int16>(0);
+ return {};
return aSubTotals;
}
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 938f0c79d403..968ebb0cdbfe 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -1687,11 +1687,16 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportFODS(SvStream &rStream)
uno::Reference<io::XInputStream> xStream(new ::utl::OSeekableInputStreamWrapper(rStream));
uno::Reference<uno::XInterface> xInterface(xMultiServiceFactory->createInstance("com.sun.star.comp.Writer.XmlFilterAdaptor"), uno::UNO_SET_THROW);
- css::uno::Sequence<OUString> aUserData(7);
- aUserData[0] = "com.sun.star.comp.filter.OdfFlatXml";
- aUserData[2] = "com.sun.star.comp.Calc.XMLOasisImporter";
- aUserData[3] = "com.sun.star.comp.Calc.XMLOasisExporter";
- aUserData[6] = "true";
+ css::uno::Sequence<OUString> aUserData
+ {
+ "com.sun.star.comp.filter.OdfFlatXml",
+ "",
+ "com.sun.star.comp.Calc.XMLOasisImporter",
+ "com.sun.star.comp.Calc.XMLOasisExporter",
+ "",
+ "",
+ "true"
+ };
uno::Sequence<beans::PropertyValue> aAdaptorArgs(comphelper::InitPropertySequence(
{
{ "UserData", uno::Any(aUserData) },
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
index 6c38d4d81fba..d04abdbeb68e 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
@@ -246,13 +246,13 @@ uno::Reference< XAccessibleTable > SAL_CALL ScAccessiblePreviewTable::getAccessi
uno::Sequence< sal_Int32 > SAL_CALL ScAccessiblePreviewTable::getSelectedAccessibleRows()
{
// in the page preview, there is no selection
- return uno::Sequence<sal_Int32>(0);
+ return {};
}
uno::Sequence< sal_Int32 > SAL_CALL ScAccessiblePreviewTable::getSelectedAccessibleColumns()
{
// in the page preview, there is no selection
- return uno::Sequence<sal_Int32>(0);
+ return {};
}
sal_Bool SAL_CALL ScAccessiblePreviewTable::isAccessibleRowSelected( sal_Int32 nRow )
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 9276a57ecfc6..f3eca38a7da9 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1395,8 +1395,7 @@ bool ScDocShell::ExecuteChangeProtectionDialog( bool bJustQueryIfProtected )
if ( bJustQueryIfProtected )
bDone = true;
else
- pChangeTrack->SetProtection(
- css::uno::Sequence< sal_Int8 > (0) );
+ pChangeTrack->SetProtection( {} );
}
else
{
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index cab5fc67026b..60adeffe2722 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -382,7 +382,7 @@ uno::Sequence<sal_Int32> SAL_CALL ScRecentFunctionsObj::getRecentFunctionIds()
pAry[i] = pFuncs[i];
return aSeq;
}
- return uno::Sequence<sal_Int32>(0);
+ return {};
}
void SAL_CALL ScRecentFunctionsObj::setRecentFunctionIds(
@@ -597,7 +597,7 @@ uno::Sequence<OUString> SAL_CALL ScFunctionListObj::getElementNames()
}
return aSeq;
}
- return uno::Sequence<OUString>(0);
+ return {};
}
sal_Bool SAL_CALL ScFunctionListObj::hasByName( const OUString& aName )
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 365291851c6f..1922781652d5 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -2978,7 +2978,7 @@ uno::Sequence< uno::Sequence<double> > SAL_CALL ScCellRangesBase::getData()
return aRowSeq;
}
- return uno::Sequence< uno::Sequence<double> >(0);
+ return {};
}
ScRangeListRef ScCellRangesBase::GetLimitedChartRanges_Impl( sal_Int32 nDataColumns, sal_Int32 nDataRows ) const
@@ -3080,7 +3080,7 @@ uno::Sequence<OUString> SAL_CALL ScCellRangesBase::getRowDescriptions()
return aSeq;
}
- return uno::Sequence<OUString>(0);
+ return {};
}
void SAL_CALL ScCellRangesBase::setRowDescriptions(
@@ -3149,7 +3149,7 @@ uno::Sequence<OUString> SAL_CALL ScCellRangesBase::getColumnDescriptions()
return aSeq;
}
- return uno::Sequence<OUString>(0);
+ return {};
}
void SAL_CALL ScCellRangesBase::setColumnDescriptions(
@@ -4094,7 +4094,7 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScCellRangesObj::getRangeAddress
return aSeq;
}
- return uno::Sequence<table::CellRangeAddress>(0); // can be empty
+ return {}; // can be empty
}
uno::Reference<container::XEnumerationAccess> SAL_CALL ScCellRangesObj::getCells()
@@ -4484,7 +4484,7 @@ uno::Sequence<OUString> SAL_CALL ScCellRangesObj::getElementNames()
}
return aSeq;
}
- return uno::Sequence<OUString>(0);
+ return {};
}
sal_Bool SAL_CALL ScCellRangesObj::hasByName( const OUString& aName )
@@ -6829,7 +6829,7 @@ uno::Sequence<sheet::TablePageBreakData> SAL_CALL ScTableSheetObj::getColumnPage
}
return aSeq;
}
- return uno::Sequence<sheet::TablePageBreakData>(0);
+ return {};
}
uno::Sequence<sheet::TablePageBreakData> SAL_CALL ScTableSheetObj::getRowPageBreaks()
@@ -6852,7 +6852,7 @@ uno::Sequence<sheet::TablePageBreakData> SAL_CALL ScTableSheetObj::getRowPageBre
}
return rDoc.GetRowBreakData(nTab);
}
- return uno::Sequence<sheet::TablePageBreakData>(0);
+ return {};
}
void SAL_CALL ScTableSheetObj::removeAllManualPageBreaks()
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 708833db0b1f..3bcdf315db82 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -2948,8 +2948,7 @@ uno::Sequence< OUString > SAL_CALL ScChart2DataSequence::getTextualData()
{
if( m_aTokens.front()->GetType() == svString )
{
- aSeq = uno::Sequence<OUString>(1);
- aSeq[0] = m_aTokens.front()->GetString().getString();
+ aSeq = uno::Sequence<OUString> { m_aTokens.front()->GetString().getString() };
}
}
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index 1530ed818b92..60e3d2aa4536 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -390,7 +390,7 @@ uno::Sequence<OUString> SAL_CALL ScChartsObj::getElementNames()
return aSeq;
}
- return uno::Sequence<OUString>(0);
+ return {};
}
sal_Bool SAL_CALL ScChartsObj::hasByName( const OUString& aName )
diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx
index e5e65dd7dcbf..573d70a75794 100644
--- a/sc/source/ui/unoobj/condformatuno.cxx
+++ b/sc/source/ui/unoobj/condformatuno.cxx
@@ -1340,9 +1340,11 @@ uno::Any SAL_CALL ScDataBarFormatObj::getPropertyValue( const OUString& aPropert
break;
case DataBarEntries:
{
- uno::Sequence<uno::Reference<sheet::XDataBarEntry> > aEntries(2);
- aEntries[0] = new ScDataBarEntryObj(this, 0);
- aEntries[1] = new ScDataBarEntryObj(this, 1);
+ uno::Sequence<uno::Reference<sheet::XDataBarEntry> > aEntries
+ {
+ new ScDataBarEntryObj(this, 0),
+ new ScDataBarEntryObj(this, 1)
+ };
aAny <<= aEntries;
}
break;
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index b7d3b9f33290..6b2abcb752dc 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -554,7 +554,7 @@ Sequence<OUString> SAL_CALL ScDataPilotTablesObj::getElementNames()
return aSeq;
}
}
- return Sequence<OUString>(0);
+ return {};
}
sal_Bool SAL_CALL ScDataPilotTablesObj::hasByName( const OUString& aName )
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 8bdc638c9705..0ed0529948ad 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -2298,7 +2298,7 @@ uno::Sequence<OUString> SAL_CALL ScDatabaseRangesObj::getElementNames()
return aSeq;
}
}
- return uno::Sequence<OUString>(0);
+ return {};
}
sal_Bool SAL_CALL ScDatabaseRangesObj::hasByName( const OUString& aName )
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index 151675b229ee..f537eaf94977 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -1252,8 +1252,7 @@ uno::Any SAL_CALL ScEditFieldObj::getPropertyValue( const OUString& aPropertyNam
if (aPropertyName == SC_UNONAME_ANCTYPES)
{
uno::Any aRet;
- uno::Sequence<text::TextContentAnchorType> aSeq(1);
- aSeq[0] = text::TextContentAnchorType_AS_CHARACTER;
+ uno::Sequence<text::TextContentAnchorType> aSeq { text::TextContentAnchorType_AS_CHARACTER };
aRet <<= aSeq;
return aRet;
}
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index a9fa465e6d2d..939cea49323d 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -686,7 +686,7 @@ uno::Sequence<OUString> SAL_CALL ScNamedRangesObj::getElementNames()
return aSeq;
}
}
- return uno::Sequence<OUString>(0);
+ return {};
}
sal_Bool SAL_CALL ScNamedRangesObj::hasByName( const OUString& aName )
diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx
index dcd73199f2bb..09c061a36ced 100644
--- a/sc/source/ui/vba/vbachart.cxx
+++ b/sc/source/ui/vba/vbachart.cxx
@@ -564,15 +564,12 @@ ScVbaChart::setSourceData( const css::uno::Reference< ::ooo::vba::excel::XRange
{
try
{
- uno::Sequence< table::CellRangeAddress > aRangeAddresses(1);
table::CellRangeAddress aSingleRangeAddress;
uno::Reference< sheet::XCellRangeAddressable > xAddressable( _xCalcRange->getCellRange(), uno::UNO_QUERY_THROW );
aSingleRangeAddress = xAddressable->getRangeAddress();
- aRangeAddresses[0] = aSingleRangeAddress;
-
- mxTableChart->setRanges(aRangeAddresses);
+ mxTableChart->setRanges({ aSingleRangeAddress } );
bool bsetRowHeaders = false;
bool bsetColumnHeaders = false;