[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - vcl/source

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 29 19:52:00 UTC 2020


 vcl/source/gdi/pdfwriter_impl.cxx |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 2eb4b0e203fdf28f9151b7dc36213c2b560b4d7a
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Fri Jun 19 14:04:30 2020 +0200
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Jun 29 21:51:29 2020 +0200

    pdf: clean-up PDFWriterImpl::createNote
    
    Change-Id: Ie2d50b92d448864e9e20098060b0e42f747f1638
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96761
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
    (cherry picked from commit 387a35fae2a539706f605f052322c1a384b07ce1)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97442
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index c1b9c80793df..8e38a85dfa71 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -9879,21 +9879,22 @@ void PDFWriterImpl::intersectClipRegion( const basegfx::B2DPolyPolygon& rRegion
 
 void PDFWriterImpl::createNote( const tools::Rectangle& rRect, const PDFNote& rNote, sal_Int32 nPageNr )
 {
-    if( nPageNr < 0 )
+    if (nPageNr < 0)
         nPageNr = m_nCurrentPage;
 
-    if( nPageNr < 0 || nPageNr >= static_cast<sal_Int32>(m_aPages.size()) )
+    if (nPageNr < 0 || nPageNr >= sal_Int32(m_aPages.size()))
         return;
 
-    m_aNotes.emplace_back( );
-    m_aNotes.back().m_nObject       = createObject();
-    m_aNotes.back().m_aContents     = rNote;
-    m_aNotes.back().m_aRect         = rRect;
+    m_aNotes.emplace_back();
+    auto & rNoteEntry = m_aNotes.back();
+    rNoteEntry.m_nObject = createObject();
+    rNoteEntry.m_aContents = rNote;
+    rNoteEntry.m_aRect = rRect;
     // convert to default user space now, since the mapmode may change
-    m_aPages[nPageNr].convertRect( m_aNotes.back().m_aRect );
+    m_aPages[nPageNr].convertRect(rNoteEntry.m_aRect);
 
     // insert note to page's annotation list
-    m_aPages[ nPageNr ].m_aAnnotations.push_back( m_aNotes.back().m_nObject );
+    m_aPages[nPageNr].m_aAnnotations.push_back(rNoteEntry.m_nObject);
 }
 
 sal_Int32 PDFWriterImpl::createLink( const tools::Rectangle& rRect, sal_Int32 nPageNr )


More information about the Libreoffice-commits mailing list