[Libreoffice-commits] core.git: 2 commits - sfx2/uiconfig vcl/inc vcl/win

Aron Budea (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 19 16:39:25 UTC 2021


 sfx2/uiconfig/ui/linkeditdialog.ui |   40 ++++++------
 vcl/inc/win/salbmp.h               |    2 
 vcl/win/gdi/salbmp.cxx             |  119 -------------------------------------
 3 files changed, 20 insertions(+), 141 deletions(-)

New commits:
commit da3d3fad1515348b6c4f2303db83ec03594f0597
Author:     Aron Budea <aron.budea at collabora.com>
AuthorDate: Sun Apr 18 06:27:33 2021 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Apr 19 18:38:46 2021 +0200

    tdf#141244 Modify DDE Link dialog was empty
    
    Regression from de01c0c1d0f80ffec3882625d77c02ab806f6c7a.
    
    Apparently <property> entries must precede <child> ones in
    .ui files.
    
    Change-Id: Ie91897d126527d3b30935a46b31f0a53b2837c53
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114237
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sfx2/uiconfig/ui/linkeditdialog.ui b/sfx2/uiconfig/ui/linkeditdialog.ui
index 36e9f3d6930f..d39c829052e4 100644
--- a/sfx2/uiconfig/ui/linkeditdialog.ui
+++ b/sfx2/uiconfig/ui/linkeditdialog.ui
@@ -3,11 +3,6 @@
 <interface domain="sfx">
   <requires lib="gtk+" version="3.20"/>
   <object class="GtkDialog" id="LinkEditDialog">
-    <child internal-child="accessible">
-      <object class="AtkObject" id="LinkEditDialog-atkobject">
-        <property name="AtkObject::accessible-description" translatable="yes" context="linkeditdialog|extended_tip|LinkEditDialog"/>
-      </object>
-    </child>
     <property name="can_focus">False</property>
     <property name="border_width">6</property>
     <property name="title" translatable="yes" context="linkeditdialog|title">Modify DDE Link</property>
@@ -15,6 +10,11 @@
     <property name="default_width">0</property>
     <property name="default_height">0</property>
     <property name="type_hint">dialog</property>
+    <child internal-child="accessible">
+      <object class="AtkObject" id="LinkEditDialog-atkobject">
+        <property name="AtkObject::accessible-description" translatable="yes" context="linkeditdialog|extended_tip|LinkEditDialog"/>
+      </object>
+    </child>
     <child>
       <placeholder/>
     </child>
@@ -143,16 +143,16 @@
                 </child>
                 <child>
                   <object class="GtkEntry" id="app">
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="app-atkobject">
-                        <property name="AtkObject::accessible-description" translatable="yes" context="linkeditdialog|extended_tip|app">Lists the application that last saved the source file. %PRODUCTNAME applications have the server name soffice.</property>
-                      </object>
-                    </child>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="hexpand">True</property>
                     <property name="truncate-multiline">True</property>
                     <property name="activates_default">True</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="app-atkobject">
+                        <property name="AtkObject::accessible-description" translatable="yes" context="linkeditdialog|extended_tip|app">Lists the application that last saved the source file. %PRODUCTNAME applications have the server name soffice.</property>
+                      </object>
+                    </child>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
@@ -161,16 +161,16 @@
                 </child>
                 <child>
                   <object class="GtkEntry" id="file">
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="file-atkobject">
-                        <property name="AtkObject::accessible-description" translatable="yes" context="linkeditdialog|extended_tip|file">Path to the source file. Relative paths must be expressed by full URI, for example, with file://.</property>
-                      </object>
-                    </child>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="hexpand">True</property>
                     <property name="truncate-multiline">True</property>
                     <property name="activates_default">True</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="file-atkobject">
+                        <property name="AtkObject::accessible-description" translatable="yes" context="linkeditdialog|extended_tip|file">Path to the source file. Relative paths must be expressed by full URI, for example, with file://.</property>
+                      </object>
+                    </child>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
@@ -179,16 +179,16 @@
                 </child>
                 <child>
                   <object class="GtkEntry" id="category">
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="category-atkobject">
-                        <property name="AtkObject::accessible-description" translatable="yes" context="linkeditdialog|extended_tip|category">Lists the section or object that the link refers to in the source file. If you want, you can enter a new section or object here.</property>
-                      </object>
-                    </child>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="hexpand">True</property>
                     <property name="truncate-multiline">True</property>
                     <property name="activates_default">True</property>
+                    <child internal-child="accessible">
+                      <object class="AtkObject" id="category-atkobject">
+                        <property name="AtkObject::accessible-description" translatable="yes" context="linkeditdialog|extended_tip|category">Lists the section or object that the link refers to in the source file. If you want, you can enter a new section or object here.</property>
+                      </object>
+                    </child>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
commit 09a801915101f1cd6b39b20288fb55d76ad24c62
Author:     Noel Grandin <noel at peralex.com>
AuthorDate: Mon Apr 19 14:54:34 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Apr 19 18:38:28 2021 +0200

    nobody uses RLE display hardware anymore
    
    Change-Id: I07aa5b24425007ac82fedb28d3c4f0ad474dca14
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114270
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/inc/win/salbmp.h b/vcl/inc/win/salbmp.h
index 5167a7e4a939..d48203840b76 100644
--- a/vcl/inc/win/salbmp.h
+++ b/vcl/inc/win/salbmp.h
@@ -55,8 +55,6 @@ public:
     static HGLOBAL      ImplCreateDIB( const Size& rSize, vcl::PixelFormat ePixelFormat, const BitmapPalette& rPal );
     static HANDLE       ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB );
     static sal_uInt16   ImplGetDIBColorCount( HGLOBAL hDIB );
