sw/source/writerfilter/dmapper/DomainMapper.cxx             |    6 +-
 sw/source/writerfilter/dmapper/DomainMapperTableHandler.cxx |    6 +-
 sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx        |   30 ++++++------
 sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx        |    2 
 sw/source/writerfilter/dmapper/NumberingManager.cxx         |    8 +--
 sw/source/writerfilter/dmapper/PropertyMap.cxx              |   14 ++---
 sw/source/writerfilter/dmapper/PropertyMap.hxx              |    2 
 sw/source/writerfilter/dmapper/StyleSheetTable.cxx          |   10 ++--
 8 files changed, 39 insertions(+), 39 deletions(-)

New commits:
commit bff6b30a58e4935d341567bd143673f266e8254d
Author:     Noel Grandin <[email protected]>
AuthorDate: Tue Feb 24 22:03:10 2026 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Wed Feb 25 09:34:37 2026 +0100

    remove some Sequence<->vector conversion
    
    Change-Id: I5af80969cb3eaec9515fb164b65b5d0016c1f5af
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200263
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/sw/source/writerfilter/dmapper/DomainMapper.cxx 
b/sw/source/writerfilter/dmapper/DomainMapper.cxx
index 2cf85379ac9c..c302f76b8546 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper.cxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper.cxx
@@ -3226,7 +3226,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const 
PropertyMapPtr& rContext )
         resolveSprmProps(*this, rSprm );
 
         // Get all the properties that were processed in the 
'rPrChange'->'rPr' XML node
-        uno::Sequence< beans::PropertyValue > currentRedlineRevertProperties = 
m_pImpl->GetTopContext()->GetPropertyValues();
+        std::vector< beans::PropertyValue > currentRedlineRevertProperties = 
m_pImpl->GetTopContext()->GetPropertyValues();
 
         // Pop back out the character properties that were on the run
         m_pImpl->PopProperties(CONTEXT_CHARACTER);
@@ -3246,7 +3246,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const 
PropertyMapPtr& rContext )
         resolveSprmProps(*this, rSprm );
 
         // Get all the properties that were processed in the 
'pPrChange'->'pPr' XML node
-        uno::Sequence< beans::PropertyValue > currentRedlineRevertProperties = 
m_pImpl->GetTopContext()->GetPropertyValues();
+        std::vector< beans::PropertyValue > currentRedlineRevertProperties = 
m_pImpl->GetTopContext()->GetPropertyValues();
 
         // Pop back out the character properties that were on the run
         m_pImpl->PopProperties(CONTEXT_PARAGRAPH);
@@ -4534,7 +4534,7 @@ void DomainMapper::lcl_utext(const sal_Unicode *const 
data_, size_t len)
     if (aInfo.nSprmId == NS_ooxml::LN_CT_Ruby_rt)
     {
         PropertyMapPtr pContext = m_pImpl->GetTopContext();
-        PropertyValueVector_t aProps = comphelper::sequenceToContainer< 
PropertyValueVector_t >(pContext->GetPropertyValues());
+        std::vector<css::beans::PropertyValue> aProps = 
pContext->GetPropertyValues();
         OUString sStyle = getOrCreateCharStyle(aProps, 
/*bAlwaysCreate=*/false);
         m_pImpl->SetRubyText(sText,sStyle);
         return;
diff --git a/sw/source/writerfilter/dmapper/DomainMapperTableHandler.cxx 
b/sw/source/writerfilter/dmapper/DomainMapperTableHandler.cxx
index ab0fd12a0efa..dfbcf929c88d 100644
--- a/sw/source/writerfilter/dmapper/DomainMapperTableHandler.cxx
+++ b/sw/source/writerfilter/dmapper/DomainMapperTableHandler.cxx
@@ -684,7 +684,7 @@ TableStyleSheetEntry * 
DomainMapperTableHandler::endTableGetTableStyle(TableInfo
             }
         }
 
