Index: source/gdi/pdfwriter_impl.cxx =================================================================== RCS file: /cvs/gsl/vcl/source/gdi/pdfwriter_impl.cxx,v retrieving revision 1.99 diff -u -r1.99 pdfwriter_impl.cxx --- source/gdi/pdfwriter_impl.cxx 17 Sep 2006 12:08:43 -0000 1.99 +++ source/gdi/pdfwriter_impl.cxx 18 Jan 2007 08:37:30 -0000 @@ -62,6 +62,9 @@ #include #include #include +#include +#include +#include #include "implncvt.hxx" @@ -8608,7 +8611,23 @@ return -1; m_aLinks[ nLinkId ].m_nDest = -1; - m_aLinks[ nLinkId ].m_aURL = escapeStringLiteral( rURL ); + + using namespace ::com::sun::star; + + if (!xTrans.is()) + { + xTrans = uno::Reference < util::XURLTransformer >( + ::comphelper::getProcessServiceFactory()->createInstance( + rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" )), uno::UNO_QUERY ); + } + + util::URL aURL; + aURL.Complete = rURL; + + if (xTrans.is()) + xTrans->parseStrict( aURL ); + + m_aLinks[ nLinkId ].m_aURL = escapeStringLiteral( aURL.Complete ); return 0; } Index: source/gdi/pdfwriter_impl.hxx =================================================================== RCS file: /cvs/gsl/vcl/source/gdi/pdfwriter_impl.hxx,v retrieving revision 1.41 diff -u -r1.41 pdfwriter_impl.hxx --- source/gdi/pdfwriter_impl.hxx 13 Jul 2006 11:17:26 -0000 1.41 +++ source/gdi/pdfwriter_impl.hxx 18 Jan 2007 08:37:31 -0000 @@ -78,6 +78,9 @@ #ifndef _RTL_DIGEST_H_ #include #endif +#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_ +#include +#endif #include #include @@ -521,6 +524,9 @@ link id is always the link's position in this vector */ std::vector m_aLinks; + /* makes correctly encoded for export to PDF URLS + */ + ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > xTrans; /* maps arbitrary link ids for structure attributes to real link ids (for setLinkPropertyId) */