diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2018-10-28 14:44:34 -0400 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2019-12-26 03:43:07 +0100 |
commit | 7f004baf5ef503b5341e12bc7fc04c6fee3e2acb (patch) | |
tree | 13779dd082ab01dfc3e4058f5be7d6a3e4d55ccb /sw/inc/rdfhelper.hxx | |
parent | 391db9909b9456042492b3fdc73eff140d724adf (diff) |
paragraph-sign: exception-safe metadata graph enumeration
Metadata graph enumeration can throw from a number
functions and break things in horrible ways.
Here we sanitize against the most egregious offenders,
but not all possible sources.
Change-Id: I40e006ea433dd7274d4fa08f3e8f8507680ef2f4
Reviewed-on: https://gerrit.libreoffice.org/63009
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit f29f873d8e638d566f53f9ac5712e49910ee4094)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85803
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'sw/inc/rdfhelper.hxx')
-rw-r--r-- | sw/inc/rdfhelper.hxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/inc/rdfhelper.hxx b/sw/inc/rdfhelper.hxx index 9ccb39156cb3..b7934678d5f9 100644 --- a/sw/inc/rdfhelper.hxx +++ b/sw/inc/rdfhelper.hxx @@ -26,6 +26,7 @@ namespace com { namespace sun { namespace star { class XModel; } namespace rdf { + class XDocumentMetadataAccess; class XResource; class XURI; } @@ -37,6 +38,11 @@ class SW_DLLPUBLIC SwRDFHelper public: /// Gets all graph-names in RDF of a given type. static css::uno::Sequence<css::uno::Reference<css::rdf::XURI>> + getGraphNames(const css::uno::Reference<css::rdf::XDocumentMetadataAccess>& xDocumentMetadataAccess, + const css::uno::Reference<css::rdf::XURI>& xType); + + /// Gets all graph-names in RDF of a given type. + static css::uno::Sequence<css::uno::Reference<css::rdf::XURI>> getGraphNames(const css::uno::Reference<css::frame::XModel>& xModel, const OUString& rType); /// Gets all (XResource, key, value) statements in RDF graphs given the graph-names. |