include/xmloff/shapeexport.hxx               |    6 ++--
 include/xmloff/xmlaustp.hxx                  |    3 ++
 include/xmloff/xmlexppr.hxx                  |   11 ++++++-
 include/xmloff/xmlprmap.hxx                  |    3 ++
 reportdesign/source/filter/xml/xmlExport.cxx |    3 +-
 sc/source/filter/xml/xmlexprt.cxx            |    7 ++--
 xmloff/source/chart/SchXMLExport.cxx         |    3 +-
 xmloff/source/draw/sdxmlexp.cxx              |   12 ++++----
 xmloff/source/draw/shapeexport.cxx           |   11 ++++---
 xmloff/source/style/impastpl.cxx             |   13 +++++++++
 xmloff/source/style/impastpl.hxx             |    3 ++
 xmloff/source/style/xmlaustp.cxx             |    6 ++++
 xmloff/source/style/xmlexppr.cxx             |   39 ++++++++++++++++++---------
 xmloff/source/style/xmlprmap.cxx             |    6 ++++
 xmloff/source/text/txtparae.cxx              |    3 +-
 15 files changed, 97 insertions(+), 32 deletions(-)

New commits:
commit 01a3cc1e55034f7703219d4bbb209de7c37bf07b
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Nov 29 16:09:10 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Nov 30 08:38:57 2022 +0100

    tdf#133343 collect autostyle prop names
    
    before scanning for autostyles. That way we can collect only the
    property state we are interested in, instead of all properties.
    
    Change-Id: I8da4d61401d904631cbf9dc1828266950fe98421
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143466
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/include/xmloff/shapeexport.hxx b/include/xmloff/shapeexport.hxx
index add92acf49c2..8398bb937837 100644
--- a/include/xmloff/shapeexport.hxx
+++ b/include/xmloff/shapeexport.hxx
@@ -223,7 +223,8 @@ public:
 
     // This method collects all automatic styles for the given XShape
     void collectShapeAutoStyles(
-        const css::uno::Reference < css::drawing::XShape >& xShape);
+        const css::uno::Reference < css::drawing::XShape >& xShape,
+        const css::uno::Sequence<OUString>& rAutoStylePropNames);
 
     // This method exports the given XShape
     void exportShape(
@@ -235,7 +236,8 @@ public:
 
     // This method collects all automatic styles for the shapes inside the 
given XShapes collection
     void collectShapesAutoStyles(
-        const css::uno::Reference < css::drawing::XShapes >& xShapes);
+        const css::uno::Reference < css::drawing::XShapes >& xShapes,
+        const css::uno::Sequence<OUString>& rAutoStylePropNames);
 
     // This method exports all XShape inside the given XShapes collection
     void exportShapes(
diff --git a/include/xmloff/xmlaustp.hxx b/include/xmloff/xmlaustp.hxx
index 11f6cfc46923..a77e3fe0a570 100644
--- a/include/xmloff/xmlaustp.hxx
+++ b/include/xmloff/xmlaustp.hxx
@@ -110,6 +110,9 @@ public:
         css::uno::Sequence<sal_Int32> const & aFamilies,
         css::uno::Sequence<OUString> const & aNames );
 
+    /// retrieve the names of the properties used in the styles
+    css::uno::Sequence<OUString> GetPropertyNames();
+
     /// Add an item set to the pool and return its generated name.
     OUString Add( XmlStyleFamily nFamily, ::std::vector< XMLPropertyState >&& 
rProperties );
     OUString Add( XmlStyleFamily nFamily, const OUString& rParent, 
::std::vector< XMLPropertyState >&& rProperties, bool bDontSeek = false );
diff --git a/include/xmloff/xmlexppr.hxx b/include/xmloff/xmlexppr.hxx
index 5e47201a5234..a968d70e247d 100644
--- a/include/xmloff/xmlexppr.hxx
+++ b/include/xmloff/xmlexppr.hxx
@@ -23,8 +23,10 @@
 #include <sal/config.h>
 #include <xmloff/dllapi.h>
 #include <salhelper/simplereferenceobject.hxx>
+#include <o3tl/sorted_vector.hxx>
 #include <o3tl/typed_flags_set.hxx>
 #include <rtl/ustring.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
 
 #include <memory>
 #include <vector>
