vcl: move out ImportPDF() from the global namespace

It's a public symbol and can live in the vcl namespace just fine.

Change-Id: I677f22e79f8ddc0c0756cc9bfeb498249354c516
This commit is contained in:
Miklos Vajna
2017-02-10 14:09:31 +01:00
parent a65211ad92
commit 0939e079ab
3 changed files with 12 additions and 2 deletions

View File

@@ -1686,7 +1686,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
} }
else if (aFilterName == IMP_PDF) else if (aFilterName == IMP_PDF)
{ {
if (!ImportPDF(rIStream, rGraphic)) if (!vcl::ImportPDF(rIStream, rGraphic))
nStatus = GRFILTER_FILTERERROR; nStatus = GRFILTER_FILTERERROR;
else else
eLinkType = GfxLinkType::NativePdf; eLinkType = GfxLinkType::NativePdf;

View File

@@ -67,7 +67,10 @@ uno::Reference<lang::XComponent> importIntoDraw(SvStream& rStream)
} }
VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic) namespace vcl
{
bool ImportPDF(SvStream& rStream, Graphic& rGraphic)
{ {
uno::Reference<lang::XComponent> xComponent = importIntoDraw(rStream); uno::Reference<lang::XComponent> xComponent = importIntoDraw(rStream);
if (!xComponent.is()) if (!xComponent.is())
@@ -110,4 +113,6 @@ VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic)
return true; return true;
} }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -13,9 +13,14 @@
#include <tools/stream.hxx> #include <tools/stream.hxx>
#include <vcl/graph.hxx> #include <vcl/graph.hxx>
namespace vcl
{
/// Imports a PDF stream into rGraphic as a GDIMetaFile. /// Imports a PDF stream into rGraphic as a GDIMetaFile.
VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic); VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic);
}
#endif // INCLUDED_VCL_SOURCE_FILTER_IPDF_PDFREAD_HXX #endif // INCLUDED_VCL_SOURCE_FILTER_IPDF_PDFREAD_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */