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

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Sun Jun 21 21:10:33 UTC 2020


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

New commits:
commit 387a35fae2a539706f605f052322c1a384b07ce1
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: Sun Jun 21 23:09:50 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>

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 47a697785564..04fcb70a152f 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -9649,21 +9649,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