@@ -66,7 +68,8 @@ protected:
     std::vector<XMLPropertyState> Filter_(
             SvXMLExport const& rExport,
             const css::uno::Reference<css::beans::XPropertySet>& rPropSet,
-            bool bDefault, bool bDisableFoFontFamily ) const;
+            bool bDefault, bool bDisableFoFontFamily,
+            const css::uno::Sequence<OUString>* pOnlyTheseProps ) const;
 
     /** Application-specific filter. By default do nothing. */
     virtual void ContextFilter(
@@ -116,7 +119,9 @@ public:
         filter-processes. */
     std::vector<XMLPropertyState> Filter(
         SvXMLExport const& rExport,
-        const css::uno::Reference<css::beans::XPropertySet>& rPropSet, bool 
bEnableFoFontFamily = false ) const;
+        const css::uno::Reference<css::beans::XPropertySet>& rPropSet,
+        bool bEnableFoFontFamily = false,
+        const css::uno::Sequence<OUString>* pOnlyTheseProps = nullptr ) const;
 
     /** Like Filter(), except that:
       * - only properties that have the map flag MID_FLAG_DEFAULT_ITEM_EXPORT
@@ -175,6 +180,8 @@ public:
 
     void SetStyleName( const OUString& rStyleName );
     const OUString& GetStyleName() const;
+
+    void GetEntryAPINames(o3tl::sorted_vector<OUString>& rNames) const;
 };
 
 #endif // INCLUDED_XMLOFF_XMLEXPPR_HXX
diff --git a/include/xmloff/xmlprmap.hxx b/include/xmloff/xmlprmap.hxx
index 2a4b93e8495e..f6e7ec1be540 100644
--- a/include/xmloff/xmlprmap.hxx
+++ b/include/xmloff/xmlprmap.hxx
@@ -26,6 +26,7 @@
 
 #include <salhelper/simplereferenceobject.hxx>
 #include <memory>
+#include <o3tl/sorted_vector.hxx>
 
 namespace rtl { template <class reference_type> class Reference; }
 
@@ -121,6 +122,8 @@ public:
 
     /** Remove an entry */
     void RemoveEntry( sal_Int32 nIndex );
+
+    void GetEntryAPINames(o3tl::sorted_vector<OUString>& rNames) const;
 };
 
 #endif // INCLUDED_XMLOFF_XMLPRMAP_HXX
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx 
b/reportdesign/source/filter/xml/xmlExport.cxx
index 24e2261cbdf1..e3bf45249a44 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -658,7 +658,8 @@ void ORptExport::exportReportComponentAutoStyles(const 
Reference<XSection>& _xPr
             rtl::Reference< XMLShapeExport > xShapeExport = GetShapeExport();
             xShapeExport->seekShapes(_xProp);
             SolarMutexGuard aGuard;
-            xShapeExport->collectShapeAutoStyles(xShape);
+            css::uno::Sequence<OUString> aAutoStylePropNames = 
GetAutoStylePool()->GetPropertyNames();
+            xShapeExport->collectShapeAutoStyles(xShape, aAutoStylePropNames);
         }
         else
         {
diff --git a/sc/source/filter/xml/xmlexprt.cxx 
b/sc/source/filter/xml/xmlexprt.cxx
index 579b04623aec..051c0ac251b3 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -581,6 +581,7 @@ void ScXMLExport::CollectShapesAutoStyles(SCTAB nTableCount)
     }
     if (pSharedData->HasDrawPage())
     {
+        css::uno::Sequence<OUString> aAutoStylePropNames = 
GetAutoStylePool()->GetPropertyNames();
         for (SCTAB nTable = 0; nTable < nTableCount; ++nTable)
         {
             uno::Reference<drawing::XDrawPage> 
xDrawPage(pSharedData->GetDrawPage(nTable));
@@ -599,7 +600,7 @@ void ScXMLExport::CollectShapesAutoStyles(SCTAB nTableCount)
                 {
                     for (const auto& rxShape : (*pTableShapes)[nTable])
                     {
-                        GetShapeExport()->collectShapeAutoStyles(rxShape);
+                        GetShapeExport()->collectShapeAutoStyles(rxShape, 
aAutoStylePropNames);
                         IncrementProgressBar(false);
                     }
                 }
@@ -608,7 +609,7 @@ void ScXMLExport::CollectShapesAutoStyles(SCTAB nTableCount)
                     ScMyShapeList::const_iterator aEndItr(pShapeList->end());
                     while ( aShapeItr != aEndItr && ( 
aShapeItr->aAddress.Tab() == nTable ) )
                     {
-                        
GetShapeExport()->collectShapeAutoStyles(aShapeItr->xShape);
+                        
GetShapeExport()->collectShapeAutoStyles(aShapeItr->xShape, 
aAutoStylePropNames);
                         IncrementProgressBar(false);
                         ++aShapeItr;
                     }
@@ -619,7 +620,7 @@ void ScXMLExport::CollectShapesAutoStyles(SCTAB nTableCount)
                     for (const auto& rNoteShape : rNoteShapes)
                     {
                         if ( rNoteShape.aPos.Tab() == nTable )
-                            
GetShapeExport()->collectShapeAutoStyles(rNoteShape.xShape);
+                            
GetShapeExport()->collectShapeAutoStyles(rNoteShape.xShape, 
aAutoStylePropNames);
                     }
                 }
             }
diff --git a/xmloff/source/chart/SchXMLExport.cxx 
b/xmloff/source/chart/SchXMLExport.cxx
index e07fb6a77693..bd8de071eb20 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -1589,6 +1589,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< 
chart::XChartDocument >
                 // not the XShapes object used here. Thus the shapes have to be
                 // exported one by one
                 rtl::Reference< XMLShapeExport > rShapeExport = 
mrExport.GetShapeExport();
+                css::uno::Sequence<OUString> aAutoStylePropNames = 
mrAutoStylePool.GetPropertyNames();
                 Reference< drawing::XShape > xShape;
                 const sal_Int32 nShapeCount( mxAdditionalShapes->getCount());
                 for( sal_Int32 nShapeId = 0; nShapeId < nShapeCount; 
nShapeId++ )
@@ -1598,7 +1599,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< 
chart::XChartDocument >
                     if( ! xShape.is())
                         continue;
 
-                    rShapeExport->collectShapeAutoStyles( xShape );
+                    rShapeExport->collectShapeAutoStyles( xShape, 
aAutoStylePropNames );
                 }
             }
         }
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 5448f8fc2a61..7c336989496b 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -2031,6 +2031,8 @@ void SdXMLExport::collectAutoStyles()
     if (mbAutoStylesCollected)
         return;
 
+    css::uno::Sequence<OUString> aAutoStylePropNames = 
GetAutoStylePool()->GetPropertyNames();
+
     Reference< beans::XPropertySet > xInfoSet( getExportInfo() );
     if( xInfoSet.is() )
     {
@@ -2070,7 +2072,7 @@ void SdXMLExport::collectAutoStyles()
             {
                 Reference< XDrawPage > xHandoutPage( 
xHandoutSupp->getHandoutMasterPage() );
                 if( xHandoutPage.is() && xHandoutPage->getCount())
-                    GetShapeExport()->collectShapesAutoStyles( xHandoutPage );
+                    GetShapeExport()->collectShapesAutoStyles( xHandoutPage, 
aAutoStylePropNames );
             }
         }
 
@@ -2098,7 +2100,7 @@ void SdXMLExport::collectAutoStyles()
                 GetShapeExport()->setPresentationStylePrefix( 
aMasterPageNamePrefix );
 
                 if(xMasterPage.is() && xMasterPage->getCount())
-                    GetShapeExport()->collectShapesAutoStyles( xMasterPage );
+                    GetShapeExport()->collectShapesAutoStyles( xMasterPage, 
aAutoStylePropNames );
 
                 if(IsImpress())
                 {
@@ -2112,7 +2114,7 @@ void SdXMLExport::collectAutoStyles()
                             GetFormExport()->examineForms( xNotesPage );
 
                             if(xNotesPage->getCount())
-                                GetShapeExport()->collectShapesAutoStyles( 
xNotesPage );
+                                GetShapeExport()->collectShapesAutoStyles( 
xNotesPage, aAutoStylePropNames );
                         }
                     }
                 }
@@ -2163,7 +2165,7 @@ void SdXMLExport::collectAutoStyles()
 
                 // prepare object infos
                 if(xDrawPage.is() && xDrawPage->getCount())
-                    GetShapeExport()->collectShapesAutoStyles( xDrawPage );
+                    GetShapeExport()->collectShapesAutoStyles( xDrawPage, 
aAutoStylePropNames );
 
                 // prepare presentation notes page object infos (ONLY if 
