Lines 51-56
Link Here
|
51 |
#ifndef _COM_SUN_STAR_AWT_XDEVICE_HPP_ |
51 |
#ifndef _COM_SUN_STAR_AWT_XDEVICE_HPP_ |
52 |
#include <com/sun/star/awt/XDevice.hpp> |
52 |
#include <com/sun/star/awt/XDevice.hpp> |
53 |
#endif |
53 |
#endif |
|
|
54 |
#ifndef _COM_SUN_STAR_UTIL_URL_HPP_ |
55 |
#include <com/sun/star/util/URL.hpp> |
56 |
#endif |
57 |
#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_ |
58 |
#include <com/sun/star/util/XURLTransformer.hpp> |
59 |
#endif |
54 |
|
60 |
|
55 |
#include <com/sun/star/embed/Aspects.hpp> |
61 |
#include <com/sun/star/embed/Aspects.hpp> |
56 |
|
62 |
|
Lines 1663-1669
Link Here
|
1663 |
return nPage; |
1669 |
return nPage; |
1664 |
} |
1670 |
} |
1665 |
|
1671 |
|
1666 |
void ImplPDFExportShapeInteraction( uno::Reference< drawing::XShape > xShape, SdDrawDocument& rDoc, vcl::PDFExtOutDevData& rPDFExtOutDevData ) |
1672 |
namespace |
|
|
1673 |
{ |
1674 |
rtl::OUString lcl_ConvertURL(uno::Reference< util::XURLTransformer > &xTrans, const OUString &rBookmark) |
1675 |
{ |
1676 |
using namespace ::com::sun::star; |
1677 |
|
1678 |
if (!xTrans.is()) |
1679 |
{ |
1680 |
xTrans = uno::Reference < util::XURLTransformer >( |
1681 |
::comphelper::getProcessServiceFactory()->createInstance( |
1682 |
OUString::createFromAscii("com.sun.star.util.URLTransformer" )), uno::UNO_QUERY ); |
1683 |
} |
1684 |
|
1685 |
util::URL aURL; |
1686 |
aURL.Complete = rBookmark; |
1687 |
|
1688 |
if (xTrans.is()) |
1689 |
xTrans->parseStrict( aURL ); |
1690 |
|
1691 |
return aURL.Complete; |
1692 |
} |
1693 |
} |
1694 |
|
1695 |
void ImplPDFExportShapeInteraction( uno::Reference< drawing::XShape > xShape, SdDrawDocument& rDoc, vcl::PDFExtOutDevData& rPDFExtOutDevData, uno::Reference< util::XURLTransformer > &xTrans) |
1667 |
{ |
1696 |
{ |
1668 |
const rtl::OUString sGroup ( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.GroupShape" ) ); |
1697 |
const rtl::OUString sGroup ( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.GroupShape" ) ); |
1669 |
const rtl::OUString sOnClick ( RTL_CONSTASCII_USTRINGPARAM( "OnClick" ) ); |
1698 |
const rtl::OUString sOnClick ( RTL_CONSTASCII_USTRINGPARAM( "OnClick" ) ); |
Lines 1680-1686
Link Here
|
1680 |
uno::Any aAny( xIndexAccess->getByIndex( i ) ); |
1709 |
uno::Any aAny( xIndexAccess->getByIndex( i ) ); |
1681 |
uno::Reference< drawing::XShape > xShape; |
1710 |
uno::Reference< drawing::XShape > xShape; |
1682 |
if ( aAny >>= xShape ) |
1711 |
if ( aAny >>= xShape ) |
1683 |
ImplPDFExportShapeInteraction( xShape, rDoc, rPDFExtOutDevData ); |
1712 |
ImplPDFExportShapeInteraction( xShape, rDoc, rPDFExtOutDevData, xTrans ); |
1684 |
} |
1713 |
} |
1685 |
} |
1714 |
} |
1686 |
} |
1715 |
} |
Lines 1754-1760
Link Here
|
1754 |
case presentation::ClickAction_PROGRAM : |
1783 |
case presentation::ClickAction_PROGRAM : |
1755 |
{ |
1784 |
{ |
1756 |
sal_Int32 nLinkId = rPDFExtOutDevData.CreateLink( aLinkRect, -1 ); |
1785 |
sal_Int32 nLinkId = rPDFExtOutDevData.CreateLink( aLinkRect, -1 ); |
1757 |
rPDFExtOutDevData.SetLinkURL( nLinkId, aBookmark ); |
1786 |
rPDFExtOutDevData.SetLinkURL( nLinkId, lcl_ConvertURL(xTrans, aBookmark) ); |
1758 |
} |
1787 |
} |
1759 |
break; |
1788 |
break; |
1760 |
case presentation::ClickAction_BOOKMARK : |
1789 |
case presentation::ClickAction_BOOKMARK : |
Lines 1891-1896
Link Here
|
1891 |
if( pDocShell && pDoc ) |
1920 |
if( pDocShell && pDoc ) |
1892 |
{ |
1921 |
{ |
1893 |
uno::Reference< awt::XDevice > xRenderDevice; |
1922 |
uno::Reference< awt::XDevice > xRenderDevice; |
|
|
1923 |
uno::Reference< util::XURLTransformer > xTrans; |
1894 |
const sal_Int32 nPageNumber = nRenderer + 1; |
1924 |
const sal_Int32 nPageNumber = nRenderer + 1; |
1895 |
PageKind ePageKind = PK_STANDARD; |
1925 |
PageKind ePageKind = PK_STANDARD; |
1896 |
sal_Bool bExportNotesPages = sal_False; |
1926 |
sal_Bool bExportNotesPages = sal_False; |
Lines 1987-1993
Link Here
|
1987 |
aAny = xShapes->getByIndex( i ); |
2017 |
aAny = xShapes->getByIndex( i ); |
1988 |
uno::Reference< drawing::XShape > xShape; |
2018 |
uno::Reference< drawing::XShape > xShape; |
1989 |
if ( aAny >>= xShape ) |
2019 |
if ( aAny >>= xShape ) |
1990 |
ImplPDFExportShapeInteraction( xShape, *pDoc, *pPDFExtOutDevData ); |
2020 |
ImplPDFExportShapeInteraction( xShape, *pDoc, *pPDFExtOutDevData, xTrans ); |
1991 |
} |
2021 |
} |
1992 |
} |
2022 |
} |
1993 |
} |
2023 |
} |
Lines 2001-2007
Link Here
|
2001 |
aAny = xShapes->getByIndex( i ); |
2031 |
aAny = xShapes->getByIndex( i ); |
2002 |
uno::Reference< drawing::XShape > xShape; |
2032 |
uno::Reference< drawing::XShape > xShape; |
2003 |
if ( aAny >>= xShape ) |
2033 |
if ( aAny >>= xShape ) |
2004 |
ImplPDFExportShapeInteraction( xShape, *pDoc, *pPDFExtOutDevData ); |
2034 |
ImplPDFExportShapeInteraction( xShape, *pDoc, *pPDFExtOutDevData, xTrans ); |
2005 |
} |
2035 |
} |
2006 |
|
2036 |
|
2007 |
// exporting transition effects to pdf |
2037 |
// exporting transition effects to pdf |
Lines 2105-2111
Link Here
|
2105 |
if ( nPage != -1 ) |
2135 |
if ( nPage != -1 ) |
2106 |
pPDFExtOutDevData->SetLinkDest( aIBeg->nLinkId, pPDFExtOutDevData->CreateDest( aPageRect, nPage, vcl::PDFWriter::FitRectangle ) ); |
2136 |
pPDFExtOutDevData->SetLinkDest( aIBeg->nLinkId, pPDFExtOutDevData->CreateDest( aPageRect, nPage, vcl::PDFWriter::FitRectangle ) ); |
2107 |
else |
2137 |
else |
2108 |
pPDFExtOutDevData->SetLinkURL( aIBeg->nLinkId, aIBeg->aBookmark ); |
2138 |
pPDFExtOutDevData->SetLinkURL( aIBeg->nLinkId, lcl_ConvertURL(xTrans, aIBeg->aBookmark)); |
2109 |
aIBeg++; |
2139 |
aIBeg++; |
2110 |
} |
2140 |
} |
2111 |
rBookmarks.clear(); |
2141 |
rBookmarks.clear(); |