summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-11-29 16:09:10 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-11-30 08:38:57 +0100
commit01a3cc1e55034f7703219d4bbb209de7c37bf07b (patch)
tree42a5f54b8f9bc3083fb7e6796a1721afe820e983 /include
parent79553e784c6d4587814bc2a577d7251c458df8d4 (diff)
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.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/xmloff/shapeexport.hxx6
-rw-r--r--include/xmloff/xmlaustp.hxx3
-rw-r--r--include/xmloff/xmlexppr.hxx11
-rw-r--r--include/xmloff/xmlprmap.hxx3
4 files changed, 19 insertions, 4 deletions
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