presentation)
                 if(IsImpress())
@@ -2178,7 +2180,7 @@ void SdXMLExport::collectAutoStyles()
                             GetFormExport()->examineForms( xNotesPage );
 
                             if(xNotesPage->getCount())
-                                GetShapeExport()->collectShapesAutoStyles( 
xNotesPage );
+                                GetShapeExport()->collectShapesAutoStyles( 
xNotesPage, aAutoStylePropNames );
                         }
                     }
                 }
diff --git a/xmloff/source/draw/shapeexport.cxx 
b/xmloff/source/draw/shapeexport.cxx
index 13c6a88cb737..51ee4c894250 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -261,7 +261,8 @@ uno::Reference< drawing::XShape > 
XMLShapeExport::checkForCustomShapeReplacement
 }
 
 // This method collects all automatic styles for the given XShape
-void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< 
drawing::XShape >& xShape )
+void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< 
drawing::XShape >& xShape,
+        const css::uno::Sequence<OUString>& rAutoStylePropNames )
 {
     if( maCurrentShapesIter == maShapesInfos.end() )
     {
@@ -529,7 +530,7 @@ void XMLShapeExport::collectShapeAutoStyles(const 
uno::Reference< drawing::XShap
         uno::Reference< drawing::XShapes > xShapes( xCollection, 
uno::UNO_QUERY );
         if( xShapes.is() )
         {
-            collectShapesAutoStyles( xShapes );
+            collectShapesAutoStyles( xShapes,rAutoStylePropNames );
         }
     }
 }
@@ -955,7 +956,9 @@ void XMLShapeExport::exportShape(const uno::Reference< 
drawing::XShape >& xShape
 }
 
 // This method collects all automatic styles for the shapes inside the given 
XShapes collection
-void XMLShapeExport::collectShapesAutoStyles( const uno::Reference < 
drawing::XShapes >& xShapes )
+void XMLShapeExport::collectShapesAutoStyles(
+        const uno::Reference < drawing::XShapes >& xShapes,
+        const css::uno::Sequence<OUString>& rAutoStylePropNames)
 {
     ShapesInfos::iterator aOldCurrentShapesIter = maCurrentShapesIter;
     seekShapes( xShapes );
@@ -969,7 +972,7 @@ void XMLShapeExport::collectShapesAutoStyles( const 
uno::Reference < drawing::XS
         if(!xShape.is())
             continue;
 
-        collectShapeAutoStyles( xShape );
+        collectShapeAutoStyles( xShape, rAutoStylePropNames );
     }
 
     maCurrentShapesIter = aOldCurrentShapesIter;
diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx
index e103fc1c372a..179c402dc246 100644
--- a/xmloff/source/style/impastpl.cxx
+++ b/xmloff/source/style/impastpl.cxx
@@ -20,6 +20,7 @@
 #include <memory>
 #include <algorithm>
 
+#include <comphelper/sequence.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <sal/log.hxx>
 #include <tools/solar.h>
@@ -443,6 +444,18 @@ void SvXMLAutoStylePoolP_Impl::GetRegisteredNames(
     std::copy( aNames.begin(), aNames.end(), rNames.getArray() );
 }
 
+/// retrieve the names of the properties used in the styles
+uno::Sequence<OUString> SvXMLAutoStylePoolP_Impl::GetPropertyNames()
+{
+    o3tl::sorted_vector<OUString> aNames;
+    // iterate over families
+    for (XMLAutoStyleFamily const & rFamily : m_FamilySet)
+    {
+        rFamily.mxMapper->GetEntryAPINames(aNames);
+    }
+    return comphelper::containerToSequence(aNames);
+}
+
 // Adds an array of XMLPropertyState ( vector< XMLPropertyState > ) to list
 // if not added, yet.
 
diff --git a/xmloff/source/style/impastpl.hxx b/xmloff/source/style/impastpl.hxx
index 7cbb89817132..b8eb34bbc9d1 100644
--- a/xmloff/source/style/impastpl.hxx
+++ b/xmloff/source/style/impastpl.hxx
@@ -151,6 +151,9 @@ public:
         css::uno::Sequence<sal_Int32>& aFamilies,
         css::uno::Sequence<OUString>& aNames );
 
+    /// retrieve the names of the properties used in the styles
+    css::uno::Sequence<OUString> GetPropertyNames();
+
     bool Add(
         OUString& rName, XmlStyleFamily nFamily,
         const OUString& rParentName,
diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx
index 47a36932f028..0aca31aabdf3 100644
--- a/xmloff/source/style/xmlaustp.cxx
+++ b/xmloff/source/style/xmlaustp.cxx
@@ -330,6 +330,12 @@ void SvXMLAutoStylePoolP::RegisterNames(
         RegisterName( static_cast<XmlStyleFamily>(pFamilies[n]), pNames[n] );
 }
 
+/// retrieve the names of the properties used in the styles
+css::uno::Sequence<OUString> SvXMLAutoStylePoolP::GetPropertyNames( )
+{
+    return pImpl->GetPropertyNames();
+}
+
 OUString SvXMLAutoStylePoolP::Add( XmlStyleFamily nFamily,
                                    vector< XMLPropertyState >&& rProperties )
 {
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index d2088cfea601..e81758bdce7c 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -171,7 +171,8 @@ public:
             vector< XMLPropertyState >& rPropStates,
             const Reference< XPropertySet >& xPropSet,
             const rtl::Reference< XMLPropertySetMapper >& maPropMapper,
-            const bool bDefault);
+            const bool bDefault,
+            const uno::Sequence<OUString>* pOnlyTheseProps);
     sal_uInt32 GetPropertyCount() const { return aPropInfos.size(); }
 };
 
