summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-12-10 12:13:33 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-12-10 13:41:52 +0100
commitda0b49f808825884f045bba6689be13d33d58a47 (patch)
treed4b4c1500fe81fa0156d40a9220e195d46985dba /sw/source/core
parent5ac6e00274e732435b55c2908db9cea658fe549b (diff)
sw: accept a const text node in SwRDFHelper::getTextNodeStatements()
It's an implementation detail that the used UNO API needs a non-cost text node, even if only read methods are called on the wrapper object. Change-Id: If15eaca48339f1531fd54da3422a6b7c41eb48f7
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/doc/rdfhelper.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/doc/rdfhelper.cxx b/sw/source/core/doc/rdfhelper.cxx
index 70a885c0d46a..83605ed4858a 100644
--- a/sw/source/core/doc/rdfhelper.cxx
+++ b/sw/source/core/doc/rdfhelper.cxx
@@ -22,10 +22,13 @@
using namespace com::sun::star;
-std::map<OUString, OUString> SwRDFHelper::getTextNodeStatements(const OUString& rType, SwTextNode& rTextNode)
+std::map<OUString, OUString> SwRDFHelper::getTextNodeStatements(const OUString& rType, const SwTextNode& rNode)
{
std::map<OUString, OUString> aRet;
+ // We only read the node, but CreateXParagraph() needs a non-cost one.
+ SwTextNode& rTextNode = const_cast<SwTextNode&>(rNode);
+
uno::Reference<uno::XComponentContext> xComponentContext(comphelper::getProcessComponentContext());
uno::Reference<rdf::XURI> xType = rdf::URI::create(xComponentContext, rType);
uno::Reference<rdf::XDocumentMetadataAccess> xDocumentMetadataAccess(rTextNode.GetDoc()->GetDocShell()->GetBaseModel(), uno::UNO_QUERY);