diff options
author | Eike Rathke <erack@redhat.com> | 2014-07-21 18:50:31 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-22 14:27:26 +0000 |
commit | 7633ae819b0c29c2c108158d43d4d3f9c4622e7e (patch) | |
tree | 5d8cc9e264aa9ab3bdfbcb7f26c1cd537e02d690 /sc/source/filter/xml | |
parent | 9ea31dcd4adb22c441c147c8078604ee7ab5bfe3 (diff) |
use SvXMLExport::GetRelativeReference(), fdo#79305
... instead of a manual approach that missed one extra package level.
Change-Id: I41c76eb84677fcf49eb09830127a419ed23ec643
(cherry picked from commit bc3b62e25eb0c3921fa600e80eeb314e45ecaaef)
Reviewed-on: https://gerrit.libreoffice.org/10444
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/filter/xml')
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 9fb515a58c59..7d00d39b1492 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -3090,18 +3090,8 @@ void writeContent( { // <text:a xlink:href="url" xlink:type="simple">value</text:a> - Reference< uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); - bool bUseRelative = officecfg::Office::Common::Save::URL::FileSystem::get( xContext ); OUString aURL = static_cast<const SvxURLField*>(pField)->GetURL(); - if(bUseRelative) - { - OUString aBase = rExport.GetOrigFileName(); - INetURLObject aURLObject(aBase); - aURLObject.removeSegment(); - aURLObject.removeSegment(); - aURL = INetURLObject::GetRelURL(aURLObject.GetMainURL(INetURLObject::DECODE_TO_IURI), aURL); - } - rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, aURL); + rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, rExport.GetRelativeReference(aURL)); rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, "simple"); OUString aElemName = rExport.GetNamespaceMap().GetQNameByKey( |