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

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Mon Dec 30 16:20:43 UTC 2019


 vcl/source/gdi/pdfwriter_impl.cxx |    4 +-
 vcl/source/gdi/pdfwriter_impl.hxx |   76 +++++++++++++++++++-------------------
 2 files changed, 40 insertions(+), 40 deletions(-)

New commits:
commit e03895b8e621f641af686fa83d359e3571047ddb
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Dec 30 12:09:36 2019 +0100
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Dec 30 17:20:21 2019 +0100

    pdf: move BitmapEmit out of PDFWriterImpl class
    
    Change-Id: Ia86803e9ad732d94cac59814ac8dcae8772542a5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85999
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index f05260d613b7..3f1a3aaadb7f 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -9387,7 +9387,7 @@ void PDFWriterImpl::drawBitmap( const Point& rDestPoint, const Size& rDestSize,
     writeBuffer( aLine.getStr(), aLine.getLength() );
 }
 
-const PDFWriterImpl::BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx& i_rBitmap, const Graphic& rGraphic )
+const BitmapEmit& PDFWriterImpl::createBitmapEmit( const BitmapEx& i_rBitmap, const Graphic& rGraphic )
 {
     BitmapEx aBitmap( i_rBitmap );
     if( m_aContext.ColorMode == PDFWriter::DrawGreyscale )
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 37d8a1fbe94c..8e3b188a13bc 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -187,6 +187,19 @@ struct ReferenceXObjectEmit
     sal_Int32 getObject() const;
 };
 
+struct BitmapEmit
+{
+    BitmapID    m_aID;
+    BitmapEx    m_aBitmap;
+    sal_Int32   m_nObject;
+    ReferenceXObjectEmit m_aReferenceXObject;
+
+    BitmapEmit()
+        : m_nObject(0)
+    {
+    }
+};
+
 }
 
 class PDFWriterImpl : public VirtualDevice
@@ -196,19 +209,6 @@ class PDFWriterImpl : public VirtualDevice
 public:
     friend struct vcl::pdf::PDFPage;
 
-    struct BitmapEmit
-    {
-        BitmapID    m_aID;
-        BitmapEx    m_aBitmap;
-        sal_Int32   m_nObject;
-        ReferenceXObjectEmit m_aReferenceXObject;
-
-        BitmapEmit()
-            : m_nObject(0)
-        {
-        }
-    };
-
     struct JPGEmit
     {
         BitmapID            m_aID;
commit 99940fd70cd36c93872d89c604a0ddb0e77163ef
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Dec 30 12:06:03 2019 +0100
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Dec 30 17:20:10 2019 +0100

    pdf: move ReferenceXObjectEmit out of PDFWriterImpl class
    
    Change-Id: Ic173a6fcb189966e785907cd24a3e90857811b83
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85998
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    Tested-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 7cb77f2f60c4..f05260d613b7 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -11224,7 +11224,7 @@ void PDFWriterImpl::MARK( const char* pString )
         emitComment( pString );
 }
 
-sal_Int32 PDFWriterImpl::ReferenceXObjectEmit::getObject() const
+sal_Int32 ReferenceXObjectEmit::getObject() const
 {
     if (m_nFormObject > 0)
         return m_nFormObject;
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index d375d7842bd0..37d8a1fbe94c 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -162,6 +162,31 @@ struct PDFPage
     double getHeight() const { return m_nPageHeight ? m_nPageHeight : vcl::pdf::g_nInheritedPageHeight; }
 };
 
+/// Contains information to emit a reference XObject.
+struct ReferenceXObjectEmit
+{
+    /// ID of the Form XObject, if any.
+    sal_Int32 m_nFormObject;
+    /// ID of the vector/embedded object, if m_nFormObject is used.
+    sal_Int32 m_nEmbeddedObject;
+    /// ID of the bitmap object, if m_nFormObject is used.
+    sal_Int32 m_nBitmapObject;
+    /// Size of the bitmap replacement, in pixels.
+    Size m_aPixelSize;
+    /// PDF data from the graphic object, if not writing a reference XObject.
+    std::vector<sal_Int8> m_aPDFData;
+
+    ReferenceXObjectEmit()
+        : m_nFormObject(0),
+          m_nEmbeddedObject(0),
+          m_nBitmapObject(0)
+    {
+    }
+
+    /// Returns the ID one should use when referring to this bitmap.
+    sal_Int32 getObject() const;
+};
+
 }
 
 class PDFWriterImpl : public VirtualDevice
@@ -171,31 +196,6 @@ class PDFWriterImpl : public VirtualDevice
 public:
     friend struct vcl::pdf::PDFPage;
 
-    /// Contains information to emit a reference XObject.
-    struct ReferenceXObjectEmit
-    {
-        /// ID of the Form XObject, if any.
-        sal_Int32 m_nFormObject;
-        /// ID of the vector/embedded object, if m_nFormObject is used.
-        sal_Int32 m_nEmbeddedObject;
-        /// ID of the bitmap object, if m_nFormObject is used.
-        sal_Int32 m_nBitmapObject;
-        /// Size of the bitmap replacement, in pixels.
-        Size m_aPixelSize;
-        /// PDF data from the graphic object, if not writing a reference XObject.
-        std::vector<sal_Int8> m_aPDFData;
-
-        ReferenceXObjectEmit()
-            : m_nFormObject(0),
-              m_nEmbeddedObject(0),
-              m_nBitmapObject(0)
-        {
-        }
-
-        /// Returns the ID one should use when referring to this bitmap.
-        sal_Int32 getObject() const;
-    };
-
     struct BitmapEmit
     {
         BitmapID    m_aID;


More information about the Libreoffice-commits mailing list