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

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Mon Dec 30 12:56:44 UTC 2019


 vcl/source/gdi/pdfwriter_impl.cxx |    6 +++---
 vcl/source/gdi/pdfwriter_impl.hxx |   10 ++++------
 2 files changed, 7 insertions(+), 9 deletions(-)

New commits:
commit 283f1fb10a7a1643712e70b46c2ab09a89ac013e
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Dec 30 09:28:19 2019 +0100
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Dec 30 13:56:21 2019 +0100

    pdf: remove PDFAppearanceMap typdef, but keep PDFAppearanceStreams
    
    The full declaration would be very long so only remove
    PDFAppearanceMap but keep PDFAppearanceStreams and only move it
    inside PDFWidget class.
    
    Change-Id: Idd783a37dcb631d63cb4f2cf1ebd6040e0f723ad
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85991
    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 633c40780b7c..4c02c41717af 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -10954,10 +10954,10 @@ void PDFWriterImpl::ensureUniqueRadioOnValues()
         for (auto const& nKidIndex : rGroupWidget.m_aKidsIndex)
         {
             PDFWidget& rKid = m_aWidgets[nKidIndex];
-            PDFAppearanceMap::iterator app_it = rKid.m_aAppearances.find( "N" );
+            auto app_it = rKid.m_aAppearances.find( "N" );
             if( app_it != rKid.m_aAppearances.end() )
             {
-                PDFAppearanceStreams::iterator stream_it = app_it->second.find( "Yes" );
+                auto stream_it = app_it->second.find( "Yes" );
                 if( stream_it != app_it->second.end() )
                 {
                     SvMemoryStream* pStream = stream_it->second;
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index da7ff1d823b4..9651f98801a5 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -409,11 +409,10 @@ public:
         {}
     };
 
-    typedef std::unordered_map< OString, SvMemoryStream* > PDFAppearanceStreams;
-    typedef std::unordered_map< OString, PDFAppearanceStreams > PDFAppearanceMap;
-
     struct PDFWidget : public PDFAnnotation
     {
+        typedef std::unordered_map<OString, SvMemoryStream*> PDFAppearanceStreams;
+
         PDFWriter::WidgetType       m_eType;
         OString                m_aName;
         OUString               m_aDescription;
@@ -441,7 +440,7 @@ public:
         sal_Int32                   m_nDest;
         std::vector<OUString>  m_aListEntries;
         std::vector<sal_Int32>      m_aSelectedEntries;
-        PDFAppearanceMap            m_aAppearances;
+        std::unordered_map<OString, PDFAppearanceStreams> m_aAppearances;
         PDFWidget()
                 : m_eType( PDFWriter::PushButton ),
                   m_nTextStyle( DrawTextFlags::NONE ),
commit c10d76aac978beb36439512be0a36aac90a4c03f
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Mon Dec 30 09:23:31 2019 +0100
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Dec 30 13:56:10 2019 +0100

    pdf: remove FontEmbedData typedef
    
    Change-Id: Ib74bd652917d4c7852bc53570986d5b13bc99d32
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85987
    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 143460b457cf..633c40780b7c 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -5671,7 +5671,7 @@ sal_Int32 PDFWriterImpl::getSystemFont( const vcl::Font& i_rFont )
 
     const PhysicalFontFace* pDevFont = GetFontInstance()->GetFontFace();
     sal_Int32 nFontID = 0;
-    FontEmbedData::iterator it = m_aSystemFonts.find( pDevFont );
+    auto it = m_aSystemFonts.find( pDevFont );
     if( it != m_aSystemFonts.end() )
         nFontID = it->second.m_nNormalFontID;
     else
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 8cc7c714f338..da7ff1d823b4 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -311,7 +311,6 @@ public:
 
         EmbedFont() : m_nNormalFontID( 0 ) {}
     };
-    typedef std::map< const PhysicalFontFace*, EmbedFont > FontEmbedData;
 
     struct PDFDest
     {
@@ -643,7 +642,7 @@ private:
     std::list< TransparencyEmit >       m_aTransparentObjects;
     /*  contains all font subsets in use */
     std::map<const PhysicalFontFace*, FontSubset> m_aSubsets;
-    FontEmbedData                       m_aSystemFonts;
+    std::map<const PhysicalFontFace*, EmbedFont> m_aSystemFonts;
     sal_Int32                           m_nNextFID;
     PDFFontCache                        m_aFontCache;
 


More information about the Libreoffice-commits mailing list