summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/globalfilter/globalfilter.cxx4
-rw-r--r--sw/qa/extras/mailmerge/mailmerge.cxx2
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx3
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx6
-rw-r--r--sw/qa/extras/unowriter/unowriter.cxx4
-rw-r--r--sw/qa/extras/ww8export/ww8export2.cxx2
-rw-r--r--sw/source/core/crsr/DropDownFormFieldButton.cxx2
-rw-r--r--sw/source/core/doc/docglos.cxx4
-rw-r--r--sw/source/core/doc/docxforms.cxx2
-rw-r--r--sw/source/core/edit/edfcol.cxx4
-rw-r--r--sw/source/core/fields/authfld.cxx2
-rw-r--r--sw/source/core/unocore/unochart.cxx4
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx2
-rw-r--r--sw/source/core/unocore/unoevent.cxx2
-rw-r--r--sw/source/core/unocore/unoframe.cxx2
-rw-r--r--sw/source/core/unocore/unoidx.cxx2
-rw-r--r--sw/source/filter/html/htmlforw.cxx2
-rw-r--r--sw/source/filter/html/wrthtml.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx40
-rw-r--r--sw/source/filter/ww8/docxexport.cxx18
-rw-r--r--sw/source/filter/ww8/docxexport.hxx2
-rw-r--r--sw/source/filter/ww8/docxtablestyleexport.cxx66
-rw-r--r--sw/source/filter/ww8/docxtablestyleexport.hxx2
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx4
-rw-r--r--sw/source/filter/ww8/rtfexport.hxx3
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx4
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/filter/xml/xmlimp.cxx4
-rw-r--r--sw/source/ui/config/optcomp.cxx2
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx4
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx10
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx4
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx4
-rw-r--r--sw/source/ui/dbui/mmoutputtypepage.cxx2
-rw-r--r--sw/source/ui/dbui/mmresultdialogs.cxx2
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx2
-rw-r--r--sw/source/ui/envelp/envlop1.cxx2
-rw-r--r--sw/source/ui/envelp/label1.cxx2
-rw-r--r--sw/source/ui/fldui/DropDownFieldDialog.cxx2
-rw-r--r--sw/source/ui/fldui/DropDownFormFieldDialog.cxx2
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx2
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx4
-rw-r--r--sw/source/ui/vba/vbaaddins.cxx2
-rw-r--r--sw/source/uibase/app/docsh.cxx2
-rw-r--r--sw/source/uibase/app/docshini.cxx2
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx4
-rw-r--r--sw/source/uibase/dbui/dbtree.cxx8
-rw-r--r--sw/source/uibase/lingu/olmenu.cxx8
-rw-r--r--sw/source/uibase/shells/textsh1.cxx2
-rw-r--r--sw/source/uibase/uno/unomailmerge.cxx2
52 files changed, 140 insertions, 134 deletions
diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx
index f9a8acf615f4..0d60df55210b 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -925,7 +925,7 @@ void Test::testBulletAsImage()
awt::Size aSize;
sal_Int16 nNumberingType = -1;
- for (beans::PropertyValue const & rProperty : aProperties)
+ for (beans::PropertyValue const & rProperty : std::as_const(aProperties))
{
if (rProperty.Name == "NumberingType")
{
@@ -985,7 +985,7 @@ void Test::testBulletAsImage()
awt::Size aSize;
sal_Int16 nNumberingType = -1;
- for (beans::PropertyValue const & rProperty : aProperties)
+ for (beans::PropertyValue const & rProperty : std::as_const(aProperties))
{
if (rProperty.Name == "NumberingType")
{
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx
index 51d80cea19ca..7144bd80f358 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -177,7 +177,7 @@ public:
void executeMailMerge( bool bDontLoadResult = false )
{
- uno::Sequence< beans::NamedValue > aSeqMailMergeArgs = comphelper::containerToSequence( mMMargs );
+ const uno::Sequence< beans::NamedValue > aSeqMailMergeArgs = comphelper::containerToSequence( mMMargs );
uno::Any res = mxJob->execute( aSeqMailMergeArgs );
bool bOk = true;
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 7d1f2debc760..5fbe7508cbeb 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -1618,7 +1618,8 @@ DECLARE_ODFEXPORT_TEST(testEmbeddedPdf, "embedded-pdf.odt")
aArgs[0] <<= maTempFile.GetURL();
uno::Reference<container::XNameAccess> xNameAccess(m_xSFactory->createInstanceWithArguments("com.sun.star.packages.zip.ZipFileAccess", aArgs), uno::UNO_QUERY);
bool bHasBitmap = false;
- for (const auto& rElementName : xNameAccess->getElementNames())
+ const uno::Sequence<OUString> aNames = xNameAccess->getElementNames();
+ for (const auto& rElementName : aNames)
{
if (rElementName.startsWith("Pictures") && rElementName.endsWith("png"))
{
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 3c955903a5e5..959a5990744c 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -1905,7 +1905,7 @@ void SwUiWriterTest::testDefaultsOfOutlineNumbering()
css::lang::Locale alocale;
alocale.Language = "en";
alocale.Country = "US";
- uno::Sequence<beans::PropertyValues> aPropVal(xDefNum->getDefaultContinuousNumberingLevels(alocale));
+ const uno::Sequence<beans::PropertyValues> aPropVal(xDefNum->getDefaultContinuousNumberingLevels(alocale));
CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aPropVal.getLength());
for(const auto& rPropValues : aPropVal)
{
@@ -1997,7 +1997,7 @@ void SwUiWriterTest::testTdf81995()
css::lang::Locale alocale;
alocale.Language = "en";
alocale.Country = "US";
- uno::Sequence<uno::Reference<container::XIndexAccess>> aIndexAccess(xDefNum->getDefaultOutlineNumberings(alocale));
+ const uno::Sequence<uno::Reference<container::XIndexAccess>> aIndexAccess(xDefNum->getDefaultOutlineNumberings(alocale));
CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aIndexAccess.getLength());
for(const auto& rIndexAccess : aIndexAccess)
{
@@ -2007,7 +2007,7 @@ void SwUiWriterTest::testTdf81995()
uno::Sequence<beans::PropertyValue> aProps;
rIndexAccess->getByIndex(j) >>= aProps;
CPPUNIT_ASSERT_EQUAL(sal_Int32(12), aProps.getLength());
- for(const beans::PropertyValue& rProp : aProps)
+ for(const beans::PropertyValue& rProp : std::as_const(aProps))
{
uno::Any aAny = rProp.Value;
if(rProp.Name == "Prefix" || rProp.Name == "Suffix" || rProp.Name == "BulletChar" || rProp.Name == "BulletFontName" || rProp.Name == "Transliteration")
diff --git a/sw/qa/extras/unowriter/unowriter.cxx b/sw/qa/extras/unowriter/unowriter.cxx
index ae3fa65be9df..e819cb9d7d7d 100644
--- a/sw/qa/extras/unowriter/unowriter.cxx
+++ b/sw/qa/extras/unowriter/unowriter.cxx
@@ -175,7 +175,7 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testGraphicDesciptorURLBitmap)
static bool ensureAutoTextExistsByTitle(const uno::Reference<text::XAutoTextGroup>& autoTextGroup,
const OUString& autoTextName)
{
- uno::Sequence<OUString> aTitles(autoTextGroup->getTitles());
+ const uno::Sequence<OUString> aTitles(autoTextGroup->getTitles());
for (const auto& rTitle : aTitles)
{
if (rTitle == autoTextName)
@@ -187,7 +187,7 @@ static bool ensureAutoTextExistsByTitle(const uno::Reference<text::XAutoTextGrou
static bool ensureAutoTextExistsByName(const uno::Reference<text::XAutoTextGroup>& autoTextGroup,
const OUString& autoTextName)
{
- uno::Sequence<OUString> aTitles(autoTextGroup->getElementNames());
+ const uno::Sequence<OUString> aTitles(autoTextGroup->getElementNames());
for (const auto& rTitle : aTitles)
{
if (rTitle == autoTextName)
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx
index 053307cb0d73..58997a1c7e27 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -296,7 +296,7 @@ DECLARE_WW8EXPORT_TEST(testTdf104805, "tdf104805.doc")
uno::Reference<container::XIndexAccess> xLevels(xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aNumberingRule;
xLevels->getByIndex(1) >>= aNumberingRule; // 2nd level
- for (const auto& rPair : aNumberingRule)
+ for (const auto& rPair : std::as_const(aNumberingRule))
{
if (rPair.Name == "Prefix")
// This was "." instead of empty, so the second paragraph was
diff --git a/sw/source/core/crsr/DropDownFormFieldButton.cxx b/sw/source/core/crsr/DropDownFormFieldButton.cxx
index d2c97f382e22..1114a1a97d40 100644
--- a/sw/source/core/crsr/DropDownFormFieldButton.cxx
+++ b/sw/source/core/crsr/DropDownFormFieldButton.cxx
@@ -55,7 +55,7 @@ SwFieldDialog::SwFieldDialog(SwEditWin* parent, sw::mark::IFieldmark* fieldBM, l
if (pListEntries != pParameters->end())
{
pListEntries->second >>= vListEntries;
- for (OUString const& i : vListEntries)
+ for (OUString const& i : std::as_const(vListEntries))
aListBox->InsertEntry(i);
}
diff --git a/sw/source/core/doc/docglos.cxx b/sw/source/core/doc/docglos.cxx
index ea05dac8a66f..8cd47c0e7c3c 100644
--- a/sw/source/core/doc/docglos.cxx
+++ b/sw/source/core/doc/docglos.cxx
@@ -54,7 +54,7 @@ void SwDoc::ReplaceUserDefinedDocumentProperties(
xDocProps->getUserDefinedProperties());
uno::Reference<beans::XPropertySet> xTargetUDSet(xTargetUD,
uno::UNO_QUERY_THROW);
- uno::Sequence<beans::Property> tgtprops
+ const uno::Sequence<beans::Property> tgtprops
= xTargetUDSet->getPropertySetInfo()->getProperties();
for (const auto& rTgtProp : tgtprops) {
@@ -67,7 +67,7 @@ void SwDoc::ReplaceUserDefinedDocumentProperties(
uno::Reference<beans::XPropertySetInfo> xSetInfo
= xSourceUDSet->getPropertySetInfo();
- uno::Sequence<beans::Property> srcprops = xSetInfo->getProperties();
+ const uno::Sequence<beans::Property> srcprops = xSetInfo->getProperties();
for (const auto& rSrcProp : srcprops) {
try {
diff --git a/sw/source/core/doc/docxforms.cxx b/sw/source/core/doc/docxforms.cxx
index dc4088f734a9..950683ed914c 100644
--- a/sw/source/core/doc/docxforms.cxx
+++ b/sw/source/core/doc/docxforms.cxx
@@ -92,7 +92,7 @@ void SwDoc::disposeXForms( )
if( mxXForms.is() )
{
// iterate over all models
- uno::Sequence<OUString> aNames = mxXForms->getElementNames();
+ const uno::Sequence<OUString> aNames = mxXForms->getElementNames();
for( const OUString& rName : aNames )
{
Reference< xforms::XModel > xModel(
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 5856527a1c8d..8dce2d6731d6 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -1095,7 +1095,7 @@ void SwEditShell::SetClassification(const OUString& rName, SfxClassificationPoli
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(xModel, uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xStyleFamilies = xStyleFamiliesSupplier->getStyleFamilies();
uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("PageStyles"), uno::UNO_QUERY);
- uno::Sequence<OUString> aStyles = xStyleFamily->getElementNames();
+ const uno::Sequence<OUString> aStyles = xStyleFamily->getElementNames();
for (const OUString& rPageStyleName : aStyles)
{
@@ -1616,7 +1616,7 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& rWatermark)
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(xModel, uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xStyleFamilies = xStyleFamiliesSupplier->getStyleFamilies();
uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName("PageStyles"), uno::UNO_QUERY);
- uno::Sequence<OUString> aStyles = xStyleFamily->getElementNames();
+ const uno::Sequence<OUString> aStyles = xStyleFamily->getElementNames();
for (const OUString& rPageStyleName : aStyles)
{
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index b42a91e56d65..8c91051135f9 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -636,7 +636,7 @@ bool SwAuthorityField::PutValue( const Any& rAny, sal_uInt16 /*nWhichId*/ )
OUStringBuffer sBuf;
comphelper::string::padToLength(sBuf, AUTH_FIELD_ISBN, TOX_STYLE_DELIMITER);
OUString sToSet(sBuf.makeStringAndClear());
- for(const PropertyValue& rParam : aParam)
+ for(const PropertyValue& rParam : std::as_const(aParam))
{
const sal_Int32 nFound = lcl_Find(rParam.Name);
if(nFound >= 0)
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 49d6a9b72c0a..f0ad74a61bb5 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -667,7 +667,7 @@ uno::Reference< chart2::data::XDataSource > SwChartDataProvider::Impl_createData
//!! by proceeding this way we automatically get rid of
//!! multiple listed or overlapping cell ranges which should
//!! just be ignored silently
- for (const OUString& rSubRange : aSubRanges)
+ for (const OUString& rSubRange : std::as_const(aSubRanges))
{
OUString aTableName, aStartCell, aEndCell;
bool bOk2 = GetTableAndCellsFromRangeRep(
@@ -1233,7 +1233,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwChartDataProvider::detectArgume
GetSubranges( aCellRanges, aSortedRanges, false /*sub ranges should already be normalized*/ );
SortSubranges( aSortedRanges, (nDtaSrcIsColumns == 1) );
OUString aSortedCellRanges;
- for (const OUString& rSortedRange : aSortedRanges)
+ for (const OUString& rSortedRange : std::as_const(aSortedRanges))
{
if (!aSortedCellRanges.isEmpty())
aSortedCellRanges += ";";
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index d18d9593852e..ddb0d1263768 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -1238,7 +1238,7 @@ void makeRedline( SwPaM const & rPaM,
aEntries.reserve(aRevertProperties.getLength());
sal_uInt16 nStyleId = USHRT_MAX;
sal_uInt16 nNumId = USHRT_MAX;
- for (const auto& rRevertProperty : aRevertProperties)
+ for (const auto& rRevertProperty : std::as_const(aRevertProperties))
{
const OUString &rPropertyName = rRevertProperty.Name;
SfxItemPropertySimpleEntry const* pEntry = rPropSet.getPropertyMap().getByName(rPropertyName);
diff --git a/sw/source/core/unocore/unoevent.cxx b/sw/source/core/unocore/unoevent.cxx
index 0d00638da1dd..c1b50004d150 100644
--- a/sw/source/core/unocore/unoevent.cxx
+++ b/sw/source/core/unocore/unoevent.cxx
@@ -141,7 +141,7 @@ void SwHyperlinkEventDescriptor::copyMacrosFromNameReplace(
container::XNameReplace> const & xReplace)
{
// iterate over all names (all names that *we* support)
- Sequence<OUString> aNames = getElementNames();
+ const Sequence<OUString> aNames = getElementNames();
for(const OUString& rName : aNames)
{
// copy element for that name
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index 4f974a3230d3..24bef2288a44 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1479,7 +1479,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
else if(aValue >>= aParam)
{
tools::PolyPolygon aPoly(static_cast<sal_uInt16>(aParam.getLength()));
- for(const ::drawing::PointSequence& rPointSeq : aParam)
+ for(const ::drawing::PointSequence& rPointSeq : std::as_const(aParam))
{
sal_Int32 nPoints = rPointSeq.getLength();
const ::awt::Point* pPoints = rPointSeq.getConstArray();
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 5a08d64b1068..fac4fcec2dc4 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -2677,7 +2677,7 @@ SwXDocumentIndex::TokenAccess_Impl::replaceByIndex(
}
OUStringBuffer sPattern;
- for(const beans::PropertyValues& rToken : aSeq)
+ for(const beans::PropertyValues& rToken : std::as_const(aSeq))
{
const beans::PropertyValue* pProperties = rToken.getConstArray();
const sal_Int32 nProperties = rToken.getLength();
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 87a190b322c0..0aec0dd8e16b 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -124,7 +124,7 @@ static void lcl_html_outEvents( SvStream& rStrm,
if( nPos == nCount )
return;
- uno::Sequence< script::ScriptEventDescriptor > aDescs =
+ const uno::Sequence< script::ScriptEventDescriptor > aDescs =
xEventManager->getScriptEvents( nPos );
if( !aDescs.hasElements() )
return;
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 1357b828c5dd..2fe1d4edc369 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -206,7 +206,7 @@ void SwHTMLWriter::SetupFilterOptions(const OUString& rFilterOptions)
mbEmbedImages = true;
}
- uno::Sequence<OUString> aOptionSeq = comphelper::string::convertCommaSeparated(rFilterOptions);
+ const uno::Sequence<OUString> aOptionSeq = comphelper::string::convertCommaSeparated(rFilterOptions);
const OUString aXhtmlNsKey("xhtmlns=");
for (const auto& rOption : aOptionSeq)
{
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index defd85643aea..af6301741cf6 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -814,7 +814,7 @@ void DocxAttributeOutput::WriteSdtBlock( sal_Int32& nSdtPrToken,
}
if (nSdtPrToken == FSNS( XML_w, XML_date ) || nSdtPrToken == FSNS( XML_w, XML_docPartObj ) || nSdtPrToken == FSNS( XML_w, XML_docPartList ) || nSdtPrToken == FSNS( XML_w14, XML_checkbox )) {
- uno::Sequence<xml::FastAttribute> aChildren = pSdtPrTokenChildren->getFastAttributes();
+ const uno::Sequence<xml::FastAttribute> aChildren = pSdtPrTokenChildren->getFastAttributes();
for( const auto& rChild : aChildren )
m_pSerializer->singleElement( rChild.Token,
FSNS(XML_w, XML_val), rChild.Value.toUtf8() );
@@ -2483,7 +2483,7 @@ void lclProcessRecursiveGrabBag(sal_Int32 aElementId, const css::uno::Sequence<c
}
}
- for (const auto& rAttribute : aAttributes)
+ for (const auto& rAttribute : std::as_const(aAttributes))
{
uno::Any aAny = rAttribute.Value;
OString aValue;
@@ -3630,14 +3630,14 @@ sal_Int32 lcl_getWordCompatibilityMode( const SwDoc& rDoc )
uno::Sequence< beans::PropertyValue > propList;
xPropSet->getPropertyValue( UNO_NAME_MISC_OBJ_INTEROPGRABBAG ) >>= propList;
- for ( const auto& rProp : propList )
+ for ( const auto& rProp : std::as_const(propList) )
{
if ( rProp.Name == "CompatSettings" )
{
css::uno::Sequence< css::beans::PropertyValue > aCurrentCompatSettings;
rProp.Value >>= aCurrentCompatSettings;
- for ( const auto& rCurrentCompatSetting : aCurrentCompatSettings )
+ for ( const auto& rCurrentCompatSetting : std::as_const(aCurrentCompatSettings) )
{
uno::Sequence< beans::PropertyValue > aCompatSetting;
rCurrentCompatSetting.Value >>= aCompatSetting;
@@ -3646,7 +3646,7 @@ sal_Int32 lcl_getWordCompatibilityMode( const SwDoc& rDoc )
OUString sUri;
OUString sVal;
- for ( const auto& rPropVal : aCompatSetting )
+ for ( const auto& rPropVal : std::as_const(aCompatSetting) )
{
if ( rPropVal.Name == "name" ) rPropVal.Value >>= sName;
if ( rPropVal.Name == "uri" ) rPropVal.Value >>= sUri;
@@ -3774,7 +3774,7 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
else if (rGrabBagElement.first == "TableStyleLook")
{
FastAttributeList* pAttributeList = FastSerializerHelper::createAttrList();
- uno::Sequence<beans::PropertyValue> aAttributeList = rGrabBagElement.second.get< uno::Sequence<beans::PropertyValue> >();
+ const uno::Sequence<beans::PropertyValue> aAttributeList = rGrabBagElement.second.get< uno::Sequence<beans::PropertyValue> >();
for (const auto& rAttribute : aAttributeList)
{
@@ -3804,7 +3804,7 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
else if (rGrabBagElement.first == "TablePosition" )
{
FastAttributeList *attrListTablePos = FastSerializerHelper::createAttrList( );
- uno::Sequence<beans::PropertyValue> aTablePosition = rGrabBagElement.second.get<uno::Sequence<beans::PropertyValue> >();
+ const uno::Sequence<beans::PropertyValue> aTablePosition = rGrabBagElement.second.get<uno::Sequence<beans::PropertyValue> >();
// look for a surrounding frame and take it's position values
const ww8::Frame* pFrame = m_rExport.GetFloatingTableFrame();
if( pFrame )
@@ -4378,7 +4378,7 @@ void DocxAttributeOutput::LatentStyles()
// Extract default attributes first.
sax_fastparser::FastAttributeList* pAttributeList = FastSerializerHelper::createAttrList();
uno::Sequence<beans::PropertyValue> aLsdExceptions;
- for (const auto& rLatentStyle : aLatentStyles)
+ for (const auto& rLatentStyle : std::as_const(aLatentStyles))
{
if (sal_Int32 nToken = DocxStringGetToken(aDefaultTokens, rLatentStyle.Name))
pAttributeList->add(FSNS(XML_w, nToken), OUStringToOString(rLatentStyle.Value.get<OUString>(), RTL_TEXTENCODING_UTF8));
@@ -4391,13 +4391,13 @@ void DocxAttributeOutput::LatentStyles()
pAttributeList = nullptr;
// Then handle the exceptions.
- for (const auto& rLsdException : aLsdExceptions)
+ for (const auto& rLsdException : std::as_const(aLsdExceptions))
{
pAttributeList = FastSerializerHelper::createAttrList();
uno::Sequence<beans::PropertyValue> aAttributes;
rLsdException.Value >>= aAttributes;
- for (const auto& rAttribute : aAttributes)
+ for (const auto& rAttribute : std::as_const(aAttributes))
if (sal_Int32 nToken = DocxStringGetToken(aExceptionTokens, rAttribute.Name))
pAttributeList->add(FSNS(XML_w, nToken), OUStringToOString(rAttribute.Value.get<OUString>(), RTL_TEXTENCODING_UTF8));
@@ -5177,7 +5177,7 @@ void DocxAttributeOutput::WritePostponedFormControl(const SdrObject* pObject)
uno::Reference<beans::XPropertySet> xPropertySet(xControlModel, uno::UNO_QUERY);
OUString sText = xPropertySet->getPropertyValue("Text").get<OUString>();
- uno::Sequence<OUString> aItems = xPropertySet->getPropertyValue("StringItemList").get< uno::Sequence<OUString> >();
+ const uno::Sequence<OUString> aItems = xPropertySet->getPropertyValue("StringItemList").get< uno::Sequence<OUString> >();
// output component
@@ -5360,7 +5360,7 @@ void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const S
if (pObjectsInterop != aObjectsInteropList.end())
pObjectsInterop->Value >>= aObjectInteropAttributes;
- for( const auto& rObjectInteropAttribute : aObjectInteropAttributes )
+ for( const auto& rObjectInteropAttribute : std::as_const(aObjectInteropAttributes) )
{
if ( rObjectInteropAttribute.Name == "ProgID" )
{
@@ -8695,7 +8695,7 @@ void DocxAttributeOutput::ParaGrabBag(const SfxGrabBagItem& rItem)
uno::Sequence<beans::PropertyValue> aGrabBagSeq;
rGrabBagElement.second >>= aGrabBagSeq;
- for (const auto& rProp : aGrabBagSeq)
+ for (const auto& rProp : std::as_const(aGrabBagSeq))
{
OString sVal = OUStringToOString(rProp.Value.get<OUString>(), RTL_TEXTENCODING_UTF8);
@@ -8726,7 +8726,7 @@ void DocxAttributeOutput::ParaGrabBag(const SfxGrabBagItem& rItem)
}
else if (rGrabBagElement.first == "SdtPr")
{
- uno::Sequence<beans::PropertyValue> aGrabBagSdt =
+ const uno::Sequence<beans::PropertyValue> aGrabBagSdt =
rGrabBagElement.second.get< uno::Sequence<beans::PropertyValue> >();
for (const beans::PropertyValue& aPropertyValue : aGrabBagSdt)
{
@@ -8740,7 +8740,7 @@ void DocxAttributeOutput::ParaGrabBag(const SfxGrabBagItem& rItem)
uno::Sequence<beans::PropertyValue> aGrabBag;
aPropertyValue.Value >>= aGrabBag;
- for (const auto& rProp : aGrabBag)
+ for (const auto& rProp : std::as_const(aGrabBag))
{
OUString sValue = rProp.Value.get<OUString>();
if (rProp.Name == "ooxml:CT_SdtDocPart_docPartGallery")
@@ -8774,7 +8774,7 @@ void DocxAttributeOutput::ParaGrabBag(const SfxGrabBagItem& rItem)
{
uno::Sequence<beans::PropertyValue> aGrabBag;
aPropertyValue.Value >>= aGrabBag;
- for (const auto& rProp : aGrabBag)
+ for (const auto& rProp : std::as_const(aGrabBag))
{
OUString sValue = rProp.Value.get<OUString>();
if (rProp.Name == "ooxml:CT_DataBinding_prefixMappings")
@@ -8802,7 +8802,7 @@ void DocxAttributeOutput::ParaGrabBag(const SfxGrabBagItem& rItem)
m_nParagraphSdtPrToken = FSNS( XML_w14, XML_checkbox );
uno::Sequence<beans::PropertyValue> aGrabBag;
aPropertyValue.Value >>= aGrabBag;
- for (const auto& rProp : aGrabBag)
+ for (const auto& rProp : std::as_const(aGrabBag))
{
OUString sValue = rProp.Value.get<OUString>();
if (rProp.Name == "ooxml:CT_SdtCheckbox_checked")
@@ -8959,7 +8959,7 @@ void DocxAttributeOutput::CharGrabBag( const SfxGrabBagItem& rItem )
}
else if (rGrabBagElement.first == "SdtPr" && FLY_NOT_PROCESSED != m_nStateOfFlyFrame )
{
- uno::Sequence<beans::PropertyValue> aGrabBagSdt =
+ const uno::Sequence<beans::PropertyValue> aGrabBagSdt =
rGrabBagElement.second.get< uno::Sequence<beans::PropertyValue> >();
for (const beans::PropertyValue& aPropertyValue : aGrabBagSdt)
{
@@ -8968,7 +8968,7 @@ void DocxAttributeOutput::CharGrabBag( const SfxGrabBagItem& rItem )
m_nRunSdtPrToken = FSNS( XML_w14, XML_checkbox );
uno::Sequence<beans::PropertyValue> aGrabBag;
aPropertyValue.Value >>= aGrabBag;
- for (const auto& rProp : aGrabBag)
+ for (const auto& rProp : std::as_const(aGrabBag))
{
OUString sValue = rProp.Value.get<OUString>();
if (rProp.Name == "ooxml:CT_SdtCheckbox_checked")
@@ -8989,7 +8989,7 @@ void DocxAttributeOutput::CharGrabBag( const SfxGrabBagItem& rItem )
{
uno::Sequence<beans::PropertyValue> aGrabBag;
aPropertyValue.Value >>= aGrabBag;
- for (const auto& rProp : aGrabBag)
+ for (const auto& rProp : std::as_const(aGrabBag))
{
OUString sValue = rProp.Value.get<OUString>();
if (rProp.Name == "ooxml:CT_DataBinding_prefixMappings")
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 06ddb97be542..0107c7a0d3ad 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -337,7 +337,7 @@ void DocxExport::DoComboBox(const OUString& rName,
const OUString& rHelp,
const OUString& rToolTip,
const OUString& rSelected,
- uno::Sequence<OUString>& rListItems)
+ const uno::Sequence<OUString>& rListItems)
{
m_pDocumentFS->startElementNS(XML_w, XML_ffData);
@@ -1042,14 +1042,14 @@ void DocxExport::WriteSettings()
uno::Sequence< beans::PropertyValue > propList;
xPropSet->getPropertyValue( aGrabBagName ) >>= propList;
- for( const auto& rProp : propList )
+ for( const auto& rProp : std::as_const(propList) )
{
if ( rProp.Name == "ThemeFontLangProps" )
{
uno::Sequence< beans::PropertyValue > themeFontLangProps;
rProp.Value >>= themeFontLangProps;
OUString aValues[3];
- for( const auto& rThemeFontLangProp : themeFontLangProps )
+ for( const auto& rThemeFontLangProp : std::as_const(themeFontLangProps) )
{
if( rThemeFontLangProp.Name == "val" )
rThemeFontLangProp.Value >>= aValues[0];
@@ -1070,7 +1070,7 @@ void DocxExport::WriteSettings()
uno::Sequence< beans::PropertyValue > aCompatSettingsSequence;
rProp.Value >>= aCompatSettingsSequence;
- for(const auto& rCompatSetting : aCompatSettingsSequence)
+ for(const auto& rCompatSetting : std::as_const(aCompatSettingsSequence))
{
uno::Sequence< beans::PropertyValue > aCompatSetting;
rCompatSetting.Value >>= aCompatSetting;
@@ -1078,7 +1078,7 @@ void DocxExport::WriteSettings()
OUString aUri;
OUString aValue;
- for(const auto& rPropVal : aCompatSetting)
+ for(const auto& rPropVal : std::as_const(aCompatSetting))
{
if( rPropVal.Name == "name" )
rPropVal.Value >>= aName;
@@ -1104,7 +1104,7 @@ void DocxExport::WriteSettings()
if (rAttributeList.hasElements())
{
sax_fastparser::FastAttributeList* pAttributeList = sax_fastparser::FastSerializerHelper::createAttrList();
- for (const auto& rAttribute : rAttributeList)
+ for (const auto& rAttribute : std::as_const(rAttributeList))
{
static DocxStringTokenMap const aTokens[] =
{
@@ -1202,7 +1202,7 @@ void DocxExport::WriteGlossary()
uno::Sequence< beans::PropertyValue > propList;
xPropSet->getPropertyValue( aName ) >>= propList;
sal_Int32 collectedProperties = 0;
- for ( const auto& rProp : propList )
+ for ( const auto& rProp : std::as_const(propList) )
{
OUString propName = rProp.Name;
if ( propName == "OOXGlossary" )
@@ -1236,7 +1236,7 @@ void DocxExport::WriteGlossary()
serializer->serialize( uno::Reference< xml::sax::XDocumentHandler >( writer, uno::UNO_QUERY_THROW ),
uno::Sequence< beans::StringPair >() );
- for ( const uno::Sequence< uno::Any>& glossaryElement : glossaryDomList)
+ for ( const uno::Sequence< uno::Any>& glossaryElement : std::as_const(glossaryDomList))
{
OUString gTarget, gType, gId, contentType;
uno::Reference<xml::dom::XDocument> xDom;
@@ -1391,7 +1391,7 @@ void DocxExport::WriteEmbeddings()
[](const beans::PropertyValue& rProp) { return rProp.Name == "OOXEmbeddings"; });
if (pProp != propList.end())
pProp->Value >>= embeddingsList;
- for (const auto& rEmbedding : embeddingsList)
+ for (const auto& rEmbedding : std::as_const(embeddingsList))
{
OUString embeddingPath = rEmbedding.Name;
uno::Reference<io::XInputStream> embeddingsStream;
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 396ea628ef61..1dfb33b327a2 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -176,7 +176,7 @@ public:
const OUString &rHelp,
const OUString &ToolTip,
const OUString &rSelected,
- css::uno::Sequence<OUString> &rListItems) override;
+ const css::uno::Sequence<OUString> &rListItems) override;
virtual void DoFormText(const SwInputField * pField) override;
diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx b/sw/source/filter/ww8/docxtablestyleexport.cxx
index 3471c695a175..930888444528 100644
--- a/sw/source/filter/ww8/docxtablestyleexport.cxx
+++ b/sw/source/filter/ww8/docxtablestyleexport.cxx
@@ -36,7 +36,7 @@ public:
{
}
- void TableStyle(uno::Sequence<beans::PropertyValue>& rStyle);
+ void TableStyle(const uno::Sequence<beans::PropertyValue>& rStyle);
void setSerializer(sax_fastparser::FSHelperPtr pSerializer)
{
@@ -51,40 +51,40 @@ public:
void handleBoolean(const OUString& aValue, sal_Int32 nToken);
/// Export of w:pPr.
- void tableStylePPr(uno::Sequence<beans::PropertyValue>& rPPr);
+ void tableStylePPr(const uno::Sequence<beans::PropertyValue>& rPPr);
/// Export of w:tblStylePr.
- void tableStyleTableStylePr(uno::Sequence<beans::PropertyValue>& rTableStylePr);
+ void tableStyleTableStylePr(const uno::Sequence<beans::PropertyValue>& rTableStylePr);
/// Export of w:rPr.
- void tableStyleRPr(uno::Sequence<beans::PropertyValue>& rRPr);
+ void tableStyleRPr(const uno::Sequence<beans::PropertyValue>& rRPr);
/// Export of w:rFonts.
- void tableStyleRRFonts(uno::Sequence<beans::PropertyValue>& rRFonts);
+ void tableStyleRRFonts(const uno::Sequence<beans::PropertyValue>& rRFonts);
/// Export of w:lang.
- void tableStyleRLang(uno::Sequence<beans::PropertyValue>& rLang);
+ void tableStyleRLang(const uno::Sequence<beans::PropertyValue>& rLang);
/// Export of w:ind in a pPr.
- void tableStylePInd(uno::Sequence<beans::PropertyValue>& rInd);
+ void tableStylePInd(const uno::Sequence<beans::PropertyValue>& rInd);
/// Export of w:spacing.
- void tableStylePSpacing(uno::Sequence<beans::PropertyValue>& rSpacing);
+ void tableStylePSpacing(const uno::Sequence<beans::PropertyValue>& rSpacing);
/// Export of w:tblPr.
- void tableStyleTablePr(uno::Sequence<beans::PropertyValue>& rTablePr);
+ void tableStyleTablePr(const uno::Sequence<beans::PropertyValue>& rTablePr);
/// Export of w:tcPr.
- void tableStyleTcPr(uno::Sequence<beans::PropertyValue>& rTcPr);
+ void tableStyleTcPr(const uno::Sequence<beans::PropertyValue>& rTcPr);
/// Export of w:tcBorders (and w:tblBorders).
- void tableStyleTcBorders(uno::Sequence<beans::PropertyValue>& rTcBorders,
+ void tableStyleTcBorders(const uno::Sequence<beans::PropertyValue>& rTcBorders,
sal_Int32 nToken = XML_tcBorders);
/// Export of w:tblInd.
- void tableStyleTableInd(uno::Sequence<beans::PropertyValue>& rTableInd);
+ void tableStyleTableInd(const uno::Sequence<beans::PropertyValue>& rTableInd);
/// Export of w:tblCellMar (and w:tcMar).
- void tableStyleTableCellMar(uno::Sequence<beans::PropertyValue>& rTableCellMar,
+ void tableStyleTableCellMar(const uno::Sequence<beans::PropertyValue>& rTableCellMar,
sal_Int32 nType = XML_tblCellMar);
/// Export of a given table cell border type.
void tableStyleTcBorder(sal_Int32 nToken, const uno::Sequence<beans::PropertyValue>& rTcBorder);
/// Export of w:shd.
- void tableStyleShd(uno::Sequence<beans::PropertyValue>& rShd);
+ void tableStyleShd(const uno::Sequence<beans::PropertyValue>& rShd);
/// Export of w:color.
- void tableStyleRColor(uno::Sequence<beans::PropertyValue>& rColor);
+ void tableStyleRColor(const uno::Sequence<beans::PropertyValue>& rColor);
};
-void DocxTableStyleExport::CnfStyle(uno::Sequence<beans::PropertyValue>& rAttributeList)
+void DocxTableStyleExport::CnfStyle(const uno::Sequence<beans::PropertyValue>& rAttributeList)
{
sax_fastparser::FastAttributeList* pAttributeList
= sax_fastparser::FastSerializerHelper::createAttrList();
@@ -147,7 +147,7 @@ void DocxTableStyleExport::TableStyles(sal_Int32 nCountStylesToWrite)
}
void DocxTableStyleExport::Impl::tableStyleTableCellMar(
- uno::Sequence<beans::PropertyValue>& rTableCellMar, sal_Int32 nType)
+ const uno::Sequence<beans::PropertyValue>& rTableCellMar, sal_Int32 nType)
{
static DocxStringTokenMap const aTableCellMarTokens[]
= { { "left", XML_left }, { "right", XML_right }, { "start", XML_start },
@@ -197,7 +197,7 @@ void DocxTableStyleExport::Impl::tableStyleTcBorder(
}
void DocxTableStyleExport::Impl::tableStyleTcBorders(
- uno::Sequence<beans::PropertyValue>& rTcBorders, sal_Int32 nToken)
+ const uno::Sequence<beans::PropertyValue>& rTcBorders, sal_Int32 nToken)
{
static DocxStringTokenMap const aTcBordersTokens[] = { { "left", XML_left },
{ "right", XML_right },
@@ -222,7 +222,7 @@ void DocxTableStyleExport::Impl::tableStyleTcBorders(
m_pSerializer->endElementNS(XML_w, nToken);
}
-void DocxTableStyleExport::Impl::tableStyleShd(uno::Sequence<beans::PropertyValue>& rShd)
+void DocxTableStyleExport::Impl::tableStyleShd(const uno::Sequence<beans::PropertyValue>& rShd)
{
if (!rShd.hasElements())
return;
@@ -250,7 +250,7 @@ void DocxTableStyleExport::Impl::tableStyleShd(uno::Sequence<beans::PropertyValu
m_pSerializer->singleElementNS(XML_w, XML_shd, xAttributeList);
}
-void DocxTableStyleExport::Impl::tableStyleRColor(uno::Sequence<beans::PropertyValue>& rColor)
+void DocxTableStyleExport::Impl::tableStyleRColor(const uno::Sequence<beans::PropertyValue>& rColor)
{
if (!rColor.hasElements())
return;
@@ -272,7 +272,7 @@ void DocxTableStyleExport::Impl::tableStyleRColor(uno::Sequence<beans::PropertyV
m_pSerializer->singleElementNS(XML_w, XML_color, xAttributeList);
}
-void DocxTableStyleExport::Impl::tableStyleRLang(uno::Sequence<beans::PropertyValue>& rLang)
+void DocxTableStyleExport::Impl::tableStyleRLang(const uno::Sequence<beans::PropertyValue>& rLang)
{
if (!rLang.hasElements())
return;
@@ -292,7 +292,8 @@ void DocxTableStyleExport::Impl::tableStyleRLang(uno::Sequence<beans::PropertyVa
m_pSerializer->singleElementNS(XML_w, XML_lang, xAttributeList);
}
-void DocxTableStyleExport::Impl::tableStyleRRFonts(uno::Sequence<beans::PropertyValue>& rRFonts)
+void DocxTableStyleExport::Impl::tableStyleRRFonts(
+ const uno::Sequence<beans::PropertyValue>& rRFonts)
{
if (!rRFonts.hasElements())
return;
@@ -315,7 +316,8 @@ void DocxTableStyleExport::Impl::tableStyleRRFonts(uno::Sequence<beans::Property
m_pSerializer->singleElementNS(XML_w, XML_rFonts, xAttributeList);
}
-void DocxTableStyleExport::Impl::tableStylePSpacing(uno::Sequence<beans::PropertyValue>& rSpacing)
+void DocxTableStyleExport::Impl::tableStylePSpacing(
+ const uno::Sequence<beans::PropertyValue>& rSpacing)
{
if (!rSpacing.hasElements())
return;
@@ -347,7 +349,7 @@ void DocxTableStyleExport::Impl::tableStylePSpacing(uno::Sequence<beans::Propert
m_pSerializer->singleElementNS(XML_w, XML_spacing, xAttributeList);
}
-void DocxTableStyleExport::Impl::tableStylePInd(uno::Sequence<beans::PropertyValue>& rInd)
+void DocxTableStyleExport::Impl::tableStylePInd(const uno::Sequence<beans::PropertyValue>& rInd)
{
if (!rInd.hasElements())
return;
@@ -365,7 +367,8 @@ void DocxTableStyleExport::Impl::tableStylePInd(uno::Sequence<beans::PropertyVal
m_pSerializer->singleElementNS(XML_w, XML_ind, xAttributeList);
}
-void DocxTableStyleExport::Impl::tableStyleTableInd(uno::Sequence<beans::PropertyValue>& rTableInd)
+void DocxTableStyleExport::Impl::tableStyleTableInd(
+ const uno::Sequence<beans::PropertyValue>& rTableInd)
{
if (!rTableInd.hasElements())
return;
@@ -395,7 +398,7 @@ void DocxTableStyleExport::Impl::handleBoolean(const OUString& aValue, sal_Int32
m_pSerializer->singleElementNS(XML_w, nToken, xAttributeList);
}
-void DocxTableStyleExport::Impl::tableStyleRPr(uno::Sequence<beans::PropertyValue>& rRPr)
+void DocxTableStyleExport::Impl::tableStyleRPr(const uno::Sequence<beans::PropertyValue>& rRPr)
{
if (!rRPr.hasElements())
return;
@@ -473,7 +476,7 @@ void DocxTableStyleExport::Impl::tableStyleRPr(uno::Sequence<beans::PropertyValu
m_pSerializer->endElementNS(XML_w, XML_rPr);
}
-void DocxTableStyleExport::Impl::tableStylePPr(uno::Sequence<beans::PropertyValue>& rPPr)
+void DocxTableStyleExport::Impl::tableStylePPr(const uno::Sequence<beans::PropertyValue>& rPPr)
{
if (!rPPr.hasElements())
return;
@@ -509,7 +512,8 @@ void DocxTableStyleExport::Impl::tableStylePPr(uno::Sequence<beans::PropertyValu
m_pSerializer->endElementNS(XML_w, XML_pPr);
}
-void DocxTableStyleExport::Impl::tableStyleTablePr(uno::Sequence<beans::PropertyValue>& rTablePr)
+void DocxTableStyleExport::Impl::tableStyleTablePr(
+ const uno::Sequence<beans::PropertyValue>& rTablePr)
{
if (!rTablePr.hasElements())
return;
@@ -547,7 +551,7 @@ void DocxTableStyleExport::Impl::tableStyleTablePr(uno::Sequence<beans::Property
m_pSerializer->endElementNS(XML_w, XML_tblPr);
}
-void DocxTableStyleExport::Impl::tableStyleTcPr(uno::Sequence<beans::PropertyValue>& rTcPr)
+void DocxTableStyleExport::Impl::tableStyleTcPr(const uno::Sequence<beans::PropertyValue>& rTcPr)
{
if (!rTcPr.hasElements())
return;
@@ -579,7 +583,7 @@ void DocxTableStyleExport::Impl::tableStyleTcPr(uno::Sequence<beans::PropertyVal
}
void DocxTableStyleExport::Impl::tableStyleTableStylePr(
- uno::Sequence<beans::PropertyValue>& rTableStylePr)
+ const uno::Sequence<beans::PropertyValue>& rTableStylePr)
{
if (!rTableStylePr.hasElements())
return;
@@ -619,7 +623,7 @@ void DocxTableStyleExport::Impl::tableStyleTableStylePr(
m_pSerializer->endElementNS(XML_w, XML_tblStylePr);
}
-void DocxTableStyleExport::Impl::TableStyle(uno::Sequence<beans::PropertyValue>& rStyle)
+void DocxTableStyleExport::Impl::TableStyle(const uno::Sequence<beans::PropertyValue>& rStyle)
{
bool bDefault = false;
bool bCustomStyle = false;
diff --git a/sw/source/filter/ww8/docxtablestyleexport.hxx b/sw/source/filter/ww8/docxtablestyleexport.hxx
index c6f0c219d596..8303aafdc518 100644
--- a/sw/source/filter/ww8/docxtablestyleexport.hxx
+++ b/sw/source/filter/ww8/docxtablestyleexport.hxx
@@ -39,7 +39,7 @@ public:
void TableStyles(sal_Int32 nCountStylesToWrite);
/// Writes <w:cnfStyle .../> based on grab-bagged para, cell or row properties.
- void CnfStyle(css::uno::Sequence<css::beans::PropertyValue>& rAttributeList);
+ void CnfStyle(const css::uno::Sequence<css::beans::PropertyValue>& rAttributeList);
void SetSerializer(const sax_fastparser::FSHelperPtr& pSerializer);
DocxTableStyleExport(SwDoc* pDoc, const sax_fastparser::FSHelperPtr& pSerializer);
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 85b775ad5bb1..2c4a01bc0ed7 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -2191,7 +2191,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const ww8::Frame& rFrame, const Poi
}
xPropSet->getPropertyValue("StringItemList") >>= aStrSeq;
- for (const auto& rStr : aStrSeq)
+ for (const auto& rStr : std::as_const(aStrSeq))
m_aRun
->append(
"{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FFL
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 4ffcda747017..5176f9a06664 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -330,7 +330,7 @@ void RtfExport::WriteHyperlinkData(const ::sw::mark::IFieldmark& /*rFieldmark*/)
void RtfExport::DoComboBox(const OUString& /*rName*/, const OUString& /*rHelp*/,
const OUString& /*rToolTip*/, const OUString& /*rSelected*/,
- uno::Sequence<OUString>& /*rListItems*/)
+ const uno::Sequence<OUString>& /*rListItems*/)
{
// this is handled in RtfAttributeOutput::OutputFlyFrame_Impl
}
@@ -564,7 +564,7 @@ void RtfExport::WriteUserProps()
{
uno::Reference<beans::XPropertySet> xPropertySet(xUserDefinedProperties,
uno::UNO_QUERY);
- uno::Sequence<beans::Property> aProperties
+ const uno::Sequence<beans::Property> aProperties
= xPropertySet->getPropertySetInfo()->getProperties();
for (const beans::Property& rProperty : aProperties)
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index bdc349bec5cc..ac9d2f980943 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -108,7 +108,8 @@ public:
void WriteHyperlinkData(const ::sw::mark::IFieldmark& rFieldmark) override;
void DoComboBox(const OUString& rName, const OUString& rHelp, const OUString& ToolTip,
- const OUString& rSelected, css::uno::Sequence<OUString>& rListItems) override;
+ const OUString& rSelected,
+ const css::uno::Sequence<OUString>& rListItems) override;
void DoFormText(const SwInputField* pField) override;
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 422e007a1cbc..93942e9e6f68 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -438,7 +438,7 @@ void WW8Export::DoComboBox(const OUString &rName,
const OUString &rHelp,
const OUString &rToolTip,
const OUString &rSelected,
- uno::Sequence<OUString> &rListItems)
+ const uno::Sequence<OUString> &rListItems)
{
OutputField(nullptr, ww::eFORMDROPDOWN, FieldString(ww::eFORMDROPDOWN),
FieldFlags::Start | FieldFlags::CmdStart);
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 58e6dc06e456..883f9b5eeba2 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -779,7 +779,7 @@ public:
const OUString &rHelp,
const OUString &ToolTip,
const OUString &rSelected,
- css::uno::Sequence<OUString> &rListItems) = 0;
+ const css::uno::Sequence<OUString> &rListItems) = 0;
virtual void DoFormText(const SwInputField * pField) = 0;
@@ -1141,7 +1141,7 @@ public:
const OUString &rHelp,
const OUString &ToolTip,
const OUString &rSelected,
- css::uno::Sequence<OUString> &rListItems) override;
+ const css::uno::Sequence<OUString> &rListItems) override;
virtual void DoFormText(const SwInputField * pField) override;
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index c1ac48f408fe..e4e9cee6cdd6 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4891,7 +4891,7 @@ void SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom,
if( xSFA->isFolder( aAddinPath ) )
sGlobalTemplates = xSFA->getFolderContents( aAddinPath, false );
- for ( const auto& rGlobalTemplate : sGlobalTemplates )
+ for ( const auto& rGlobalTemplate : std::as_const(sGlobalTemplates) )
{
INetURLObject aObj;
aObj.SetURL( rGlobalTemplate );
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index ca87bb3d13aa..fcfdd47b6231 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -520,7 +520,7 @@ void SwXMLImport::startDocument()
if( aAny >>= aFamiliesSeq )
{
SfxStyleFamily nFamilyMask = SfxStyleFamily::None;
- for( const OUString& rFamily : aFamiliesSeq )
+ for( const OUString& rFamily : std::as_const(aFamiliesSeq) )
{
if( rFamily=="FrameStyles" )
nFamilyMask |= SfxStyleFamily::Frame;
@@ -599,7 +599,7 @@ void SwXMLImport::startDocument()
if (xProps.is() && xInfo.is())
{
- for (const auto& rProp : aProps)
+ for (const auto& rProp : std::as_const(aProps))
{
if (xInfo->hasPropertyByName(rProp.Name))
{
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index e3953b4ad779..07a7eed9f536 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -208,7 +208,7 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet )
m_xMain->set_label(rText.replaceAll("%DOCNAME", sDocTitle));
// loading file formats
- Sequence< Sequence< PropertyValue > > aList = m_aConfigItem.GetList();
+ const Sequence< Sequence< PropertyValue > > aList = m_aConfigItem.GetList();
SvtCompatibilityEntry aEntry;
aEntry.setValue<bool>( SvtCompatibilityEntry::Index::ExpandWordSpace, false );
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 12818a36e2a5..4abc22e3c7ea 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -100,7 +100,7 @@ static OUString lcl_getFlatURL( uno::Reference<beans::XPropertySet> const & xSou
{
OUString sExtension;
OUString sCharSet;
- for(const auto& rInfo : aInfo)
+ for(const auto& rInfo : std::as_const(aInfo))
{
if(rInfo.Name == "Extension")
rInfo.Value >>= sExtension;
@@ -170,7 +170,7 @@ SwAddressListDialog::SwAddressListDialog(SwMailMergeAddressBlockPage* pParent)
SwDBConfig aDb;
const OUString sBibliography = aDb.GetBibliographySource().sDataSource;
- uno::Sequence< OUString> aNames = m_xDBContext->getElementNames();
+ const uno::Sequence< OUString> aNames = m_xDBContext->getElementNames();
for(const OUString& rName : aNames)
{
if ( rName == sBibliography )
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index b994a4e8ed44..dc595d295667 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -247,7 +247,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
}
}
Reference <XNameAccess> xCols = xColSupp->getColumns();
- Sequence<OUString> aColNames = xCols->getElementNames();
+ const Sequence<OUString> aColNames = xCols->getElementNames();
for (const OUString& rColName : aColNames)
{
std::unique_ptr<SwInsDBColumn> pNew(new SwInsDBColumn( rColName ));
@@ -1482,7 +1482,7 @@ void SwInsertDBColAutoPilot::ImplCommit()
{
Sequence <OUString> aNames = GetNodeNames(OUString());
//remove entries that contain this data source + table at first
- for(OUString const & nodeName : aNames)
+ for(OUString const & nodeName : std::as_const(aNames))
{
Sequence<OUString> aSourceNames(2);
OUString* pSourceNames = aSourceNames.getArray();
@@ -1552,7 +1552,7 @@ void SwInsertDBColAutoPilot::ImplCommit()
sColumnInsertNode += "0";
sColumnInsertNode += OUString::number( nCol );
- Sequence <OUString> aSubNodeNames = lcl_CreateSubNames(sColumnInsertNode);
+ const Sequence <OUString> aSubNodeNames = lcl_CreateSubNames(sColumnInsertNode);
Sequence<PropertyValue> aSubValues(aSubNodeNames.getLength());
PropertyValue* pSubValues = aSubValues.getArray();
sal_Int32 i = 0;
@@ -1592,7 +1592,7 @@ void SwInsertDBColAutoPilot::ImplCommit()
void SwInsertDBColAutoPilot::Load()
{
- Sequence<OUString> aNames = GetNodeNames(OUString());
+ const Sequence<OUString> aNames = GetNodeNames(OUString());
SvNumberFormatter& rNFormatr = *pView->GetWrtShell().GetNumberFormatter();
for(OUString const & nodeName : aNames)
{
@@ -1624,7 +1624,7 @@ void SwInsertDBColAutoPilot::Load()
pNewData->bIsEmptyHeadln = *o3tl::doAccess<bool>(pDataSourceProps[10]);
const OUString sSubNodeName(nodeName + "/ColumnSet/");
- Sequence <OUString> aSubNames = GetNodeNames(sSubNodeName);
+ const Sequence <OUString> aSubNames = GetNodeNames(sSubNodeName);
for(const OUString& rSubName : aSubNames)
{
Sequence <OUString> aSubNodeNames =
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index fb696970c763..ade32dbc2b9e 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -356,7 +356,7 @@ void SwSelectAddressBlockDialog::SetAddressBlocks(const uno::Sequence< OUString>
sal_uInt16 nSelectedAddress)
{
m_aAddressBlocks = rBlocks;
- for (const auto& rAddressBlock : m_aAddressBlocks)
+ for (const auto& rAddressBlock : std::as_const(m_aAddressBlocks))
m_xPreview->AddAddress(rAddressBlock);
m_xPreview->SelectAddress(nSelectedAddress);
}
@@ -863,7 +863,7 @@ void SwAssignFieldsControl::Init(SwAssignFieldsDialog* pDialog, SwMailMergeConfi
rNewLB.append_text(SwResId(SW_STR_NONE));
rNewLB.set_active(0);
- for (const OUString& rField : aFields)
+ for (const OUString& rField : std::as_const(aFields))
rNewLB.append_text(rField);
//select the ListBox
//if there is an assignment
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index ae105778768b..17748adec77c 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -265,7 +265,7 @@ void SwMailMergeGreetingsPage::ActivatePage()
if(xColsSupp.is())
{
Reference < container::XNameAccess> xColAccess = xColsSupp->getColumns();
- Sequence< OUString > aColumns = xColAccess->getElementNames();
+ const Sequence< OUString > aColumns = xColAccess->getElementNames();
for(const auto& rColumn : aColumns)
m_xFemaleColumnLB->append_text(rColumn);
}
@@ -377,7 +377,7 @@ SwMailBodyDialog::SwMailBodyDialog(weld::Window* pParent)
if(xColsSupp.is())
{
Reference < container::XNameAccess> xColAccess = xColsSupp->getColumns();
- Sequence< OUString > aColumns = xColAccess->getElementNames();
+ const Sequence< OUString > aColumns = xColAccess->getElementNames();
for(const auto& rColumn : aColumns)
m_xFemaleColumnLB->append_text(rColumn);
}
diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx
index 8422c2aa0a50..1ec126e0323c 100644
--- a/sw/source/ui/dbui/mmoutputtypepage.cxx
+++ b/sw/source/ui/dbui/mmoutputtypepage.cxx
@@ -185,7 +185,7 @@ void SwMailDispatcherListener_Impl::mailDeliveryError(
void SwMailDispatcherListener_Impl::DeleteAttachments( uno::Reference< mail::XMailMessage > const & xMessage )
{
- uno::Sequence< mail::MailAttachment > aAttachments = xMessage->getAttachments();
+ const uno::Sequence< mail::MailAttachment > aAttachments = xMessage->getAttachments();
for(const auto& rAttachment : aAttachments)
{
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx
index 8a4201d904c8..f107758feda0 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -386,7 +386,7 @@ void SwMMResultEmailDialog::FillInEmailSettings()
uno::Sequence< OUString > aFields;
if (xColAccess.is())
aFields = xColAccess->getElementNames();
- for (const OUString& rField : aFields)
+ for (const OUString& rField : std::as_const(aFields))
m_xMailToLB->append_text(rField);
m_xMailToLB->set_active(0);
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 04c05b858071..aa5a4263e861 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -75,7 +75,7 @@ SwSelectDBTableDialog::SwSelectDBTableDialog(weld::Window* pParent,
if (xQSupplier.is())
{
Reference<XNameAccess> xQueries = xQSupplier->getQueries();
- Sequence<OUString> aQueries = xQueries->getElementNames();
+ const Sequence<OUString> aQueries = xQueries->getElementNames();
int nPos = m_xTable->n_children();
for (const OUString& rQuery : aQueries)
{
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index 438498ab749f..f890236195cd 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -279,7 +279,7 @@ void SwEnvPage::InitDatabaseBox()
if (m_pSh->GetDBManager())
{
m_xDatabaseLB->clear();
- Sequence<OUString> aDataNames = SwDBManager::GetExistingDatabaseNames();
+ const Sequence<OUString> aDataNames = SwDBManager::GetExistingDatabaseNames();
for (const OUString& rDataName : aDataNames)
m_xDatabaseLB->append_text(rDataName);
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index 44e3345668f6..3be424ca0aa2 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -428,7 +428,7 @@ void SwLabPage::InitDatabaseBox()
if( GetDBManager() )
{
m_xDatabaseLB->clear();
- css::uno::Sequence<OUString> aDataNames = SwDBManager::GetExistingDatabaseNames();
+ const css::uno::Sequence<OUString> aDataNames = SwDBManager::GetExistingDatabaseNames();
for (const OUString& rDataName : aDataNames)
m_xDatabaseLB->append_text(rDataName);
sal_Int32 nIdx{ 0 };
diff --git a/sw/source/ui/fldui/DropDownFieldDialog.cxx b/sw/source/ui/fldui/DropDownFieldDialog.cxx
index ec050f5161d0..e5a549bbc69a 100644
--- a/sw/source/ui/fldui/DropDownFieldDialog.cxx
+++ b/sw/source/ui/fldui/DropDownFieldDialog.cxx
@@ -66,7 +66,7 @@ sw::DropDownFieldDialog::DropDownFieldDialog(weld::Widget *pParent, SwWrtShell &
OUString sTitle = m_xDialog->get_title();
sTitle += m_pDropField->GetPar2();
m_xDialog->set_title(sTitle);
- uno::Sequence< OUString > aItems = m_pDropField->GetItemSequence();
+ const uno::Sequence< OUString > aItems = m_pDropField->GetItemSequence();
for (const OUString& rItem : aItems)
m_xListItemsLB->append_text(rItem);
m_xListItemsLB->select_text(m_pDropField->GetSelectedItem());
diff --git a/sw/source/ui/fldui/DropDownFormFieldDialog.cxx b/sw/source/ui/fldui/DropDownFormFieldDialog.cxx
index 66dd8302543e..177fd00bb961 100644
--- a/sw/source/ui/fldui/DropDownFormFieldDialog.cxx
+++ b/sw/source/ui/fldui/DropDownFormFieldDialog.cxx
@@ -107,7 +107,7 @@ void DropDownFormFieldDialog::InitControls()
{
css::uno::Sequence<OUString> vListEntries;
pListEntries->second >>= vListEntries;
- for (const OUString& rItem : vListEntries)
+ for (const OUString& rItem : std::as_const(vListEntries))
m_xListItemsTreeView->append_text(rItem);
// Select the current one
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index 400a32238a80..26b32e94c3f6 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -257,7 +257,7 @@ IMPL_LINK_NOARG(SwFieldFuncPage, TypeHdl, weld::TreeView&, void)
if(bDropDown)
{
const SwDropDownField* pDrop = static_cast<const SwDropDownField*>(GetCurField());
- uno::Sequence<OUString> aItems = pDrop->GetItemSequence();
+ const uno::Sequence<OUString> aItems = pDrop->GetItemSequence();
m_xListItemsLB->clear();
for (const OUString& rItem : aItems)
m_xListItemsLB->append_text(rItem);
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index b1a0885e1eee..0d2c9f5a0bbb 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -1307,7 +1307,7 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, ChangeSourceHdl, weld::ToggleButton&, void)
uno::Sequence<beans::PropertyValue> aSeq;
if( aNames >>= aSeq)
{
- for(const beans::PropertyValue& rProp : aSeq)
+ for(const beans::PropertyValue& rProp : std::as_const(aSeq))
{
sal_Int16 nField = 0;
rProp.Value >>= nField;
@@ -1320,7 +1320,7 @@ IMPL_LINK_NOARG(SwAuthorMarkPane, ChangeSourceHdl, weld::ToggleButton&, void)
}
if(xBibAccess.is())
{
- uno::Sequence<OUString> aIdentifiers = xBibAccess->getElementNames();
+ const uno::Sequence<OUString> aIdentifiers = xBibAccess->getElementNames();
for(const OUString& rName : aIdentifiers)
m_xEntryLB->append_text(rName);
}
diff --git a/sw/source/ui/vba/vbaaddins.cxx b/sw/source/ui/vba/vbaaddins.cxx
index 7f71afcbca59..40fc577440ea 100644
--- a/sw/source/ui/vba/vbaaddins.cxx
+++ b/sw/source/ui/vba/vbaaddins.cxx
@@ -39,7 +39,7 @@ static uno::Reference< container::XIndexAccess > lcl_getAddinCollection( const u
SAL_INFO("sw.vba", "lcl_getAddinCollection: " << aAddinPath );
if( xSFA->isFolder( aAddinPath ) )
{
- uno::Sequence< OUString > sEntries = xSFA->getFolderContents( aAddinPath, false );
+ const uno::Sequence< OUString > sEntries = xSFA->getFolderContents( aAddinPath, false );
for( const OUString& sUrl : sEntries )
{
if( !xSFA->isFolder( sUrl ) && sUrl.endsWithIgnoreAsciiCase( ".dot" ) )
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 481dd8e7a2c1..de5eec3728fc 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -651,7 +651,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
{
uno::Reference< XLibraryContainer > xLibCont = GetBasicContainer();
uno::Reference< XNameAccess > xLib;
- Sequence<OUString> aNames = xLibCont->getElementNames();
+ const Sequence<OUString> aNames = xLibCont->getElementNames();
for(const OUString& rName : aNames)
{
Any aLib = xLibCont->getByName(rName);
diff --git a/sw/source/uibase/app/docshini.cxx b/sw/source/uibase/app/docshini.cxx
index a8fec573095d..3419b307d3fe 100644
--- a/sw/source/uibase/app/docshini.cxx
+++ b/sw/source/uibase/app/docshini.cxx
@@ -126,7 +126,7 @@ bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor )
if (!utl::ConfigManager::IsFuzzing())
{
SvxAsianConfig aAsian;
- Sequence<lang::Locale> aLocales = aAsian.GetStartEndCharLocales();
+ const Sequence<lang::Locale> aLocales = aAsian.GetStartEndCharLocales();
for(const lang::Locale& rLocale : aLocales)
{
ForbiddenCharacters aForbidden;
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 77a2439990d1..5be3ddce23e5 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -729,7 +729,7 @@ bool SwDBManager::GetTableNames(weld::ComboBox& rBox, const OUString& rDBName)
if(xTSupplier.is())
{
uno::Reference<container::XNameAccess> xTables = xTSupplier->getTables();
- uno::Sequence<OUString> aTables = xTables->getElementNames();
+ const uno::Sequence<OUString> aTables = xTables->getElementNames();
for (const OUString& rTable : aTables)
rBox.append("0", rTable);
}
@@ -737,7 +737,7 @@ bool SwDBManager::GetTableNames(weld::ComboBox& rBox, const OUString& rDBName)
if(xQSupplier.is())
{
uno::Reference<container::XNameAccess> xQueries = xQSupplier->getQueries();
- uno::Sequence<OUString> aQueries = xQueries->getElementNames();
+ const uno::Sequence<OUString> aQueries = xQueries->getElementNames();
for (const OUString& rQuery : aQueries)
rBox.append("1", rQuery);
}
diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx
index d7d9e96e626c..afbb49f38f61 100644
--- a/sw/source/uibase/dbui/dbtree.cxx
+++ b/sw/source/uibase/dbui/dbtree.cxx
@@ -160,7 +160,7 @@ void SwDBTreeList::InitTreeList()
{ return sort.compare(x, y) < 0; });
OUString aImg(RID_BMP_DB);
- for (const OUString& rDBName : aDBNames)
+ for (const OUString& rDBName : std::as_const(aDBNames))
{
Reference<XConnection> xConnection = pImpl->GetConnection(rDBName);
if (xConnection.is())
@@ -241,7 +241,7 @@ IMPL_LINK(SwDBTreeList, RequestingChildrenHdl, const weld::TreeIter&, rParent, b
if(xColsSupplier.is())
{
Reference <XNameAccess> xCols = xColsSupplier->getColumns();
- Sequence< OUString> aColNames = xCols->getElementNames();
+ const Sequence< OUString> aColNames = xCols->getElementNames();
for (const OUString& rColName : aColNames)
{
m_xTreeView->append(&rParent, rColName);
@@ -266,7 +266,7 @@ IMPL_LINK(SwDBTreeList, RequestingChildrenHdl, const weld::TreeIter&, rParent, b
if(xTSupplier.is())
{
Reference<XNameAccess> xTables = xTSupplier->getTables();
- Sequence< OUString> aTableNames = xTables->getElementNames();
+ const Sequence< OUString> aTableNames = xTables->getElementNames();
OUString aImg(RID_BMP_DBTABLE);
for (const OUString& rTableName : aTableNames)
{
@@ -279,7 +279,7 @@ IMPL_LINK(SwDBTreeList, RequestingChildrenHdl, const weld::TreeIter&, rParent, b
if(xQSupplier.is())
{
Reference<XNameAccess> xQueries = xQSupplier->getQueries();
- Sequence< OUString> aQueryNames = xQueries->getElementNames();
+ const Sequence< OUString> aQueryNames = xQueries->getElementNames();
OUString aImg(RID_BMP_DBQUERY);
for (const OUString& rQueryName : aQueryNames)
{
diff --git a/sw/source/uibase/lingu/olmenu.cxx b/sw/source/uibase/lingu/olmenu.cxx
index f7e6a7b69272..56743d132e6b 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -174,7 +174,7 @@ void SwSpellPopup::fillLangPopupMenu(
const sal_Int16 nMaxCount = 7;
if (xDocumentLanguages.is())
{
- uno::Sequence< lang::Locale > rLocales( xDocumentLanguages->getDocumentLanguages( static_cast<sal_Int16>(nScriptType), nMaxCount ) );
+ const uno::Sequence< lang::Locale > rLocales( xDocumentLanguages->getDocumentLanguages( static_cast<sal_Int16>(nScriptType), nMaxCount ) );
for (const lang::Locale& rLocale : rLocales)
{
if (aLangItems.size() == size_t(nMaxCount))
@@ -334,7 +334,7 @@ SwSpellPopup::SwSpellPopup(
m_aDics = xDicList->getDictionaries();
- for( const uno::Reference< linguistic2::XDictionary >& rDic : m_aDics )
+ for( const uno::Reference< linguistic2::XDictionary >& rDic : std::as_const(m_aDics) )
{
uno::Reference< linguistic2::XDictionary > xDicTmp = rDic;
if (!xDicTmp.is() || LinguMgr::GetIgnoreAllList() == xDicTmp)
@@ -452,7 +452,7 @@ SwSpellPopup::SwSpellPopup(
m_xPopupMenu->SetItemImage(MN_SHORT_COMMENT, Image(StockImage::Yes, BMP_INFO_16));
// Add an item to show detailed infos if the FullCommentURL property is defined
- beans::PropertyValues aProperties = rResult.aErrors[ nErrorInResult ].aProperties;
+ const beans::PropertyValues aProperties = rResult.aErrors[ nErrorInResult ].aProperties;
for ( const auto& rProp : aProperties )
{
if ( rProp.Name == "FullCommentURL" )
@@ -489,7 +489,7 @@ SwSpellPopup::SwSpellPopup(
}
sal_uInt16 nItemId = MN_SUGGESTION_START;
- for (const OUString& aEntry : m_aSuggestions)
+ for (const OUString& aEntry : std::as_const(m_aSuggestions))
{
m_xPopupMenu->InsertItem(nItemId, aEntry, MenuItemBits::NONE, OString(), nPos++);
m_xPopupMenu->SetHelpId(nItemId, HID_LINGU_REPLACE);
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 3f9e753f55fa..6bd22c3c919f 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1680,7 +1680,7 @@ void SwTextShell::GetState( SfxItemSet &rSet )
uno::Reference< XNameAccess > xFamilies = xSupplier->getStyleFamilies();
if (xFamilies->getByName("PageStyles") >>= xContainer)
{
- uno::Sequence< OUString > aSeqNames = xContainer->getElementNames();
+ const uno::Sequence< OUString > aSeqNames = xContainer->getElementNames();
for (const auto& rName : aSeqNames)
{
aStyleName = rName;
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index 851555f922b2..df7d54194bbd 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -561,7 +561,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
try
{
bool bEverythingsFine = true;
- for ( const Any& rBookmark : aCurSelection )
+ for ( const Any& rBookmark : std::as_const(aCurSelection) )
{
bEverythingsFine = xRowLocate->moveToBookmark( rBookmark );
if ( !bEverythingsFine )