@@ -250,18 +251,22 @@ void FilterPropertiesInfo_Impl::FillPropertyStateArray(
         vector< XMLPropertyState >& rPropStates,
         const Reference< XPropertySet >& rPropSet,
         const rtl::Reference< XMLPropertySetMapper >& rPropMapper,
-        const bool bDefault )
+        const bool bDefault,
+        const uno::Sequence<OUString>* pOnlyTheseProps )
 {
+
     XMLPropertyStates_Impl aPropStates;
 
-    const uno::Sequence<OUString>& rApiNames = GetApiNames();
+    const uno::Sequence<OUString>* pApiNames = pOnlyTheseProps;
+    if (!pApiNames)
+        pApiNames = &GetApiNames();
 
     Reference < XTolerantMultiPropertySet > xTolPropSet( rPropSet, UNO_QUERY );
     if (xTolPropSet.is())
     {
         if (!bDefault)
         {
-            Sequence < beans::GetDirectPropertyTolerantResult > 
aResults(xTolPropSet->getDirectPropertyValuesTolerant(rApiNames));
+            Sequence < beans::GetDirectPropertyTolerantResult > 
aResults(xTolPropSet->getDirectPropertyValuesTolerant(*pApiNames));
             sal_Int32 nResultCount(aResults.getLength());
             if (nResultCount > 0)
             {
@@ -289,8 +294,8 @@ void FilterPropertiesInfo_Impl::FillPropertyStateArray(
         }
         else
         {
-            const Sequence < beans::GetPropertyTolerantResult > 
aResults(xTolPropSet->getPropertyValuesTolerant(rApiNames));
-            OSL_ENSURE( rApiNames.getLength() == aResults.getLength(), "wrong 
implemented XTolerantMultiPropertySet" );
+            const Sequence < beans::GetPropertyTolerantResult > 
aResults(xTolPropSet->getPropertyValuesTolerant(*pApiNames));
+            OSL_ENSURE( pApiNames->getLength() == aResults.getLength(), "wrong 
implemented XTolerantMultiPropertySet" );
             FilterPropertyInfoList_Impl::iterator 
aPropIter(aPropInfos.begin());
             XMLPropertyState aNewProperty( -1 );
             OSL_ENSURE( aPropInfos.size() == 
static_cast<sal_uInt32>(aResults.getLength()), "wrong implemented 
XTolerantMultiPropertySet??" );
@@ -319,7 +324,7 @@ void FilterPropertiesInfo_Impl::FillPropertyStateArray(
         Reference< XPropertyState > xPropState( rPropSet, UNO_QUERY );
         if( xPropState.is() )
         {
-            aStates = xPropState->getPropertyStates( rApiNames );
+            aStates = xPropState->getPropertyStates( *pApiNames );
             pStates = aStates.getConstArray();
         }
 
@@ -389,7 +394,7 @@ void FilterPropertiesInfo_Impl::FillPropertyStateArray(
             }
             else
             {
-                aValues = xMultiPropSet->getPropertyValues( rApiNames );
+                aValues = xMultiPropSet->getPropertyValues( *pApiNames );
                 const Any *pValues = aValues.getConstArray();
 
                 FilterPropertyInfoList_Impl::iterator aItr = 
aPropInfos.begin();
@@ -514,21 +519,24 @@ void SvXMLExportPropertyMapper::ChainExportMapper(
 
 std::vector<XMLPropertyState> SvXMLExportPropertyMapper::Filter(
     SvXMLExport const& rExport,
-    const uno::Reference<beans::XPropertySet>& rPropSet, bool 
bEnableFoFontFamily ) const
+    const uno::Reference<beans::XPropertySet>& rPropSet,
+    bool bEnableFoFontFamily,
+    const uno::Sequence<OUString>* pOnlyTheseProps ) const
 {
-    return Filter_(rExport, rPropSet, false, bEnableFoFontFamily);
+    return Filter_(rExport, rPropSet, false, bEnableFoFontFamily, 
pOnlyTheseProps);
 }
 
 std::vector<XMLPropertyState> SvXMLExportPropertyMapper::FilterDefaults(
     SvXMLExport const& rExport,
     const uno::Reference<beans::XPropertySet>& rPropSet ) const
 {
-    return Filter_(rExport, rPropSet, true, false/*bEnableFoFontFamily*/);
+    return Filter_(rExport, rPropSet, true, false/*bEnableFoFontFamily*/, 
nullptr);
 }
 
 vector<XMLPropertyState> SvXMLExportPropertyMapper::Filter_(
     SvXMLExport const& rExport,
-    const Reference<XPropertySet>& xPropSet, bool bDefault, bool 
bEnableFoFontFamily ) const
+    const Reference<XPropertySet>& xPropSet, bool bDefault, bool 
bEnableFoFontFamily,
+    const uno::Sequence<OUString>* pOnlyTheseProps ) const
 {
     vector< XMLPropertyState > aPropStateArray;
 
@@ -641,7 +649,7 @@ vector<XMLPropertyState> SvXMLExportPropertyMapper::Filter_(
         try
         {
             pFilterInfo->FillPropertyStateArray(
-                aPropStateArray, xPropSet, mpImpl->mxPropMapper, bDefault);
+                aPropStateArray, xPropSet, mpImpl->mxPropMapper, bDefault, 
pOnlyTheseProps);
         }
         catch( UnknownPropertyException& )
         {
@@ -1128,4 +1136,9 @@ const OUString& SvXMLExportPropertyMapper::GetStyleName() 
const
     return mpImpl->maStyleName;
 }
 
+void 
SvXMLExportPropertyMapper::GetEntryAPINames(o3tl::sorted_vector<OUString>& 
rNames) const
+{
+    mpImpl->mxPropMapper->GetEntryAPINames(rNames);
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx
index afeec00fd024..f7145161e3b8 100644
--- a/xmloff/source/style/xmlprmap.cxx
+++ b/xmloff/source/style/xmlprmap.cxx
@@ -357,4 +357,10 @@ void XMLPropertySetMapper::RemoveEntry( sal_Int32 nIndex )
     mpImpl->maMapEntries.erase( aEIter );
 }
 
+void XMLPropertySetMapper::GetEntryAPINames( o3tl::sorted_vector<OUString>& 
rNames) const
+{
+     for (const XMLPropertySetMapperEntry_Impl& rMapEntry : 
mpImpl->maMapEntries)
+         rNames.insert(rMapEntry.sAPIPropertyName);
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index b52a66249a1b..6a3e7c667c0b 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -3047,7 +3047,8 @@ void XMLTextParagraphExport::exportAnyTextFrame(
         case FrameType::Shape:
             {
                 Reference < XShape > xShape( rTxtCntnt, UNO_QUERY );
-                GetExport().GetShapeExport()->collectShapeAutoStyles( xShape );
+                css::uno::Sequence<OUString> aAutoStylePropNames = 
GetAutoStylePool().GetPropertyNames();
+                GetExport().GetShapeExport()->collectShapeAutoStyles( xShape, 
aAutoStylePropNames );
             }
             break;
         default:

Reply via email to