[Libreoffice-commits] core.git: 2 commits - external/icu vcl/win

Vincent LE GARREC (via logerrit) logerrit at kemper.freedesktop.org
Wed Feb 24 18:22:47 UTC 2021


 external/icu/ExternalProject_icu.mk |    2 +-
 vcl/win/gdi/salbmp.cxx              |    9 ++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 8ae9d4727d8010a8f5d51f76ff0ebc5f88f0709f
Author:     Vincent LE GARREC <libreoffice at le-garrec.fr>
AuthorDate: Sun Feb 21 11:52:43 2021 +0100
Commit:     Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Wed Feb 24 19:22:08 2021 +0100

    Build internal icu with user CFLAGS
    
    I have a Gentoo (Linux) with libxml2 built with icu support.
    Under Gentoo, icu is built with U_DISABLE_RENAMING=1.
    Building LibreOffice with internal icu uses system libxml2.
    So both builds need CFLAGS="U_DISABLE_RENAMING=1" to avoid naming conflicts.
    
    Change-Id: I565c4ac079aee5e48a1e43f21d0a697e3498f925
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111276
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
    Tested-by: Michael Stahl <michael.stahl at allotropia.de>

diff --git a/external/icu/ExternalProject_icu.mk b/external/icu/ExternalProject_icu.mk
index 3ded08562211..4ff8370ebd50 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -36,7 +36,7 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
 
 else # $(OS)
 
-icu_CFLAGS:=" \
+icu_CFLAGS:="$(CFLAGS) \
 	$(if $(filter iOS,$(OS)),-DUCONFIG_NO_FILE_IO) \
 	$(if $(SYSBASE),-I$(SYSBASE)/usr/include) \
 	$(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
commit 18e9e6d3dfa36afcc6c287578083948149d5aa4c
Author:     Noel Grandin <noel at peralex.com>
AuthorDate: Wed Feb 24 10:17:18 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Feb 24 19:21:53 2021 +0100

    use unique_ptr in WinSalBitmap::AcquireBuffer
    
    Change-Id: I1fca86f6d1f9bd64238b8e75cd98f53df99f91bb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111447
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index b0dffd5394dd..0d9dba981ae7 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -791,7 +791,7 @@ HANDLE WinSalBitmap::ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB )
 
 BitmapBuffer* WinSalBitmap::AcquireBuffer( BitmapAccessMode /*nMode*/ )
 {
-    BitmapBuffer* pBuffer = nullptr;
+    std::unique_ptr<BitmapBuffer> pBuffer;
 
     if( mhDIB )
     {
@@ -826,7 +826,7 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( BitmapAccessMode /*nMode*/ )
 
         if( pBIH->biPlanes == 1 )
         {
-            pBuffer = new BitmapBuffer;
+            pBuffer.reset(new BitmapBuffer);
 
             pBuffer->mnFormat = pBIH->biBitCount == 1 ? ScanlineFormat::N1BitMsbPal :
                                 pBIH->biBitCount == 4 ? ScanlineFormat::N4BitMsnPal :
@@ -894,15 +894,14 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( BitmapAccessMode /*nMode*/ )
             else
             {
                 GlobalUnlock( mhDIB );
-                delete pBuffer;
-                pBuffer = nullptr;
+                pBuffer.reset();
             }
         }
         else
             GlobalUnlock( mhDIB );
     }
 
-    return pBuffer;
+    return pBuffer.release();
 }
 
 void WinSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, BitmapAccessMode nMode )


More information about the Libreoffice-commits mailing list