-        rInfo.aTableProperties = m_aTableProperties->GetPropertyValues();
+        rInfo.aTableProperties = 
comphelper::containerToSequence(m_aTableProperties->GetPropertyValues());
         rInfo.aTablePropertyIds = m_aTableProperties->GetPropertyIds();
 
 #ifdef DBG_UTIL
@@ -967,7 +967,7 @@ CellPropertyValuesSeq_t 
DomainMapperTableHandler::endTableGetCellProperties(Tabl
                     }
                     (*aCellIterator)->Erase(PROP_HORIZONTAL_MERGE);
                 }
-                pSingleCellProperties[nCell] = 
(*aCellIterator)->GetPropertyValues();
+                pSingleCellProperties[nCell] = 
comphelper::containerToSequence((*aCellIterator)->GetPropertyValues());
 #ifdef DBG_UTIL
                 TagLogger::getInstance().endElement();
 #endif
@@ -1125,7 +1125,7 @@ css::uno::Sequence<css::beans::PropertyValues> 
DomainMapperTableHandler::endTabl
                 rRow->Insert(PROP_SIZE_TYPE, uno::Any(text::SizeType::FIX));
             }
 
-            aRowPropertiesRange[nRow] = rRow->GetPropertyValues();
+            aRowPropertiesRange[nRow] = 
comphelper::containerToSequence(rRow->GetPropertyValues());
 #ifdef DBG_UTIL
             rRow->dumpXml();
             lcl_DumpPropertyValues(aRowProperties[nRow]);
diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx 
b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
index cc33d3c82b15..f1d1fe765b98 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx
@@ -2669,7 +2669,7 @@ void DomainMapper_Impl::finishParagraph( const 
ParagraphPropertyMapPtr& pParaCon
             std::vector<beans::PropertyValue> aProperties;
             if (pParaContext)
             {
-                aProperties = comphelper::sequenceToContainer< 
std::vector<beans::PropertyValue> >(pParaContext->GetPropertyValues());
+                aProperties = pParaContext->GetPropertyValues();
 
                 // tdf#64222 filter out the "paragraph marker" formatting and
                 // set it as a separate paragraph property, not a empty hint at
@@ -3521,7 +3521,7 @@ void DomainMapper_Impl::appendTextPortion( const 
OUString& rString, const Proper
     {
         applyToggleAttributes(pPropertyMap);
         // If we are in comments, then disable CharGrabBag, comment text 
doesn't support that.
-        uno::Sequence<beans::PropertyValue> aValues = 
pPropertyMap->GetPropertyValues(/*bCharGrabBag=*/!IsInComments());
+        uno::Sequence<beans::PropertyValue> aValues = 
comphelper::containerToSequence(pPropertyMap->GetPropertyValues(/*bCharGrabBag=*/!IsInComments()));
 
         if (IsInTOC() || m_bStartIndex || m_bStartBibliography)
             for( auto& rValue : asNonConstRange(aValues) )
@@ -3577,8 +3577,8 @@ void DomainMapper_Impl::appendTextPortion( const 
OUString& rString, const Proper
                 {
                     // It is content of hyperlink field. We need to create and 
remember
                     // character style for later applying to hyperlink
-                    PropertyValueVector_t aProps = 
comphelper::sequenceToContainer< PropertyValueVector_t 
>(GetTopContext()->GetPropertyValues());
-                    OUString sHyperlinkStyleName = 
GetStyleSheetTable()->getOrCreateCharStyle(aProps, /*bAlwaysCreate=*/false);
+                    const PropertyValueVector_t& rProps = 
GetTopContext()->GetPropertyValues();
+                    OUString sHyperlinkStyleName = 
GetStyleSheetTable()->getOrCreateCharStyle(rProps, /*bAlwaysCreate=*/false);
                     
GetTopFieldContext()->SetHyperlinkStyle(sHyperlinkStyleName);
                 }
 
@@ -4292,7 +4292,7 @@ void DomainMapper_Impl::PushFootOrEndnote( bool 
bIsFootnote )
         pTopContext->SetFootnote(xFootnote, sFootnoteCharStyleName);
         uno::Sequence< beans::PropertyValue > aFontProperties;
         if (GetTopContextOfType(CONTEXT_CHARACTER))
-            aFontProperties = 
GetTopContextOfType(CONTEXT_CHARACTER)->GetPropertyValues();
+            aFontProperties = 
comphelper::containerToSequence(GetTopContextOfType(CONTEXT_CHARACTER)->GetPropertyValues());
         appendTextContent( xFootnote, aFontProperties );
         m_aTextAppendStack.push(TextAppendContext(xFootnote,
                     
xFootnote->createTextCursorByRange(xFootnote->getStart())));
@@ -5266,7 +5266,7 @@ bool DomainMapper_Impl::IsSdtEndBefore()
     if(!pContext)
         return false;
     bool bIsSdtEndBefore = false;
-    const uno::Sequence< beans::PropertyValue > currentCharProps = 
pContext->GetPropertyValues();
+    const std::vector< beans::PropertyValue > & currentCharProps = 
pContext->GetPropertyValues();
     for (const auto& rCurrentCharProp : currentCharProps)
     {
         if (rCurrentCharProp.Name == "CharInteropGrabBag")
@@ -5546,7 +5546,7 @@ void DomainMapper_Impl::HandleLineBreak(const 
PropertyMapPtr& pPropertyMap)
     {
         rtl::Reference<SwXLineBreak> xLineBreak = 
m_xTextDocument->createLineBreak();
         xLineBreak->setPropertyValue(u"Clear"_ustr, 
uno::Any(*m_StreamStateStack.top().oLineBreakClear));
-        appendTextContent(xLineBreak, pPropertyMap->GetPropertyValues());
+        appendTextContent(xLineBreak, 
comphelper::containerToSequence(pPropertyMap->GetPropertyValues()));
     }
     m_StreamStateStack.top().oLineBreakClear.reset();
 }
@@ -7009,7 +7009,7 @@ void  DomainMapper_Impl::handleRubyEQField( const 
FieldContextPtr& pContext)
         pRubyContext->Insert(PROP_CHAR_HEIGHT, aVal);
         pRubyContext->Insert(PROP_CHAR_HEIGHT_ASIAN, aVal);
     }
-    PropertyValueVector_t aProps = comphelper::sequenceToContainer< 
PropertyValueVector_t >(pRubyContext->GetPropertyValues());
+    PropertyValueVector_t aProps = pRubyContext->GetPropertyValues();
     aInfo.sRubyStyle = m_rDMapper.getOrCreateCharStyle(aProps, 
/*bAlwaysCreate=*/false);
     PropertyMapPtr pCharContext(new PropertyMap());
     if (m_pLastCharacterContext)
@@ -8652,11 +8652,11 @@ void DomainMapper_Impl::CloseFieldCommand()
                             PropertyMapPtr pCharTopContext = 
GetTopContextOfType(CONTEXT_CHARACTER);
                             if (pCharTopContext.is())
                             {
-                                uno::Sequence<beans::PropertyValue> 
aContextValues
+                                const std::vector<beans::PropertyValue>& 
rContextValues
                                     = pCharTopContext->GetPropertyValues(
                                         /*bCharGrabBag=*/!IsInComments());
                                 OUString sFontName = 
getPropertyName(PROP_CHAR_FONT_NAME);
-                                for (const beans::PropertyValue& rProperty : 
aContextValues)
+                                for (const beans::PropertyValue& rProperty : 
rContextValues)
                                 {
                                     if (!bHasFont || 
!rProperty.Name.startsWith(sFontName))
                                     {
@@ -8756,9 +8756,9 @@ void DomainMapper_Impl::CloseFieldCommand()
                         xFieldInterface->setPropertyValue(u"Fields"_ustr, 
uno::Any(aValues));
                     }
 
-                    uno::Sequence<beans::PropertyValue> aValues
+                    const std::vector<beans::PropertyValue>& rValues
                         = 
m_aFieldStack.back()->getProperties()->GetPropertyValues();
-                    appendTextContent(xFieldInterface, aValues);
+                    appendTextContent(xFieldInterface, 
comphelper::containerToSequence(rValues));
                     pContext->m_bSetCitation = true;
                 }
                 break;
@@ -9189,7 +9189,7 @@ void DomainMapper_Impl::PopFieldContext()
                         if (m_pLastCharacterContext && IsRTFImport())
                             aMap.InsertProps(m_pLastCharacterContext);
                         
aMap.InsertProps(m_aFieldStack.back()->getProperties());
-                        appendTextContent(xToInsert, aMap.GetPropertyValues());
+                        appendTextContent(xToInsert, 
comphelper::containerToSequence(aMap.GetPropertyValues()));
                         CheckRedline( xToInsert->getAnchor( ) );
                     }
                     else
@@ -9998,10 +9998,10 @@ void DomainMapper_Impl::SetCurrentRedlineToken( 
sal_Int32 nToken )
     m_currentRedline->m_nToken = nToken;
 }
 
-void DomainMapper_Impl::SetCurrentRedlineRevertProperties( const 
uno::Sequence<beans::PropertyValue>& aProperties )
+void DomainMapper_Impl::SetCurrentRedlineRevertProperties( const 
std::vector<beans::PropertyValue>& aProperties )
 {
     assert(m_currentRedline);
-    m_currentRedline->m_aRevertProperties = aProperties;
+    m_currentRedline->m_aRevertProperties = 
comphelper::containerToSequence(aProperties);
 }
 
 
diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx 
b/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx
index 08c0b5e0f465..db5050ef7e39 100644
--- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx
+++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx
@@ -1115,7 +1115,7 @@ public:
     void SetCurrentRedlineDate( const OUString& sDate );
     void SetCurrentRedlineId( sal_Int32 nId );
     void SetCurrentRedlineToken( sal_Int32 nToken );
-    void SetCurrentRedlineRevertProperties( const 
css::uno::Sequence<css::beans::PropertyValue>& aProperties );
+    void SetCurrentRedlineRevertProperties( const std::vector< 
css::beans::PropertyValue >& aProperties );
     void SetCurrentRedlineIsRead();
     void RemoveTopRedline( );
     void SetCurrentRedlineInitials( const OUString& sInitials );
diff --git a/sw/source/writerfilter/dmapper/NumberingManager.cxx 
b/sw/source/writerfilter/dmapper/NumberingManager.cxx
index bd8070c5b777..2f515c578c6d 100644
--- a/sw/source/writerfilter/dmapper/NumberingManager.cxx
+++ b/sw/source/writerfilter/dmapper/NumberingManager.cxx
@@ -177,9 +177,9 @@ uno::Sequence< beans::PropertyValue > 
ListLevel::GetCharStyleProperties( )
 {
     PropertyValueVector_t rProperties;
 
-    const uno::Sequence< beans::PropertyValue > vPropVals = 
PropertyMap::GetPropertyValues();
+    const std::vector< beans::PropertyValue >& rPropVals = 
PropertyMap::GetPropertyValues();
     const bool bIsSymbol(GetBulletChar().getLength() <= 1);
-    for( const auto& rPropNal : vPropVals )
+    for( const auto& rPropNal : rPropVals )
         if (! IgnoreForCharStyle(rPropNal.Name, bIsSymbol))
             rProperties.emplace_back(rPropNal.Name, 0, rPropNal.Value, 
beans::PropertyState_DIRECT_VALUE);
 
@@ -294,7 +294,7 @@ void ListLevel::AddParaProperties( uno::Sequence< 
beans::PropertyValue >* props
     if( hasFirstLineIndent && hasIndentAt )
         return; // has them all, nothing to add
 
-    const uno::Sequence< beans::PropertyValue > aParaProps = 
m_pParaStyle->m_pProperties->GetPropertyValues( );
+    const std::vector< beans::PropertyValue >& rParaProps = 
m_pParaStyle->m_pProperties->GetPropertyValues( );
 
     // ParaFirstLineIndent -> FirstLineIndent
     // ParaLeftMargin -> IndentAt
@@ -304,7 +304,7 @@ void ListLevel::AddParaProperties( uno::Sequence< 
beans::PropertyValue >* props
     const OUString sParaLeftMargin = getPropertyName(
             PROP_PARA_LEFT_MARGIN );
 
-    for ( const auto& rParaProp : aParaProps )
+    for ( const auto& rParaProp : rParaProps )
     {
         if ( !hasFirstLineIndent && rParaProp.Name == sParaIndent )
         {
diff --git a/sw/source/writerfilter/dmapper/PropertyMap.cxx 
b/sw/source/writerfilter/dmapper/PropertyMap.cxx
index fe85029db329..e9245d9ee4d5 100644
--- a/sw/source/writerfilter/dmapper/PropertyMap.cxx
+++ b/sw/source/writerfilter/dmapper/PropertyMap.cxx
@@ -84,12 +84,12 @@ using namespace com::sun::star;
 
 namespace writerfilter::dmapper {
 
-uno::Sequence< beans::PropertyValue > PropertyMap::GetPropertyValues( bool 
bCharGrabBag )
+const std::vector<css::beans::PropertyValue> & PropertyMap::GetPropertyValues( 
bool bCharGrabBag )
 {
     using comphelper::makePropertyValue;
 
     if ( !m_aValues.empty() || m_vMap.empty() )
-        return comphelper::containerToSequence( m_aValues );
+        return m_aValues;
 
     size_t nCharGrabBag = 0;
     size_t nParaGrabBag = 0;
@@ -206,7 +206,7 @@ uno::Sequence< beans::PropertyValue > 
PropertyMap::GetPropertyValues( bool bChar
     if ( nRowGrabBag )
         m_aValues.push_back( makePropertyValue( u"RowInteropGrabBag"_ustr, 
uno::Any( aRowGrabBagValues ) ) );
 
-    return comphelper::containerToSequence( m_aValues );
+    return m_aValues;
 }
 
 std::vector< PropertyIds > PropertyMap::GetPropertyIds()
@@ -2169,19 +2169,19 @@ void SectionPropertyMap::ApplyProperties_( const 
rtl::Reference<SwXPageStyle>& x
     std::vector< uno::Any > vValues;
     {
         // Convert GetPropertyValues() value into something useful
-        const uno::Sequence< beans::PropertyValue > vPropVals = 
GetPropertyValues();
+        const std::vector< beans::PropertyValue >& vPropVals = 
GetPropertyValues();
 
         //Temporarily store the items that are in grab bags
         uno::Sequence< beans::PropertyValue > vCharVals;
         uno::Sequence< beans::PropertyValue > vParaVals;
-        const beans::PropertyValue* pCharGrabBag = std::find_if( 
vPropVals.begin(), vPropVals.end(), NamedPropertyValue( 
u"CharInteropGrabBag"_ustr ) );
+        auto pCharGrabBag = std::find_if( vPropVals.begin(), vPropVals.end(), 
NamedPropertyValue( u"CharInteropGrabBag"_ustr ) );
         if ( pCharGrabBag != vPropVals.end() )
             (pCharGrabBag->Value) >>= vCharVals;
-        const beans::PropertyValue* pParaGrabBag = std::find_if( 
vPropVals.begin(), vPropVals.end(), NamedPropertyValue( 
u"ParaInteropGrabBag"_ustr ) );
+        auto pParaGrabBag = std::find_if( vPropVals.begin(), vPropVals.end(), 
NamedPropertyValue( u"ParaInteropGrabBag"_ustr ) );
         if ( pParaGrabBag != vPropVals.end() )
             (pParaGrabBag->Value) >>= vParaVals;
 
-        for ( const beans::PropertyValue* pIter = vPropVals.begin(); pIter != 
vPropVals.end(); ++pIter )
+        for ( auto pIter = vPropVals.begin(); pIter != vPropVals.end(); 
++pIter )
         {
             if ( pIter != pCharGrabBag && pIter != pParaGrabBag
                  && pIter->Name != "IsProtected" //section-only property
diff --git a/sw/source/writerfilter/dmapper/PropertyMap.hxx 
b/sw/source/writerfilter/dmapper/PropertyMap.hxx
index 9e7a881e6f1f..96ed4e720773 100644
--- a/sw/source/writerfilter/dmapper/PropertyMap.hxx
+++ b/sw/source/writerfilter/dmapper/PropertyMap.hxx
@@ -159,7 +159,7 @@ public:
 
     // Sequence: Grab Bags: The CHAR_GRAB_BAG has Name "CharInteropGrabBag" 
and the PARA_GRAB_BAG has Name "ParaInteropGrabBag"
     // the contained properties are their Value.
-    css::uno::Sequence< css::beans::PropertyValue > GetPropertyValues( bool 
bCharGrabBag = true );
+    const std::vector<css::beans::PropertyValue>& GetPropertyValues( bool 
bCharGrabBag = true );
 
     std::vector< PropertyIds > GetPropertyIds();
 
diff --git a/sw/source/writerfilter/dmapper/StyleSheetTable.cxx 
b/sw/source/writerfilter/dmapper/StyleSheetTable.cxx
index 1cfa71e0043b..ff21ba23a78f 100644
--- a/sw/source/writerfilter/dmapper/StyleSheetTable.cxx
+++ b/sw/source/writerfilter/dmapper/StyleSheetTable.cxx
@@ -1207,7 +1207,7 @@ void StyleSheetTable::ApplyStyleSheetsImpl(const 
FontTablePtr& rFontTable, std::
                         }
                     }
 
-                    auto aPropValues = comphelper::sequenceToContainer< 
std::vector<beans::PropertyValue> >(pEntry->m_pProperties->GetPropertyValues());
+                    std::vector<beans::PropertyValue> aPropValues = 
pEntry->m_pProperties->GetPropertyValues();
 
                     if (bParaStyle || bCharStyle)
                     {
@@ -2140,8 +2140,8 @@ void StyleSheetTable::applyDefaults(bool bParaProperties)
             // This is the built-in default style that every style inherits 
from
             rtl::Reference<SwXBaseStyle> xDefault = 
xParagraphStyles->getStyleByName(u"Paragraph style"_ustr);
 
-            const uno::Sequence< beans::PropertyValue > aPropValues = 
m_pDefaultParaProps->GetPropertyValues();
-            for( const auto& rPropValue : aPropValues )
+            const std::vector< beans::PropertyValue >& rPropValues = 
m_pDefaultParaProps->GetPropertyValues();
+            for( const auto& rPropValue : rPropValues )
             {
                 try
                 {
@@ -2161,8 +2161,8 @@ void StyleSheetTable::applyDefaults(bool bParaProperties)
             if ( m_rDMapper.IsOOXMLImport() )
                 m_xTextDefaults->setPropertyValue( 
getPropertyName(PROP_CHAR_FONT_NAME), css::uno::Any(u"Times New Roman"_ustr) );
 
-            const uno::Sequence< beans::PropertyValue > aPropValues = 
m_pDefaultCharProps->GetPropertyValues();
-            for( const auto& rPropValue : aPropValues )
+            const std::vector< beans::PropertyValue >& rPropValues = 
m_pDefaultCharProps->GetPropertyValues();
+            for( const auto& rPropValue : rPropValues )
             {
                 try
                 {

Reply via email to