diff options
Diffstat (limited to 'xmloff/source/text')
-rw-r--r-- | xmloff/source/text/XMLAutoTextEventExport.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexBibliographyEntryContext.cxx | 5 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx | 9 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexSimpleEntryContext.cxx | 9 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexSpanEntryContext.cxx | 5 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexTOCStylesContext.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexTemplateContext.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/text/txtfldi.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/text/txtimp.cxx | 5 |
9 files changed, 26 insertions, 22 deletions
diff --git a/xmloff/source/text/XMLAutoTextEventExport.cxx b/xmloff/source/text/XMLAutoTextEventExport.cxx index ca7c0282d452..21abaf0a7454 100644 --- a/xmloff/source/text/XMLAutoTextEventExport.cxx +++ b/xmloff/source/text/XMLAutoTextEventExport.cxx @@ -102,8 +102,7 @@ ErrCode XMLAutoTextEventExport::exportDoc( enum XMLTokenEnum ) try { - Sequence<Any> aArgs( 1 ); - aArgs[0] <<= GetDocHandler(); + Sequence<Any> aArgs{ Any(GetDocHandler()) }; // get filter component Reference< xml::sax::XDocumentHandler > xTmpDocHandler( diff --git a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx index 7218f563a0c7..fdb2657fd3e0 100644 --- a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx +++ b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx @@ -149,8 +149,9 @@ void XMLIndexBibliographyEntryContext::FillPropertyValues( // bibliography data field sal_Int32 nIndex = m_bCharStyleNameOK ? 2 : 1; - rValues[nIndex].Name = "BibliographyDataField"; - rValues[nIndex].Value <<= nBibliographyInfo; + auto pValues = rValues.getArray(); + pValues[nIndex].Name = "BibliographyDataField"; + pValues[nIndex].Value <<= nBibliographyInfo; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx index 4936a640b996..18355fe2e839 100644 --- a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx +++ b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx @@ -167,18 +167,19 @@ void XMLIndexChapterInfoEntryContext::FillPropertyValues( XMLIndexSimpleEntryContext::FillPropertyValues(rValues); sal_Int32 nIndex = m_bCharStyleNameOK ? 2 : 1; + auto pValues = rValues.getArray(); if( bChapterInfoOK ) { // chapter info field - rValues[nIndex].Name = "ChapterFormat"; - rValues[nIndex].Value <<= nChapterInfo; + pValues[nIndex].Name = "ChapterFormat"; + pValues[nIndex].Value <<= nChapterInfo; nIndex++; } if( bOutlineLevelOK ) { - rValues[nIndex].Name = "ChapterLevel"; - rValues[nIndex].Value <<= nOutlineLevel; + pValues[nIndex].Name = "ChapterLevel"; + pValues[nIndex].Value <<= nOutlineLevel; } } diff --git a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx index be728eac98f8..aa29f4c695e1 100644 --- a/xmloff/source/text/XMLIndexSimpleEntryContext.cxx +++ b/xmloff/source/text/XMLIndexSimpleEntryContext.cxx @@ -103,19 +103,20 @@ void XMLIndexSimpleEntryContext::FillPropertyValues( // only use slot so-and-so. Any aAny; + auto pValues = rValues.getArray(); // token type - rValues[0].Name = "TokenType"; - rValues[0].Value <<= m_rEntryType; + pValues[0].Name = "TokenType"; + pValues[0].Value <<= m_rEntryType; // char style if (m_bCharStyleNameOK) { - rValues[1].Name = "CharacterStyleName"; + pValues[1].Name = "CharacterStyleName"; aAny <<= GetImport().GetStyleDisplayName( XmlStyleFamily::TEXT_TEXT, m_sCharStyleName ); - rValues[1].Value = aAny; + pValues[1].Value = aAny; } } diff --git a/xmloff/source/text/XMLIndexSpanEntryContext.cxx b/xmloff/source/text/XMLIndexSpanEntryContext.cxx index a846674b30b9..ba0c976cfc53 100644 --- a/xmloff/source/text/XMLIndexSpanEntryContext.cxx +++ b/xmloff/source/text/XMLIndexSpanEntryContext.cxx @@ -53,10 +53,11 @@ void XMLIndexSpanEntryContext::FillPropertyValues( XMLIndexSimpleEntryContext::FillPropertyValues(rValues); // content + auto pValues = rValues.getArray(); Any aAny; aAny <<= sContent.makeStringAndClear(); - rValues[m_nValues-1].Name = "Text"; - rValues[m_nValues-1].Value = aAny; + pValues[m_nValues-1].Name = "Text"; + pValues[m_nValues-1].Value = aAny; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexTOCStylesContext.cxx b/xmloff/source/text/XMLIndexTOCStylesContext.cxx index aee1b9c9f70b..5331b687a9f9 100644 --- a/xmloff/source/text/XMLIndexTOCStylesContext.cxx +++ b/xmloff/source/text/XMLIndexTOCStylesContext.cxx @@ -86,9 +86,10 @@ void XMLIndexTOCStylesContext::endFastElement(sal_Int32 ) // copy vector into sequence const sal_Int32 nCount = aStyleNames.size(); Sequence<OUString> aStyleNamesSequence(nCount); + auto aStyleNamesSequenceRange = asNonConstRange(aStyleNamesSequence); for(sal_Int32 i = 0; i < nCount; i++) { - aStyleNamesSequence[i] = GetImport().GetStyleDisplayName( + aStyleNamesSequenceRange[i] = GetImport().GetStyleDisplayName( XmlStyleFamily::TEXT_PARAGRAPH, aStyleNames[i] ); } diff --git a/xmloff/source/text/XMLIndexTemplateContext.cxx b/xmloff/source/text/XMLIndexTemplateContext.cxx index 1b9fff15aaad..8dfa4b1fd984 100644 --- a/xmloff/source/text/XMLIndexTemplateContext.cxx +++ b/xmloff/source/text/XMLIndexTemplateContext.cxx @@ -38,6 +38,7 @@ #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/beans/XPropertySet.hpp> +#include <algorithm> using namespace ::std; using namespace ::xmloff::token; @@ -131,10 +132,7 @@ void XMLIndexTemplateContext::endFastElement(sal_Int32 ) const sal_Int32 nCount = aValueVector.size(); Sequence<PropertyValues> aValueSequence(nCount); - for(sal_Int32 i = 0; i<nCount; i++) - { - aValueSequence[i] = aValueVector[i]; - } + std::copy(aValueVector.begin(), aValueVector.end(), aValueSequence.getArray()); // get LevelFormat IndexReplace ... Any aAny = rPropertySet->getPropertyValue("LevelFormat"); diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index b983949c3b9a..ffcfad1d1d23 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -2997,9 +2997,10 @@ void XMLBibliographyFieldImportContext::PrepareField( // convert vector into sequence sal_Int32 nCount = aValues.size(); Sequence<PropertyValue> aValueSequence(nCount); + auto aValueSequenceRange = asNonConstRange(aValueSequence); for(sal_Int32 i = 0; i < nCount; i++) { - aValueSequence[i] = aValues[i]; + aValueSequenceRange[i] = aValues[i]; } // set sequence diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 9c05e72f9708..d8a90667b97d 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -1373,8 +1373,9 @@ OUString XMLTextImportHelper::SetStyleAndAttrs( xPropSet->getPropertyValue("ParaInteropGrabBag") >>= aGrabBag; sal_Int32 length = aGrabBag.getLength(); aGrabBag.realloc(length + 1); - aGrabBag[length].Name = "OutlineContentVisibleAttr"; - aGrabBag[length].Value <<= bool(bOutlineContentVisible); + auto pGrabBag = aGrabBag.getArray(); + pGrabBag[length].Name = "OutlineContentVisibleAttr"; + pGrabBag[length].Value <<= bool(bOutlineContentVisible); xPropSet->setPropertyValue("ParaInteropGrabBag", uno::makeAny(aGrabBag)); } // RFE: inserting headings into text documents (#i70748#) |