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

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


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

New commits:
commit c6ea20161c7e8004021ad3b6976a2b35ac8b9b31
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Dec 30 17:57:54 2019 +0100
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Dec 30 21:15:03 2019 +0100

    pdf: move PDFWidget out of PDFWriterImpl class
    
    Change-Id: I0fce968ec566cb663352ecb57279110f0ae9f3e3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86021
    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 3f1a3aaadb7f..372d5e2c15d7 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -5421,9 +5421,9 @@ struct AnnotSortContainer
 
 struct AnnotSorterLess
 {
-    std::vector< PDFWriterImpl::PDFWidget >& m_rWidgets;
+    std::vector<PDFWidget>& m_rWidgets;
 
-    explicit AnnotSorterLess( std::vector< PDFWriterImpl::PDFWidget >& rWidgets ) : m_rWidgets( rWidgets ) {}
+    explicit AnnotSorterLess( std::vector<PDFWidget>& rWidgets ) : m_rWidgets( rWidgets ) {}
 
     bool operator()( const AnnotationSortEntry& rLeft, const AnnotationSortEntry& rRight )
     {
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index c2145aa8c2de..9c4a527aa5ab 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -410,6 +410,52 @@ struct PDFScreen : public PDFAnnotation
     }
 };
 
+struct PDFWidget : public PDFAnnotation
+{
+    typedef std::unordered_map<OString, SvMemoryStream*> PDFAppearanceStreams;
+
+    PDFWriter::WidgetType       m_eType;
+    OString                m_aName;
+    OUString               m_aDescription;
+    OUString               m_aText;
+    DrawTextFlags          m_nTextStyle;
+    OUString               m_aValue;
+    OString                m_aDAString;
+    OString                m_aDRDict;
+    OString                m_aMKDict;
+    OString                m_aMKDictCAString;  // i12626, added to be able to encrypt the /CA text string
+                                                    // since the object number is not known at the moment
+                                                    // of filling m_aMKDict, the string will be encrypted when emitted.
+                                                    // the /CA string MUST BE the last added to m_aMKDict
+                                                    // see code for details
+    sal_Int32                   m_nFlags;
+    sal_Int32                   m_nParent; // if not 0, parent's object number
+    std::vector<sal_Int32>      m_aKids; // widget children, contains object numbers
+    std::vector<sal_Int32>      m_aKidsIndex; // widget children, contains index to m_aWidgets
+    OUString               m_aOnValue;
+    sal_Int32                   m_nTabOrder; // lowest number gets first in tab order
+    sal_Int32                   m_nRadioGroup;
+    sal_Int32                   m_nMaxLen;
+    bool                        m_bSubmit;
+    bool                        m_bSubmitGet;
+    sal_Int32                   m_nDest;
+    std::vector<OUString>  m_aListEntries;
+    std::vector<sal_Int32>      m_aSelectedEntries;
+    std::unordered_map<OString, PDFAppearanceStreams> m_aAppearances;
+    PDFWidget()
+            : m_eType( PDFWriter::PushButton ),
+              m_nTextStyle( DrawTextFlags::NONE ),
+              m_nFlags( 0 ),
+              m_nParent( 0 ),
+              m_nTabOrder( 0 ),
+              m_nRadioGroup( -1 ),
+              m_nMaxLen( 0 ),
+              m_bSubmit( false ),
+              m_bSubmitGet( false ),
+              m_nDest( -1 )
+    {}
+};
+
 }
 
 class PDFWriterImpl : public VirtualDevice
@@ -419,52 +465,6 @@ class PDFWriterImpl : public VirtualDevice
 public:
     friend struct vcl::pdf::PDFPage;
 
-    struct PDFWidget : public PDFAnnotation
-    {
-        typedef std::unordered_map<OString, SvMemoryStream*> PDFAppearanceStreams;
-
-        PDFWriter::WidgetType       m_eType;
-        OString                m_aName;
-        OUString               m_aDescription;
-        OUString               m_aText;
-        DrawTextFlags          m_nTextStyle;
-        OUString               m_aValue;
-        OString                m_aDAString;
-        OString                m_aDRDict;
-        OString                m_aMKDict;
-        OString                m_aMKDictCAString;  // i12626, added to be able to encrypt the /CA text string
-                                                        // since the object number is not known at the moment
-                                                        // of filling m_aMKDict, the string will be encrypted when emitted.
-                                                        // the /CA string MUST BE the last added to m_aMKDict
-                                                        // see code for details
-        sal_Int32                   m_nFlags;
-        sal_Int32                   m_nParent; // if not 0, parent's object number
-        std::vector<sal_Int32>      m_aKids; // widget children, contains object numbers
-        std::vector<sal_Int32>      m_aKidsIndex; // widget children, contains index to m_aWidgets
-        OUString               m_aOnValue;
-        sal_Int32                   m_nTabOrder; // lowest number gets first in tab order
-        sal_Int32                   m_nRadioGroup;
-        sal_Int32                   m_nMaxLen;
-        bool                        m_bSubmit;
-        bool                        m_bSubmitGet;
-        sal_Int32                   m_nDest;
-        std::vector<OUString>  m_aListEntries;
-        std::vector<sal_Int32>      m_aSelectedEntries;
-        std::unordered_map<OString, PDFAppearanceStreams> m_aAppearances;
-        PDFWidget()
-                : m_eType( PDFWriter::PushButton ),
-                  m_nTextStyle( DrawTextFlags::NONE ),
-                  m_nFlags( 0 ),
-                  m_nParent( 0 ),
-                  m_nTabOrder( 0 ),
-                  m_nRadioGroup( -1 ),
-                  m_nMaxLen( 0 ),
-                  m_bSubmit( false ),
-                  m_bSubmitGet( false ),
-                  m_nDest( -1 )
-        {}
-    };
-
     struct PDFStructureAttribute
     {
         PDFWriter::StructAttributeValue     eValue;


More information about the Libreoffice-commits mailing list