-    static void         ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf,
-                                             const Size& rSizePixel, bool bRLE4 );
 
 public:
 
diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index 387a2e6e2d99..ed35d7b6d3da 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -801,32 +801,6 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( BitmapAccessMode /*nMode*/ )
         PBITMAPINFO         pBI = static_cast<PBITMAPINFO>(GlobalLock( mhDIB ));
         PBITMAPINFOHEADER   pBIH = &pBI->bmiHeader;
 
-        if( ( pBIH->biCompression == BI_RLE4 ) || ( pBIH->biCompression == BI_RLE8 ) )
-        {
-            Size    aSizePix( pBIH->biWidth, pBIH->biHeight );
-            HGLOBAL hNewDIB = ImplCreateDIB(aSizePix, vcl::bitDepthToPixelFormat(pBIH->biBitCount), BitmapPalette());
-
-            if( hNewDIB )
-            {
-                PBITMAPINFO         pNewBI = static_cast<PBITMAPINFO>(GlobalLock( hNewDIB ));
-                PBITMAPINFOHEADER   pNewBIH = &pNewBI->bmiHeader;
-                const sal_uInt16        nColorCount = ImplGetDIBColorCount( hNewDIB );
-                const sal_uLong         nOffset = pBI->bmiHeader.biSize + nColorCount * sizeof( RGBQUAD );
-                BYTE*               pOldBits = reinterpret_cast<PBYTE>(pBI) + nOffset;
-                BYTE*               pNewBits = reinterpret_cast<PBYTE>(pNewBI) + nOffset;
-
-                memcpy( pNewBI, pBI, nOffset );
-                pNewBIH->biCompression = 0;
-                ImplDecodeRLEBuffer( pOldBits, pNewBits, aSizePix, pBIH->biCompression == BI_RLE4 );
-
-                GlobalUnlock( mhDIB );
-                GlobalFree( mhDIB );
-                mhDIB = hNewDIB;
-                pBI = pNewBI;
-                pBIH = pNewBIH;
-            }
-        }
-
         if( pBIH->biPlanes == 1 )
         {
             pBuffer.reset(new BitmapBuffer);
@@ -930,99 +904,6 @@ void WinSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, BitmapAccessMode nMode
         InvalidateChecksum();
 }
 
-void WinSalBitmap::ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf,
-                                     const Size& rSizePixel, bool bRLE4 )
-{
-    sal_uInt8 const * pRLE = pSrcBuf;
-    sal_uInt8*      pDIB = pDstBuf;
-    sal_uInt8*      pRow = pDstBuf;
-    sal_uLong       nWidthAl = AlignedWidth4Bytes( rSizePixel.Width() * ( bRLE4 ? 4UL : 8UL ) );
-    sal_uInt8*      pLast = pDIB + rSizePixel.Height() * nWidthAl - 1;
-    sal_uLong       nCountByte;
-    sal_uLong       nRunByte;
-    sal_uLong       i;
-    BYTE            cTmp;
-    bool            bEndDecoding = false;
-
-    if( pRLE && pDIB )
-    {
-        sal_uLong nX = 0;
-        do
-        {
-            if( ( nCountByte = *pRLE++ ) == 0 )
-            {
-                nRunByte = *pRLE++;
-
-                if( nRunByte > 2 )
-                {
-                    if( bRLE4 )
-                    {
-                        nCountByte = nRunByte >> 1;
-
-                        for( i = 0; i < nCountByte; i++ )
-                        {
-                            cTmp = *pRLE++;
-                            ImplSetPixel4( pDIB, nX++, cTmp >> 4 );
-                            ImplSetPixel4( pDIB, nX++, cTmp & 0x0f );
-                        }
-
-                        if( nRunByte & 1 )
-                            ImplSetPixel4( pDIB, nX++, *pRLE++ >> 4 );
-
-                        if( ( ( nRunByte + 1 ) >> 1 ) & 1 )
-                            pRLE++;
-                    }
-                    else
-                    {
-                        memcpy( &pDIB[ nX ], pRLE, nRunByte );
-                        pRLE += nRunByte;
-                        nX += nRunByte;
-
-                        if( nRunByte & 1 )
-                            pRLE++;
-                    }
-                }
-                else if( !nRunByte )
-                {
-                    pDIB = ( pRow += nWidthAl );
-                    nX = 0;
-                }
-                else if( nRunByte == 1 )
-                    bEndDecoding = true;
-                else
-                {
-                    nX += *pRLE++;
-                    pDIB = ( pRow += ( *pRLE++ ) * nWidthAl );
-                }
-            }
-            else
-            {
-                cTmp = *pRLE++;
-
-                if( bRLE4 )
-                {
-                    nRunByte = nCountByte >> 1;
-
-                    for( i = 0; i < nRunByte; i++ )
-                    {
-                        ImplSetPixel4( pDIB, nX++, cTmp >> 4 );
-                        ImplSetPixel4( pDIB, nX++, cTmp & 0x0f );
-                    }
-
-                    if( nCountByte & 1 )
-                        ImplSetPixel4( pDIB, nX++, cTmp >> 4 );
-                }
-                else
-                {
-                    for( i = 0; i < nCountByte; i++ )
-                        pDIB[ nX++ ] = cTmp;
-                }
-            }
-        }
-        while( !bEndDecoding && ( pDIB <= pLast ) );
-    }
-}
-
 bool WinSalBitmap::GetSystemData( BitmapSystemData& rData )
 {
     bool bRet = false;


More information about the Libreoffice-commits mailing list