summaryrefslogtreecommitdiff
path: root/filter/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-02-13 16:07:50 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-02-13 17:40:55 +0000
commit8589cfab808935fbcade39866145074bdfeaae81 (patch)
tree8841b56deaa3a9be1d821aa5676f0807f0504baa /filter/source
parent304ebfad5193c857e4edf18cb05d61b6ccc1f7d0 (diff)
Assume that only vnd.sun.star.expand URLs shall be macro-expanded here
...even though XSLTFilter::expandUrl did that unconditionally ever since the function's introduction in 3218e6592694da70760c1a42b7c562c6864799b2 "INTEGRATION: CWS xsltfilter09". Change-Id: I08022091bc15048478c08e3f0f5cfffbb954df5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146911 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'filter/source')
-rw-r--r--filter/source/xsltfilter/XSLTFilter.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index dd4b8551fce0..8fe3d767bd4b 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -212,11 +212,14 @@ namespace XSLT
{
OUString sPreparedURL(sUrl);
if (sPreparedURL.startsWithIgnoreAsciiCase("vnd.sun.star.expand:", &sPreparedURL))
+ {
sPreparedURL = rtl::Uri::decode(sPreparedURL, rtl_UriDecodeWithCharset,
RTL_TEXTENCODING_UTF8);
- css::uno::Reference<XMacroExpander>
+ css::uno::Reference<XMacroExpander>
xMacroExpander = theMacroExpander::get(m_xContext);
- return xMacroExpander->expandMacros(sPreparedURL);
+ sPreparedURL = xMacroExpander->expandMacros(sPreparedURL);
+ }
+ return sPreparedURL;
}
catch (const Exception&)
{