Kaydet (Commit) b382ba95 authored tarafından Michael Brauer's avatar Michael Brauer

#88691#: load/store relative URLs

üst 1d4d6d02
......@@ -2,9 +2,9 @@
*
* $RCSfile: xmlmetae.cxx,v $
*
* $Revision: 1.5 $
* $Revision: 1.6 $
*
* last change: $Author: th $ $Date: 2001-05-14 08:43:31 $
* last change: $Author: mib $ $Date: 2001-06-27 07:30:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -62,6 +62,9 @@
#include <tools/debug.hxx>
#include <tools/inetdef.hxx>
#include <tools/isolang.hxx>
#ifndef _URLOBJ_HXX
#include <tools/urlobj.hxx>
#endif
#include <unotools/configmgr.hxx>
#include "xmlmetae.hxx"
......@@ -493,7 +496,7 @@ void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
{
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_XLINK,
::rtl::OUString::createFromAscii(sXML_href) );
pAttrList->AddAttribute( sAttrName, sCDATA, sReloadURL );
pAttrList->AddAttribute( sAttrName, sCDATA, INetURLObject::AbsToRel( sReloadURL) );
}
aPropVal = xInfoProp->getPropertyValue(
......@@ -545,7 +548,7 @@ void SfxXMLMetaExport::Export( const SvXMLNamespaceMap& rNamespaceMap )
// template URL
sAttrName = pNamespaceMap->GetQNameByKey( XML_NAMESPACE_XLINK,
::rtl::OUString::createFromAscii(sXML_href) );
pAttrList->AddAttribute( sAttrName, sCDATA, sTplPath );
pAttrList->AddAttribute( sAttrName, sCDATA, INetURLObject::AbsToRel(sTplPath) );
// template name
aPropVal = xInfoProp->getPropertyValue(
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: xmlmetai.cxx,v $
*
* $Revision: 1.6 $
* $Revision: 1.7 $
*
* last change: $Author: dvo $ $Date: 2001-06-15 17:13:28 $
* last change: $Author: mib $ $Date: 2001-06-27 07:30:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -441,7 +441,7 @@ SfxXMLMetaElementContext::SfxXMLMetaElementContext( SvXMLImport& rImport, sal_uI
switch( aTokenMap.Get( nPrefix, aLocalName ) )
{
case XML_TOK_META_TEMPLATE_HREF:
aPropAny <<= sValue;
aPropAny <<= GetImport().GetAbsoluteReference(sValue);
xInfoProp->setPropertyValue(
::rtl::OUString::createFromAscii(PROP_TEMPLATEURL),
aPropAny );
......@@ -496,7 +496,7 @@ SfxXMLMetaElementContext::SfxXMLMetaElementContext( SvXMLImport& rImport, sal_uI
switch( aTokenMap.Get( nPrefix, aLocalName ) )
{
case XML_TOK_META_RELOAD_HREF:
aPropAny <<= sValue;
aPropAny <<= GetImport().GetAbsoluteReference(sValue);
xInfoProp->setPropertyValue(
::rtl::OUString::createFromAscii(PROP_RELOADURL),
aPropAny );
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: xmlscripti.cxx,v $
*
* $Revision: 1.5 $
* $Revision: 1.6 $
*
* last change: $Author: pl $ $Date: 2001-05-14 08:52:21 $
* last change: $Author: mib $ $Date: 2001-06-27 07:32:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -195,7 +195,7 @@ XMLScriptElementContext::XMLScriptElementContext( SvXMLImport& rImport, sal_uInt
else if( (XML_NAMESPACE_XLINK == nAttrPrefix) && bLinked &&
sAttrName.equalsAsciiL( sXML_href, sizeof(sXML_href)-1 ) )
{
sLinkTargetURL = xAttrList->getValueByIndex( i );
sLinkTargetURL = GetImport().GetAbsoluteReference(xAttrList->getValueByIndex( i ));
}
//else if( msLName.equalsAsciiL( sXML_external_source_url, sizeof(sXML_external_source_url)-1 ) )
//{
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: XMLAutoMarkFileContext.cxx,v $
*
* $Revision: 1.1 $
* $Revision: 1.2 $
*
* last change: $Author: dvo $ $Date: 2001-04-17 11:38:57 $
* last change: $Author: mib $ $Date: 2001-06-27 07:33:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -138,7 +138,7 @@ void XMLAutoMarkFileContext::StartElement(
sLocalName.equalsAsciiL(sXML_href, sizeof(sXML_href)-1 ) )
{
Any aAny;
aAny <<= xAttrList->getValueByIndex(i);
aAny <<= GetImport().GetAbsoluteReference( xAttrList->getValueByIndex(i) );
Reference<XPropertySet> xPropertySet(
GetImport().GetModel(), UNO_QUERY );
if (xPropertySet.is())
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: XMLSectionExport.cxx,v $
*
* $Revision: 1.22 $
* $Revision: 1.23 $
*
* last change: $Author: dvo $ $Date: 2001-06-20 14:16:28 $
* last change: $Author: mib $ $Date: 2001-06-27 07:33:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -633,7 +633,7 @@ void XMLSectionExport::ExportRegularSectionStart(
if (aFileLink.FileURL.getLength() > 0)
{
GetExport().AddAttribute(XML_NAMESPACE_XLINK, sXML_href,
aFileLink.FileURL);
GetExport().GetRelativeReference( aFileLink.FileURL) );
}
if (aFileLink.FilterName.getLength() > 0)
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: XMLSectionSourceImportContext.cxx,v $
*
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* last change: $Author: dvo $ $Date: 2001-06-15 17:13:32 $
* last change: $Author: mib $ $Date: 2001-06-27 07:33:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -191,7 +191,7 @@ void XMLSectionSourceImportContext::StartElement(
if ((sURL.getLength() > 0) || (sFilterName.getLength() > 0))
{
SectionFileLink aFileLink;
aFileLink.FileURL = sURL;
aFileLink.FileURL = GetImport().GetAbsoluteReference( sURL );
aFileLink.FilterName = sFilterName;
aAny <<= aFileLink;
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: XMLTextFrameHyperlinkContext.cxx,v $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* last change: $Author: mib $ $Date: 2001-04-25 13:35:19 $
* last change: $Author: mib $ $Date: 2001-06-27 07:38:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -119,7 +119,7 @@ XMLTextFrameHyperlinkContext::XMLTextFrameHyperlinkContext(
switch( rTokenMap.Get( nPrefix, aLocalName ) )
{
case XML_TOK_TEXT_HYPERLINK_HREF:
sHRef = rValue;
sHRef = GetImport().GetAbsoluteReference( rValue );
break;
case XML_TOK_TEXT_HYPERLINK_NAME:
sName = rValue;
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: txtparae.cxx,v $
*
* $Revision: 1.84 $
* $Revision: 1.85 $
*
* last change: $Author: mib $ $Date: 2001-06-26 11:48:27 $
* last change: $Author: mib $ $Date: 2001-06-27 07:38:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -2440,7 +2440,7 @@ sal_Bool XMLTextParagraphExport::addHyperlinkAttributes(
{
GetExport().AddAttributeASCII( XML_NAMESPACE_XLINK, sXML_type,
sXML_simple );
GetExport().AddAttribute( XML_NAMESPACE_XLINK, sXML_href, sHRef );
GetExport().AddAttribute( XML_NAMESPACE_XLINK, sXML_href, GetExport().GetRelativeReference( sHRef ) );
if( sName.getLength() > 0 )
GetExport().AddAttribute( XML_NAMESPACE_OFFICE, sXML_name, sName );
......@@ -2690,7 +2690,7 @@ void XMLTextParagraphExport::exportTextDeclarations()
if (sUrl.getLength() > 0)
{
GetExport().AddAttribute( XML_NAMESPACE_XLINK, sXML_href,
sUrl );
GetExport().GetRelativeReference(sUrl) );
SvXMLElementExport aAutoMarkElement(
GetExport(), XML_NAMESPACE_TEXT,
sXML_alphabetical_index_auto_mark_file,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment