[Libreoffice-commits] core.git: vcl/source

Miklos Vajna vmiklos at collabora.co.uk
Fri Feb 10 15:49:39 UTC 2017


 vcl/source/filter/graphicfilter.cxx |    2 +-
 vcl/source/filter/ipdf/pdfread.cxx  |    7 ++++++-
 vcl/source/filter/ipdf/pdfread.hxx  |    5 +++++
 3 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 0939e079abe3cea70c951fbe1859c39e11cfca29
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Fri Feb 10 14:09:31 2017 +0100

    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

diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 7251a68..9e65479 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1686,7 +1686,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
         }
         else if (aFilterName == IMP_PDF)
         {
-            if (!ImportPDF(rIStream, rGraphic))
+            if (!vcl::ImportPDF(rIStream, rGraphic))
                 nStatus = GRFILTER_FILTERERROR;
             else
                 eLinkType = GfxLinkType::NativePdf;
diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx
index 4b0e1eb..ac82050 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -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);
     if (!xComponent.is())
@@ -110,4 +113,6 @@ VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic)
     return true;
 }
 
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/ipdf/pdfread.hxx b/vcl/source/filter/ipdf/pdfread.hxx
index 02dc845..2cb3abd 100644
--- a/vcl/source/filter/ipdf/pdfread.hxx
+++ b/vcl/source/filter/ipdf/pdfread.hxx
@@ -13,9 +13,14 @@
 #include <tools/stream.hxx>
 #include <vcl/graph.hxx>
 
+namespace vcl
+{
+
 /// Imports a PDF stream into rGraphic as a GDIMetaFile.
 VCL_DLLPUBLIC bool ImportPDF(SvStream& rStream, Graphic& rGraphic);
 
+}
+
 #endif // INCLUDED_VCL_SOURCE_FILTER_IPDF_PDFREAD_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list