summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx19
1 files changed, 15 insertions, 4 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 11badef65241..84e40b463fe9 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -3678,10 +3678,21 @@ we check in the following sequence:
aLine.append( "/A<</Type/Action/S");
if( bIsUNCPath ) // handle Win UNC paths
{
- aLine.append( "/Launch/Win<</F" );
- // INetURLObject is not good with UNC paths, use original path
- aWriter.writeLiteralEncrypt(url, rLink.m_nObject, osl_getThreadTextEncoding());
- aLine.append( ">>" );
+ aLine.append("/Launch");
+ // Entry /Win is deprecated in PDF 2.0
+ if (m_aContext.Version >= PDFWriter::PDFVersion::PDF_2_0)
+ {
+ // So write /F directly. AFAICS it's up to PDF viewer to resolve this correctly
+ aWriter.writeKeyAndLiteralEncrypt("/F", url, rLink.m_nObject, osl_getThreadTextEncoding());
+ }
+ else
+ {
+ aLine.append("/Win");
+ aWriter.startDict();
+ // INetURLObject is not good with UNC paths, use original path
+ aWriter.writeKeyAndLiteralEncrypt("/F", url, rLink.m_nObject, osl_getThreadTextEncoding());
+ aWriter.endDict();
+ }
}
else
{